REST API endpoints for watching

Use the REST API to subscribe to notifications for activity in a repository.

About watching

You can use the REST API to subscribe to notifications for activity in a repository. To bookmark a repository instead, see REST API endpoints for starring.

Watching versus starring

In August 2012, we changed the way watching
works
on GitHub. Some API
client applications may still be using the original "watcher" endpoints for accessing
this data. You should now use the "star" endpoints instead. For more information, REST API endpoints for starring and the changelog post.

In responses from the REST API, subscribers_count corresponds to the number of watchers, whereas watchers, watchers_count, and stargazers_count correspond to the number of users that have starred a repository.

New access restrictions

In July 2026, to ensure responsible use of this data and to protect users from misuse, we are introducing new access restrictions to several public API endpoints related to watching. Access to the subscribers and subscriptions listing endpoints will be limited to admins and collaborators, and the endpoint that lists repositories watched by a user is being deprecated. During the deprecation period, the endpoint will remain available but will return empty responses, and it will be fully removed in a later phase. For more information, see the changelog post.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List watchers

GET /repos/{owner}/{repo}/subscribers

Lists the people watching the specified repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/subscribers

Response schema (Status: 200):

Array of Simple User:

Get a repository subscription

GET /repos/{owner}/{repo}/subscription

Gets information about whether the authenticated user is subscribed to the repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/subscription

Response schema (Status: 200):

Set a repository subscription

PUT /repos/{owner}/{repo}/subscription

If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/repos/OWNER/REPO/subscription \
  -d '{
  "subscribed": true,
  "ignored": false
}'

Response schema (Status: 200):

Same response schema as Get a repository subscription.

Delete a repository subscription

DELETE /repos/{owner}/{repo}/subscription

This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository's subscription manually.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/repos/OWNER/REPO/subscription

Response schema (Status: 204):

List repositories watched by the authenticated user

GET /user/subscriptions

Lists repositories the authenticated user is watching.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/subscriptions

Response schema (Status: 200):

Array of Minimal Repository:

List repositories watched by a user

GET /users/{username}/subscriptions

Lists repositories a user is watching.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/subscriptions

Response schema (Status: 200):

Same response schema as List repositories watched by the authenticated user.