v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-03-2585861610.1 MB
activity

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/notifications/threads/{thread_id}/subscription

Path parameters

thread_idinteger required

The unique identifier of the notification thread. This corresponds to the value returned in the id field when you retrieve notifications (for example with the GET /notifications operation).

Request body

ignoredboolean

Whether to block all notifications from a thread.

Response

Response

subscribedboolean required
ignoredboolean required
reasonstring nullable required
created_atstring date-time nullable required
urlstring uri required
thread_urlstring uri
repository_urlstring uri

Example response

{
  "subscribed": true,
  "created_at": "2012-10-06T21:34:12Z",
  "url": "https://api.github.com/notifications/threads/1/subscription",
  "thread_url": "https://api.github.com/notifications/threads/1",
  "repository_url": "https://api.github.com/repos/1"
}