GitHub v3 REST API

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
 

List public organization events

get
{protocol}://{hostname}/api/v3/orgs/{org}/events

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

Event

idstringrequired
typestring | nullrequired
actorobjectrequired

Actor

Show Child Parameters
repoobjectrequired
Show Child Parameters
orgobject

Actor

Show Child Parameters
payloadobjectrequired
Show Child Parameters
publicbooleanrequired
created_atstring | null(date-time)required
get/orgs/{org}/events
 
200 application/json

List repository events

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/events

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

200 application/json

Response

Event

idstringrequired
typestring | nullrequired
actorobjectrequired

Actor

Show Child Parameters
repoobjectrequired
Show Child Parameters
orgobject

Actor

Show Child Parameters
payloadobjectrequired
Show Child Parameters
publicbooleanrequired
created_atstring | null(date-time)required
get/repos/{owner}/{repo}/events
 
200 application/json