Points de terminaison d’API REST pour les notifications
Utilisez l’API REST pour gérer les notifications GitHub.
À propos des notifications GitHub
Remarque
Ces points de terminaison prennent uniquement en charge l’authentification à l’aide d’un personal access token (classic). Pour plus d’informations, consultez « Gestion de vos jetons d’accès personnels ».
Vous pouvez utiliser l’API REST pour gérer les notifications GitHub. Pour plus d’informations sur les notifications, consultez À propos des notifications.
Tous les appels à ces points de terminaison nécessitent les étendues notifications ou repo. Vous avez besoin de l’étendue repo pour accéder aux problèmes et aux commits à partir de leurs points de terminaison respectifs.
Les notifications sont retournées sous forme de « threads ». Un fil contient des informations sur la discussion actuelle d’un problème, d’une pull request ou d’un commit.
Les notifications sont optimisées pour le sondage avec l’en-tête Last-Modified. S’il n’y a pas de nouvelles notifications, vous voyez une réponse 304 Not Modified, qui n’affecte pas votre limite de débit actuelle. Il y a un en-tête X-Poll-Interval qui spécifie la fréquence (en secondes) à laquelle il est permis d'interroger. En cas de charge élevée du serveur, la durée peut augmenter. Respectez l’en-tête.
# Add authentication to your requests
$ curl -I http(s)://HOSTNAME/api/v3/notifications
HTTP/2 200
Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
X-Poll-Interval: 60
# Pass the Last-Modified header exactly
$ curl -I http(s)://HOSTNAME/api/v3/notifications
$ -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
> HTTP/2 304
> X-Poll-Interval: 60
À propos des raisons de notification
Ces points de terminaison GET retournent une clé reason. Ces reasons correspondent aux événements qui déclenchent une notification.
Il existe quelques reason potentielles justifiant la réception d’une notification.
| Nom de la raison | Description |
|---|---|
approval_requested | Vous avez été invité à passer en revue et à approuver un déploiement. Pour plus d’informations, consultez « Révision des déploiements ». |
assign | Le problème vous a été attribué. |
author | Vous avez créé le thread. |
ci_activity | Une exécution de workflow GitHub Actions que vous avez déclenchée s’est terminée. |
comment | Vous avez commenté le thread. |
invitation | Vous avez accepté une invitation à contribuer au dépôt. |
manual | Vous vous êtes abonné au thread (via un problème ou une demande de tirage). |
member_feature_requested | Les membres de l’organisation ont demandé d’activer une fonctionnalité telle que Copilot. |
mention | Vous étiez spécifiquement @mentioned dans le contenu. |
review_requested | Vous, ou une équipe dont vous êtes membre, avez été invité à réviser une demande de tirage. |
state_change | Vous avez modifié l'état du fil (par exemple, en fermant un ticket ou en fusionnant une demande de fusion). |
subscribed | Vous surveillez le dépôt. |
team_mention | Vous êtes dans une équipe qui a été mentionnée. |
Notez que la reason est modifiée en fonction du thread et peut changer si la reason d’une notification ultérieure est différente.
Par exemple, si vous êtes l’auteur d’un problème, les notifications suivantes sur ce problème ont la reason``author. Si vous êtes @mentioned sur le même problème, les notifications que vous récupérez par la suite ont la reason de mention. La reason demeure comme mention, même si vous n'êtes plus jamais mentionné.
List notifications for the authenticated user
List all notifications for the current user, sorted by most recently updated.
Fine-grained access tokens for "List notifications for the authenticated user"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «List notifications for the authenticated user »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
all boolean If Par défaut: |
participating boolean If Par défaut: |
since string Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: |
before string Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Par défaut: |
per_page integer The number of results per page (max 50). For more information, see "Using pagination in the REST API." Par défaut: |
HTTP response status codes for "List notifications for the authenticated user"
| Status code | Description |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
Code samples for "List notifications for the authenticated user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notificationsResponse
Status: 200[
{
"id": "1",
"repository": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://HOSTNAME/repos/octocat/Hello-World",
"archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
"deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
"downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
"events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
"forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
"git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
"merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
"milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
"tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
"teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
"trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
"hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
},
"subject": {
"title": "Greetings",
"url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/123",
"latest_comment_url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2014-11-07T22:01:45Z",
"last_read_at": "2014-11-07T22:01:45Z",
"url": "https://HOSTNAME/notifications/threads/1",
"subscription_url": "https://HOSTNAME/notifications/threads/1/subscription"
}
]Mark notifications as read
Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.
Fine-grained access tokens for "Mark notifications as read"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Mark notifications as read »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
last_read_at string Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: |
read boolean Whether the notification has been read. |
HTTP response status codes for "Mark notifications as read"
| Status code | Description |
|---|---|
202 | Accepted |
205 | Reset Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "Mark notifications as read"
Request example
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications \
-d '{"last_read_at":"2022-06-10T00:00:00Z","read":true}'Response
Status: 202{
"message": "Unread notifications couldn't be marked in a single request. Notifications are being marked as read in the background."
}Get a thread
Gets information about a notification thread.
Fine-grained access tokens for "Get a thread"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Get a thread »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
HTTP response status codes for "Get a thread"
| Status code | Description |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "Get a thread"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_IDResponse
Status: 200{
"id": "1",
"repository": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://HOSTNAME/repos/octocat/Hello-World",
"archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
"deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
"downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
"events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
"forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
"git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
"merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
"milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
"tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
"teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
"trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
"hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
},
"subject": {
"title": "Greetings",
"url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/123",
"latest_comment_url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2014-11-07T22:01:45Z",
"last_read_at": "2014-11-07T22:01:45Z",
"url": "https://HOSTNAME/notifications/threads/1",
"subscription_url": "https://HOSTNAME/notifications/threads/1/subscription"
}Mark a thread as read
Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications.
Fine-grained access tokens for "Mark a thread as read"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Mark a thread as read »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
HTTP response status codes for "Mark a thread as read"
| Status code | Description |
|---|---|
205 | Reset Content |
304 | Not modified |
403 | Forbidden |
Code samples for "Mark a thread as read"
Request example
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_IDReset Content
Status: 205Mark a thread as done
Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub Enterprise Server as done: https://github.com/notifications.
Fine-grained access tokens for "Mark a thread as done"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Mark a thread as done »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
HTTP response status codes for "Mark a thread as done"
| Status code | Description |
|---|---|
204 | No content |
Code samples for "Mark a thread as done"
Request example
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_IDNo content
Status: 204Get a thread subscription for the authenticated user
This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.
Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were @mentioned, or manually subscribe to a thread.
Fine-grained access tokens for "Get a thread subscription for the authenticated user"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Get a thread subscription for the authenticated user »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
HTTP response status codes for "Get a thread subscription for the authenticated user"
| Status code | Description |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "Get a thread subscription for the authenticated user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_ID/subscriptionResponse
Status: 200{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://HOSTNAME/notifications/threads/1/subscription",
"thread_url": "https://HOSTNAME/notifications/threads/1"
}Set a thread subscription
If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.
You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.
Fine-grained access tokens for "Set a thread subscription"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Set a thread subscription »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
| Nom, Type, Description |
|---|
ignored boolean Whether to block all notifications from a thread. Par défaut: |
HTTP response status codes for "Set a thread subscription"
| Status code | Description |
|---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "Set a thread subscription"
Request example
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_ID/subscription \
-d '{"ignored":false}'Response
Status: 200{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://HOSTNAME/notifications/threads/1/subscription",
"thread_url": "https://HOSTNAME/notifications/threads/1"
}Delete a thread subscription
Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.
Fine-grained access tokens for "Delete a thread subscription"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Delete a thread subscription »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
thread_id integer RequisThe unique identifier of the notification thread. This corresponds to the value returned in the |
HTTP response status codes for "Delete a thread subscription"
| Status code | Description |
|---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Code samples for "Delete a thread subscription"
Request example
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/notifications/threads/THREAD_ID/subscriptionResponse
Status: 204List repository notifications for the authenticated user
Lists all notifications for the current user in the specified repository.
Fine-grained access tokens for "List repository notifications for the authenticated user"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «List repository notifications for the authenticated user »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
owner string RequisThe account owner of the repository. The name is not case sensitive. |
repo string RequisThe name of the repository without the |
| Nom, Type, Description |
|---|
all boolean If Par défaut: |
participating boolean If Par défaut: |
since string Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: |
before string Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Par défaut: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Par défaut: |
HTTP response status codes for "List repository notifications for the authenticated user"
| Status code | Description |
|---|---|
200 | OK |
Code samples for "List repository notifications for the authenticated user"
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/notificationsResponse
Status: 200[
{
"id": "1",
"repository": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://HOSTNAME/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://HOSTNAME/users/octocat/followers",
"following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
"gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
"starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
"organizations_url": "https://HOSTNAME/users/octocat/orgs",
"repos_url": "https://HOSTNAME/users/octocat/repos",
"events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
"received_events_url": "https://HOSTNAME/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://HOSTNAME/repos/octocat/Hello-World",
"archive_url": "https://HOSTNAME/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://HOSTNAME/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://HOSTNAME/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://HOSTNAME/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://HOSTNAME/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://HOSTNAME/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://HOSTNAME/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://HOSTNAME/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://HOSTNAME/repos/octocat/Hello-World/contributors",
"deployments_url": "https://HOSTNAME/repos/octocat/Hello-World/deployments",
"downloads_url": "https://HOSTNAME/repos/octocat/Hello-World/downloads",
"events_url": "https://HOSTNAME/repos/octocat/Hello-World/events",
"forks_url": "https://HOSTNAME/repos/octocat/Hello-World/forks",
"git_commits_url": "https://HOSTNAME/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://HOSTNAME/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://HOSTNAME/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://HOSTNAME/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://HOSTNAME/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://HOSTNAME/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://HOSTNAME/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://HOSTNAME/repos/octocat/Hello-World/languages",
"merges_url": "https://HOSTNAME/repos/octocat/Hello-World/merges",
"milestones_url": "https://HOSTNAME/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://HOSTNAME/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://HOSTNAME/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://HOSTNAME/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://HOSTNAME/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://HOSTNAME/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://HOSTNAME/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://HOSTNAME/repos/octocat/Hello-World/subscription",
"tags_url": "https://HOSTNAME/repos/octocat/Hello-World/tags",
"teams_url": "https://HOSTNAME/repos/octocat/Hello-World/teams",
"trees_url": "https://HOSTNAME/repos/octocat/Hello-World/git/trees{/sha}",
"hooks_url": "http://HOSTNAME/repos/octocat/Hello-World/hooks"
},
"subject": {
"title": "Greetings",
"url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/123",
"latest_comment_url": "https://HOSTNAME/repos/octokit/octokit.rb/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2014-11-07T22:01:45Z",
"last_read_at": "2014-11-07T22:01:45Z",
"url": "https://HOSTNAME/notifications/threads/1",
"subscription_url": "https://HOSTNAME/notifications/threads/1/subscription"
}
]Mark repository notifications as read
Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.
Fine-grained access tokens for "Mark repository notifications as read"
This endpoint does not work with GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens.
Paramètres pour «Mark repository notifications as read »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
owner string RequisThe account owner of the repository. The name is not case sensitive. |
repo string RequisThe name of the repository without the |
| Nom, Type, Description |
|---|
last_read_at string Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: |
HTTP response status codes for "Mark repository notifications as read"
| Status code | Description |
|---|---|
202 | Accepted |
205 | Reset Content |
Code samples for "Mark repository notifications as read"
Request example
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/notifications \
-d '{"last_read_at":"2019-01-01T00:00:00Z"}'Response
Status: 202{
"message": "Unread notifications couldn't be marked in a single request. Notifications are being marked as read in the background."
}