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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the issue |
order_Query | String | Sort results by the specified field Allowed values: created_,updated_Default: created_ |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
activity_Query | String | Filter notes by activity type Allowed values: all_,only_,only_Default: all_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create an issue note
POST /api/v4/projects/{id}/issues/{noteable_id}/notes
Creates a note for an issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the issue |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | Content of the note./ at the start of a line. |
confidential | Boolean | If true,internal instead |
created_ | String | Date and time the note was created,2016-. |
internal | Boolean | Internal note flag Default: false |
merge_ | String | SHA of the head commit,/ quick action |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve an issue note
GET /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}
Retrieves a specified note for an issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
note_Path, | Integer | ID of the note |
noteable_Path, | Integer | IID of the issue |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update an issue note
PUT /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}
Updates an existing note for an issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the issue |
note_Path, | Integer | ID of the note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | Content of the note. |
confidential | Boolean | If true,false, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete an issue note
DELETE /api/v4/projects/{id}/issues/{noteable_id}/notes/{note_id}
Deletes a specified note from an issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the issue |
note_Path, | Integer | ID of the note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the merge request |
order_Query | String | Sort results by the specified field Allowed values: created_,updated_Default: created_ |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
activity_Query | String | Filter notes by activity type Allowed values: all_,only_,only_Default: all_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the merge request |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | Content of the note. |
confidential | Boolean | If true,internal instead |
created_ | String | Date and time the note was created,2016-. |
internal | Boolean | Internal note flag Default: false |
merge_ | String | SHA of the head commit,/ quick action |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
note_Path, | Integer | ID of the note |
noteable_Path, | Integer | IID of the merge request |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the merge request |
note_Path, | Integer | ID of the note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | Content of the note. |
confidential | Boolean | If true,false, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | IID of the merge request |
note_Path, | Integer | ID of the note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all snippet notes
GET /api/v4/projects/{id}/snippets/{noteable_id}/notes
Lists all notes for a specified snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the resource the note is attached to |
order_Query | String | Sort results by the specified field Allowed values: created_,updated_Default: created_ |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
activity_Query | String | Filter notes by activity type Allowed values: all_,only_,only_Default: all_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a snippet note
POST /api/v4/projects/{id}/snippets/{noteable_id}/notes
Creates a note for a snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the resource the note is attached to |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | Content of the note. |
confidential | Boolean | If true,internal instead |
created_ | String | Date and time the note was created,2016-. |
internal | Boolean | Internal note flag Default: false |
merge_ | String | SHA of the head commit,/ quick action |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a snippet note
GET /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}
Retrieves a specified note for a snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
note_Path, | Integer | ID of the note |
noteable_Path, | Integer | ID of the resource the note is attached to |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a snippet note
PUT /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}
Updates an existing note for a snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the resource the note is attached to |
note_Path, | Integer | ID of the note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | Content of the note. |
confidential | Boolean | If true,false, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a snippet note
DELETE /api/v4/projects/{id}/snippets/{noteable_id}/notes/{note_id}
Deletes a specified note from a snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the resource the note is attached to |
note_Path, | Integer | ID of the note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the wiki page meta.404 error |
order_Query | String | Sort results by the specified field Allowed values: created_,updated_Default: created_ |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
activity_Query | String | Filter notes by activity type Allowed values: all_,only_,only_Default: all_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the wiki page meta.404 error |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | Content of the note. |
confidential | Boolean | If true,internal instead |
created_ | String | Date and time the note was created,2016-. |
internal | Boolean | Internal note flag Default: false |
merge_ | String | SHA of the head commit,/ quick action |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
note_Path, | Integer | ID of the note |
noteable_Path, | Integer | ID of the wiki page meta.404 error |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the wiki page meta.404 error |
note_Path, | Integer | ID of the note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | Content of the note. |
confidential | Boolean | If true,false, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
noteable_Path, | Integer | ID of the wiki page meta.404 error |
note_Path, | Integer | ID of the note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesNote
| Property | Type | Description |
|---|---|---|
author | APIEntities | Author of the note |
body | String | Content of the note Example: Note body. |
commands_ | Object | — |
commit_ | String | Example:7b09ce7e6f80347baf03 |
confidential | Boolean | Example:false |
created_ | String (date- | Date and time when the note was created Example: 2022- |
id | Integer (int64) | ID of the note Example: 1 |
imported | Boolean | Example:false |
imported_ | String | Example:github |
internal | Boolean | Example:false |
noteable_ | Integer (int64) | ID of the object the note belongs to, Example: 1 |
noteable_ | Integer | Example:1 |
noteable_ | String | Type of the object the note belongs to,Issue or MergeExample: Issue |
position | Object | Position of the note in the diff. |
project_ | Integer (int64) | ID of the project the note belongs to Example: 1 |
resolvable | Boolean | If true,Example: false |
resolved | Boolean | If true,Example: false |
resolved_ | String (date- | Date and time when the note was resolved. Example: 2022- |
resolved_ | APIEntities | User who resolved the note. |
suggestions | Array of APIEntities | Suggestions in the note. |
system | Boolean | If true,Example: false |
type | String | Type of the note,Discussion or Diff.null for a plain noteExample: Discussion |
updated_ | String (date- | Date and time when the note was last updated Example: 2022- |
APIEntitiesSuggestion
| Property | Type | Description |
|---|---|---|
appliable | Boolean | If true,Example: true |
applied | Boolean | If true,Example: false |
from_ | String | Original content before the suggestion Example: Original content |
from_ | Integer | First line number of the suggestion Example: 1 |
id | Integer (int64) | ID of the suggestion Example: 1 |
to_ | String | Suggested content that replaces the original Example: New content |
to_ | Integer | Last line number of the suggestion Example: 1 |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |