GitHub v3 REST API

Get a thread

get
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

application/json

Response

Thread

Thread

idstringrequired
repositoryobjectrequired

Minimal Repository

Show Child Parameters
subjectobjectrequired
Show Child Parameters
reasonstringrequired
unreadbooleanrequired
updated_atstringrequired
last_read_atstring | nullrequired
urlstringrequired
subscription_urlstringrequired

Example:https://api.github.com/notifications/threads/2/subscription

get/notifications/threads/{thread_id}
 
application/json

Mark a thread as read

patch
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

Reset Content

patch/notifications/threads/{thread_id}
 

Get 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.

get
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}/subscription

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

application/json

Response

Thread Subscription

Thread Subscription

subscribedbooleanrequired

Example:true

ignoredbooleanrequired
reasonstring | nullrequired
created_atstring | null(date-time)required

Example:2012-10-06T21:34:12Z

urlstring(uri)required

Example:https://api.github.com/notifications/threads/1/subscription

thread_urlstring(uri)

Example:https://api.github.com/notifications/threads/1

repository_urlstring(uri)

Example:https://api.github.com/repos/1

get/notifications/threads/{thread_id}/subscription
 
application/json

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.

put
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}/subscription

Path Parameters

thread_idintegerrequired

thread_id parameter

Body

application/json
ignoredboolean

Whether to block all notifications from a thread.

Default:false

Response

application/json

Response

Thread Subscription

Thread Subscription

subscribedbooleanrequired

Example:true

ignoredbooleanrequired
reasonstring | nullrequired
created_atstring | null(date-time)required

Example:2012-10-06T21:34:12Z

urlstring(uri)required

Example:https://api.github.com/notifications/threads/1/subscription

thread_urlstring(uri)

Example:https://api.github.com/notifications/threads/1

repository_urlstring(uri)

Example:https://api.github.com/repos/1

put/notifications/threads/{thread_id}/subscription

Body

{}
 
application/json

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.

delete
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}/subscription

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

Response

delete/notifications/threads/{thread_id}/subscription