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
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
200OKAPIEntitiesNote
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
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. 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
IntegerID of the resource the note is attached to

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
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 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
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 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
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
200OKAPIEntitiesNote
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.

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. 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
IntegerID of the resource the note is attached to

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
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 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
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 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
200OKAPIEntitiesNote
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. 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 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
200OKAPIEntitiesNote
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 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. 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 resource the note is attached to

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 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 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 resource the note is attached to
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
authorAPIEntitiesUserBasic—
bodyStringExample: Note body.
commands_changesObject—
commit_idStringExample: 7b09ce7e6f80347baf0316c8c94cdba9a0a7e91d
confidentialBooleanExample: false
created_atString (date-time)Example: 2022-01-31T15:10:44.988Z
idInteger (int64)Example: 1
importedBooleanExample: false
imported_fromStringExample: github
internalBooleanExample: false
noteable_idInteger (int64)Example: 1
noteable_iidIntegerExample: 1
noteable_typeStringExample: Issue
positionObject—
project_idInteger (int64)Example: 1
resolvableBooleanExample: false
resolvedBooleanExample: false
resolved_atString (date-time)Example: 2022-01-31T15:10:44.988Z
resolved_byAPIEntitiesUserBasic—
suggestionsAPIEntitiesSuggestion—
systemBooleanExample: false
typeStringExample: DiscussionNote
updated_atString (date-time)Example: 2022-01-31T15:10:44.988Z

APIEntitiesSuggestion

PropertyTypeDescription
appliableBooleanExample: true
appliedBooleanExample: false
from_contentStringExample: Original content
from_lineIntegerExample: 1
idInteger (int64)Example: 1
to_contentStringExample: New content
to_lineIntegerExample: 1

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)Example: 1
lockedBoolean—
nameStringExample: Administrator
public_emailStringExample: john@example.com
stateStringExample: active
usernameStringExample: admin
web_urlStringExample: https://gitlab.example.com/root