You can add multiline comments to merge requests in GitLab via the REST API by making a
POST
request to the /projects/:id/merge_requests/:merge_request_iid/notes
endpoint, including the body
parameter in the request payload. The value of the body
parameter should be the text of the comment, including line breaks.Ensure to replace <your_access_token> with your access token and :id and :merge_request_iid with the id of the project and merge request respectively.
Here is an example of how you might make this request using the curl
command-line tool: