Use this API to manage the comments and system records attached to GitLab content. You can:

  • Create and modify comments on issues, merge requests, epics, snippets, commits, and wiki pages.
  • Retrieve system-generated notes about object changes.
  • Control visibility with confidential and internal flags.

Some system-generated notes are tracked as separate resource events instead, including label, state, milestone, weight, and iteration events.

By default, GET requests return 20 results at a time, because the results are paginated.

List all issue notes

GET /api/v4/projects/{id}/issues/{noteable_id}/notes

Lists all notes for a specified issue.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the issue
order_by
Query
StringSort results by the specified field
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringFilter notes by activity type
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesNote
400Bad Request—
404Not Found—

Create an issue note

POST /api/v4/projects/{id}/issues/{noteable_id}/notes

Creates a note for an issue.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the issue

Request body (application/json)

PropertyTypeDescription
body
Required
StringContent of the note. Limited to 1,000,000 characters. To promote the issue to an epic, put /promote at the start of a line. If the body contains only quick actions, no comment is added
confidentialBooleanIf true, marks the note as internal. Deprecated. Use internal instead
created_atStringDate and time the note was created, in ISO 8601 format such as 2016-03-11T03:45:40Z. Must be on or after 1970-01-01. Requires administrator or project/group owner rights
internalBooleanInternal note flag
Default: false
merge_request_diff_head_shaStringSHA of the head commit, which ensures the merge request wasn’t updated after the API request was sent. Required for the /merge quick action

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesNote
400Bad Request—
404Not Found—

Retrieve an issue note

GET /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}

Retrieves a specified note for an issue.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
note_id
Path, required
IntegerID of the note
noteable_id
Path, required
IntegerIID of the issue

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Update an issue note

PUT /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}

Updates an existing note for an issue.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the issue
note_id
Path, required
IntegerID of the note

Request body (application/json)

PropertyTypeDescription
bodyStringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, the note must already be confidential. If false, it must not be. Confidentiality cannot be changed after a note is created. Deprecated

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Delete an issue note

DELETE /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}

Deletes a specified note from an issue.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the issue
note_id
Path, required
IntegerID of the note

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

List all merge request notes

GET /api/v4/projects/{id}/merge_requests/{noteable_id}/notes

Lists all notes for a specified merge request.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the merge request
order_by
Query
StringSort results by the specified field
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringFilter notes by activity type
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesNote
400Bad Request—
404Not Found—

Create a merge request note

POST /api/v4/projects/{id}/merge_requests/{noteable_id}/notes

Creates a note for a merge request. The note is not attached to a specific line of the merge request. To comment on a line, create a discussion thread or comment on a commit instead.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the merge request

Request body (application/json)

PropertyTypeDescription
body
Required
StringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, marks the note as internal. Deprecated. Use internal instead
created_atStringDate and time the note was created, in ISO 8601 format such as 2016-03-11T03:45:40Z. Must be on or after 1970-01-01. Requires administrator or project/group owner rights
internalBooleanInternal note flag
Default: false
merge_request_diff_head_shaStringSHA of the head commit, which ensures the merge request wasn’t updated after the API request was sent. Required for the /merge quick action

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesNote
400Bad Request—
404Not Found—

Retrieve a merge request note

GET /api/v4/projects/{id}/merge_requests/{noteable_id}/notes/{note_id}

Retrieves a specified note for a merge request.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
note_id
Path, required
IntegerID of the note
noteable_id
Path, required
IntegerIID of the merge request

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Update a merge request note

PUT /api/v4/projects/{id}/merge_requests/{noteable_id}/notes/{note_id}

Updates an existing note for a merge request.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the merge request
note_id
Path, required
IntegerID of the note

Request body (application/json)

PropertyTypeDescription
bodyStringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, the note must already be confidential. If false, it must not be. Confidentiality cannot be changed after a note is created. Deprecated

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Delete a merge request note

DELETE /api/v4/projects/{id}/merge_requests/{noteable_id}/notes/{note_id}

Deletes a specified note from a merge request.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerIID of the merge request
note_id
Path, required
IntegerID of the note

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

List all snippet notes

GET /api/v4/projects/{id}/snippets/{noteable_id}/notes

Lists all notes for a specified snippet.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the resource the note is attached to
order_by
Query
StringSort results by the specified field
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringFilter notes by activity type
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesNote
400Bad Request—
404Not Found—

Create a snippet note

POST /api/v4/projects/{id}/snippets/{noteable_id}/notes

Creates a note for a snippet.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the resource the note is attached to

Request body (application/json)

PropertyTypeDescription
body
Required
StringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, marks the note as internal. Deprecated. Use internal instead
created_atStringDate and time the note was created, in ISO 8601 format such as 2016-03-11T03:45:40Z. Must be on or after 1970-01-01. Requires administrator or project/group owner rights
internalBooleanInternal note flag
Default: false
merge_request_diff_head_shaStringSHA of the head commit, which ensures the merge request wasn’t updated after the API request was sent. Required for the /merge quick action

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesNote
400Bad Request—
404Not Found—

Retrieve a snippet note

GET /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}

Retrieves a specified note for a snippet.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
note_id
Path, required
IntegerID of the note
noteable_id
Path, required
IntegerID of the resource the note is attached to

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Update a snippet note

PUT /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}

Updates an existing note for a snippet.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the resource the note is attached to
note_id
Path, required
IntegerID of the note

Request body (application/json)

PropertyTypeDescription
bodyStringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, the note must already be confidential. If false, it must not be. Confidentiality cannot be changed after a note is created. Deprecated

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Delete a snippet note

DELETE /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}

Deletes a specified note from a snippet.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the resource the note is attached to
note_id
Path, required
IntegerID of the note

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

List all wiki page meta notes

GET /api/v4/projects/{id}/wiki_pages/{noteable_id}/notes

Lists all notes for a specified wiki page meta.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the wiki page meta. Use the meta ID, not the page slug. A slug returns a 404 error
order_by
Query
StringSort results by the specified field
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringSort results in ascending or descending order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringFilter notes by activity type
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerPage number of results to retrieve
Default: 1
Example: 1
per_page
Query
IntegerNumber of items to list per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesNote
400Bad Request—
404Not Found—

Create a wiki page meta note

POST /api/v4/projects/{id}/wiki_pages/{noteable_id}/notes

Creates a note for a wiki page meta.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the wiki page meta. Use the meta ID, not the page slug. A slug returns a 404 error

Request body (application/json)

PropertyTypeDescription
body
Required
StringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, marks the note as internal. Deprecated. Use internal instead
created_atStringDate and time the note was created, in ISO 8601 format such as 2016-03-11T03:45:40Z. Must be on or after 1970-01-01. Requires administrator or project/group owner rights
internalBooleanInternal note flag
Default: false
merge_request_diff_head_shaStringSHA of the head commit, which ensures the merge request wasn’t updated after the API request was sent. Required for the /merge quick action

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesNote
400Bad Request—
404Not Found—

Retrieve a wiki page meta note

GET /api/v4/projects/{id}/wiki_pages/{noteable_id}/notes/{note_id}

Retrieves a specified note for a wiki page meta.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
note_id
Path, required
IntegerID of the note
noteable_id
Path, required
IntegerID of the wiki page meta. Use the meta ID, not the page slug. A slug returns a 404 error

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Update a wiki page meta note

PUT /api/v4/projects/{id}/wiki_pages/{noteable_id}/notes/{note_id}

Updates an existing note for a wiki page meta.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the wiki page meta. Use the meta ID, not the page slug. A slug returns a 404 error
note_id
Path, required
IntegerID of the note

Request body (application/json)

PropertyTypeDescription
bodyStringContent of the note. Limited to 1,000,000 characters
confidentialBooleanIf true, the note must already be confidential. If false, it must not be. Confidentiality cannot be changed after a note is created. Deprecated

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Delete a wiki page meta note

DELETE /api/v4/projects/{id}/wiki_pages/{noteable_id}/notes/{note_id}

Deletes a specified note from a wiki page meta.

Parameters

NameTypeDescription
id
Path, required
StringID or URL-encoded path of the project
noteable_id
Path, required
IntegerID of the wiki page meta. Use the meta ID, not the page slug. A slug returns a 404 error
note_id
Path, required
IntegerID of the note

Responses

CodeDescriptionSchema
200OKAPIEntitiesNote
400Bad Request—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCustomAttribute

PropertyTypeDescription
keyStringExample: foo
valueStringExample: bar

APIEntitiesNote

PropertyTypeDescription
authorAPIEntitiesUserBasicAuthor of the note
bodyStringContent of the note
Example: Note body.
commands_changesObject—
commit_idStringExample: 7b09ce7e6f80347baf0316c8c94cdba9a0a7e91d
confidentialBooleanExample: false
created_atString (date-time)Date and time when the note was created
Example: 2022-01-31T15:10:44.988Z
idInteger (int64)ID of the note
Example: 1
importedBooleanExample: false
imported_fromStringExample: github
internalBooleanExample: false
noteable_idInteger (int64)ID of the object the note belongs to, such as an issue or merge request
Example: 1
noteable_iidIntegerExample: 1
noteable_typeStringType of the object the note belongs to, such as Issue or MergeRequest
Example: Issue
positionObjectPosition of the note in the diff. Returned only for diff notes
project_idInteger (int64)ID of the project the note belongs to
Example: 1
resolvableBooleanIf true, the note can be resolved
Example: false
resolvedBooleanIf true, the note is resolved. Returned only for resolvable notes
Example: false
resolved_atString (date-time)Date and time when the note was resolved. Returned only for resolvable notes
Example: 2022-01-31T15:10:44.988Z
resolved_byAPIEntitiesUserBasicUser who resolved the note. Returned only for resolvable notes
suggestionsArray of APIEntitiesSuggestionSuggestions in the note. Returned only for diff notes on merge requests
systemBooleanIf true, the note is a system note
Example: false
typeStringType of the note, such as DiscussionNote or DiffNote. null for a plain note
Example: DiscussionNote
updated_atString (date-time)Date and time when the note was last updated
Example: 2022-01-31T15:10:44.988Z

APIEntitiesSuggestion

PropertyTypeDescription
appliableBooleanIf true, the suggestion can be applied
Example: true
appliedBooleanIf true, the suggestion has been applied
Example: false
from_contentStringOriginal content before the suggestion
Example: Original content
from_lineIntegerFirst line number of the suggestion
Example: 1
idInteger (int64)ID of the suggestion
Example: 1
to_contentStringSuggested content that replaces the original
Example: New content
to_lineIntegerLast line number of the suggestion
Example: 1

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringURL of the user’s avatar
Example: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)ID of the user
Example: 1
lockedBooleanIf true, the user account is locked, and the user cannot sign in until the lock expires or an administrator unlocks the account
nameStringName of the user. For a bot user, **** if the current user cannot read the bot’s project or group
Example: Administrator
public_emailStringPublic email address of the user
Example: john@example.com
stateStringState of the user account. Possible values: active, blocked, ldap_blocked, blocked_pending_approval, banned, or deactivated
Example: active
usernameStringUsername of the user
Example: admin
web_urlStringURL of the user’s profile
Example: https://gitlab.example.com/root