Use the REST API to manage GitHub notifications.
Note
These endpoints only support authentication using a personal access token (classic). For more information, see Managing your personal access tokens.
You can use the REST API to manage GitHub notifications. For more information about notifications, see About notifications.
All calls to these endpoints require the notifications or repo scopes. You will need the repo scope to access issues and commits from their respective endpoints.
Notifications are returned as "threads". A thread contains information about the current discussion of an issue, pull request, or commit.
Notifications are optimized for polling with the Last-Modified header. If there are no new notifications, you will see a 304 Not Modified response, leaving your current rate limit untouched. There is an X-Poll-Interval header that specifies how often (in seconds) you are allowed to poll. In times of high server load, the time may increase. Please obey the header.
# Add authentication to your requests
$ curl -I https://api.github.com/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 https://api.github.com/notifications
$ -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
> HTTP/2 304
> X-Poll-Interval: 60
These GET endpoints return a reason key. These reasons correspond to events that trigger a notification.
There are a few potential reasons for receiving a notification.
| Reason Name | Description |
|---|---|
agent_session_finished |
A Copilot cloud agent session finished. |
approval_requested |
You were requested to review and approve a deployment. For more information, see Reviewing deployments. |
assign |
You were assigned to the issue. |
author |
You created the thread. |
ci_activity |
A GitHub Actions workflow run that you triggered was completed. |
comment |
You commented on the thread. |
invitation |
You accepted an invitation to contribute to the repository. |
manual |
You subscribed to the thread (via an issue or pull request). |
member_feature_requested |
Organization members have requested to enable a feature such as Copilot. |
mention |
You were specifically @mentioned in the content. |
review_requested |
You, or a team you're a member of, were requested to review a pull request. |
security_advisory_credit |
You were credited for contributing to a security advisory. |
security_alert |
GitHub discovered a security vulnerability in your repository. |
state_change |
You changed the thread state (for example, closing an issue or merging a pull request). |
subscribed |
You're watching the repository. |
team_mention |
You were on a team that was mentioned. |
Note that the reason is modified on a per-thread basis, and can change, if the reason on a later notification is different.
For example, if you are the author of an issue, subsequent notifications on that issue will have a reason of author. If you're then @mentioned on the same issue, the notifications you fetch thereafter will have a reason of mention. The reason remains as mention, regardless of whether you're ever mentioned again.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /notifications
List all notifications for the current user, sorted by most recently updated.
accept (string)application/vnd.github+json is recommended.all (boolean)
If true, show notifications marked as read.
Default: false
participating (boolean)
If true, only shows notifications in which the user is directly participating or mentioned.
Default: false
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
before (string)
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
per_page (integer)
The number of results per page (max 50). For more information, see "Using pagination in the REST API."
Default: 50
200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/notifications
Response schema (Status: 200):
Array of Thread:
id: required, stringrepository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringprivate: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objectcustom_properties: object, additional properties allowedsubject: required, object:
title: required, stringurl: required, stringlatest_comment_url: required, stringtype: required, stringreason: required, stringunread: required, booleanupdated_at: required, stringlast_read_at: required, string or nullurl: required, stringsubscription_url: required, stringPUT /notifications
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 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.
accept (string)application/vnd.github+json is recommended.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: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
read (boolean)
Whether the notification has been read.
202 - Accepted
205 - Reset Content
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X PUT \
https://api.github.com/notifications \
-d '{
"last_read_at": "2022-06-10T00:00:00Z",
"read": true
}'
Response schema (Status: 202):
message: stringGET /notifications/threads/{thread_id}
Gets information about a notification thread.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X GET \
https://api.github.com/notifications/threads/THREAD_ID
Response schema (Status: 200):
id: required, stringrepository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringprivate: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objects:
reviewer_id: required, integerreviewer_type: required, string, enum: TEAM, ROLEmode: string, enum: ALWAYS, EXEMPT, default: "ALWAYS"custom_properties: object, additional properties allowedsubject: required, object:
title: required, stringurl: required, stringlatest_comment_url: required, stringtype: required, stringreason: required, stringunread: required, booleanupdated_at: required, stringlast_read_at: required, string or nullurl: required, stringsubscription_url: required, stringPATCH /notifications/threads/{thread_id}
Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)205 - Reset Content
304 - Not modified
403 - Forbidden
Request:
curl -L \
-X PATCH \
https://api.github.com/notifications/threads/THREAD_ID
Response schema (Status: 205):
DELETE /notifications/threads/{thread_id}
Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)Request:
curl -L \
-X DELETE \
https://api.github.com/notifications/threads/THREAD_ID
Response schema (Status: 204):
GET /notifications/threads/{thread_id}/subscription
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.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X GET \
https://api.github.com/notifications/threads/THREAD_ID/subscription
Response schema (Status: 200):
subscribed: required, booleanignored: required, booleanreason: required, string or nullcreated_at: required, string or null, format: date-timeurl: required, string, format: urithread_url: string, format: urirepository_url: string, format: uriPUT /notifications/threads/{thread_id}/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.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)ignored (boolean)false200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X PUT \
https://api.github.com/notifications/threads/THREAD_ID/subscription \
-d '{
"ignored": false
}'
Response schema (Status: 200):
Same response schema as Get a thread subscription for the authenticated user.
DELETE /notifications/threads/{thread_id}/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.
accept (string)application/vnd.github+json is recommended.thread_id (integer) (required)204 - No Content
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X DELETE \
https://api.github.com/notifications/threads/THREAD_ID/subscription
Response schema (Status: 204):
GET /repos/{owner}/{repo}/notifications
Lists all notifications for the current user in the specified repository.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
all (boolean)
If true, show notifications marked as read.
Default: false
participating (boolean)
If true, only shows notifications in which the user is directly participating or mentioned.
Default: false
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
before (string)
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/notifications
Response schema (Status: 200):
Same response schema as List notifications for the authenticated user.
PUT /repos/{owner}/{repo}/notifications
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 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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
last_read_at (string)202 - Accepted
205 - Reset Content
Request:
curl -L \
-X PUT \
https://api.github.com/repos/OWNER/REPO/notifications \
-d '{
"last_read_at": "2019-01-01T00:00:00Z"
}'
Response schema (Status: 202):
message: stringurl: string