GitHub v3 REST API

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
http://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
http://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
http://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
http://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

List repository notifications for the authenticated user

List all notifications for the current user.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/notifications

Query Parameters

allboolean

If true, show notifications marked as read.

Default:false

participatingboolean

If true, only shows notifications in which the user is directly participating or mentioned.

Default:false

sincestring(date-time)

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

beforestring(date-time)

Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

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

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/repos/{owner}/{repo}/notifications
 
200 application/json