Skip to content

Mark repository notifications as read

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.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media type application/json
object
last_read_at

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.

string format: date-time
Examples
Example default
{
"last_read_at": "2019-01-01T00:00:00Z"
}

Response

Media type application/json
object
message
string
url
string
Examples
Example default
{
"message": "Unread notifications couldn't be marked in a single request. Notifications are being marked as read in the background."
}

Reset Content