Skip to content

Instantly share code, notes, and snippets.

@clsource
Created October 26, 2025 18:05
Show Gist options
  • Select an option

  • Save clsource/309f96ca7f8ecc7772437c2f32bf67e5 to your computer and use it in GitHub Desktop.

Select an option

Save clsource/309f96ca7f8ecc7772437c2f32bf67e5 to your computer and use it in GitHub Desktop.
Github Notifications Mark All as Read

From an interaction with Github Support regarding phantom notifications (ones that I could not mark as read).

Using gh cli. Running the script to mark notifications as "read" is generally considered safe, as it does not remove the notification itself, only updates the status of the notification. Here is the script:

gh api \
  --method PUT \
  -H "Accept: application/vnd.github+json" \
  /notifications \
 -F read=true 

If you have a Personal Access Token (PAT), you can also use the following curl command to mark all of your notifications as read. Please note that in order to use the curl command, you will need to replace $TOKEN with your own PAT, which you can create here. Also note that the PAT must be the "classic" type. A "fine-grained PAT" will not work.

curl -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $TOKEN" \
https://api.github.com/notifications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment