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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
order_by
Query
StringReturn notes ordered by created_at or updated_at fields
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringReturn notes sorted in asc or desc order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringThe type of notables which are returned
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable

Request body (application/json)

PropertyTypeDescription
body
Required
StringThe content of a note
confidentialBoolean[Deprecated in 15.5] Renamed to internal
created_atStringThe creation date of the note
internalBooleanInternal note flag, default is false
merge_request_diff_head_shaStringThe SHA of the head commit

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
StringThe ID of a project
note_id
Path, required
IntegerThe ID of a note
noteable_id
Path, required
IntegerThe ID of the noteable

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a note

Request body (application/json)

PropertyTypeDescription
bodyStringThe content of a note
confidentialBoolean[Deprecated in 14.10] No longer allowed to update confidentiality of notes

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
order_by
Query
StringReturn notes ordered by created_at or updated_at fields
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringReturn notes sorted in asc or desc order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringThe type of notables which are returned
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable

Request body (application/json)

PropertyTypeDescription
body
Required
StringThe content of a note
confidentialBoolean[Deprecated in 15.5] Renamed to internal
created_atStringThe creation date of the note
internalBooleanInternal note flag, default is false
merge_request_diff_head_shaStringThe SHA of the head commit

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
StringThe ID of a project
note_id
Path, required
IntegerThe ID of a note
noteable_id
Path, required
IntegerThe ID of the noteable

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a note

Request body (application/json)

PropertyTypeDescription
bodyStringThe content of a note
confidentialBoolean[Deprecated in 14.10] No longer allowed to update confidentiality of notes

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
order_by
Query
StringReturn notes ordered by created_at or updated_at fields
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringReturn notes sorted in asc or desc order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringThe type of notables which are returned
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable

Request body (application/json)

PropertyTypeDescription
body
Required
StringThe content of a note
confidentialBoolean[Deprecated in 15.5] Renamed to internal
created_atStringThe creation date of the note
internalBooleanInternal note flag, default is false
merge_request_diff_head_shaStringThe SHA of the head commit

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
StringThe ID of a project
note_id
Path, required
IntegerThe ID of a note
noteable_id
Path, required
IntegerThe ID of the noteable

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a note

Request body (application/json)

PropertyTypeDescription
bodyStringThe content of a note
confidentialBoolean[Deprecated in 14.10] No longer allowed to update confidentiality of notes

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
order_by
Query
StringReturn notes ordered by created_at or updated_at fields
Allowed values: created_at, updated_at
Default: created_at
sort
Query
StringReturn notes sorted in asc or desc order
Allowed values: asc, desc
Default: desc
activity_filter
Query
StringThe type of notables which are returned
Allowed values: all_notes, only_comments, only_activity
Default: all_notes
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items 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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable

Request body (application/json)

PropertyTypeDescription
body
Required
StringThe content of a note
confidentialBoolean[Deprecated in 15.5] Renamed to internal
created_atStringThe creation date of the note
internalBooleanInternal note flag, default is false
merge_request_diff_head_shaStringThe SHA of the head commit

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
StringThe ID of a project
note_id
Path, required
IntegerThe ID of a note
noteable_id
Path, required
IntegerThe ID of the noteable

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a note

Request body (application/json)

PropertyTypeDescription
bodyStringThe content of a note
confidentialBoolean[Deprecated in 14.10] No longer allowed to update confidentiality of notes

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
StringThe ID of a project
noteable_id
Path, required
IntegerThe ID of the noteable
note_id
Path, required
IntegerThe ID of a 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