Skip to content

List repositories watched by the authenticated user

GET
/user/subscriptions

Lists repositories the authenticated user is watching.

API method documentation

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Array<object>
Minimal Repository

Minimal Repository

object
id
required
integer format: int64
node_id
required
string
name
required
string
full_name
required
string
owner
required
Simple User

A GitHub user.

object
name
string
nullable
email
string
nullable
login
required
string
id
required
integer format: int64
node_id
required
string
avatar_url
required
string format: uri
gravatar_id
required
string
nullable
url
required
string format: uri
html_url
required
string format: uri
followers_url
required
string format: uri
following_url
required
string
gists_url
required
string
starred_url
required
string
subscriptions_url
required
string format: uri
organizations_url
required
string format: uri
repos_url
required
string format: uri
events_url
required
string
received_events_url
required
string format: uri
type
required
string
site_admin
required
boolean
starred_at
string
user_view_type
string
private
required
boolean
html_url
required
string format: uri
description
required
string
nullable
fork
required
boolean
url
required
string format: uri
archive_url
required
string
assignees_url
required
string
blobs_url
required
string
branches_url
required
string
collaborators_url
required
string
comments_url
required
string
commits_url
required
string
compare_url
required
string
contents_url
required
string
contributors_url
required
string format: uri
deployments_url
required
string format: uri
downloads_url
required
string format: uri
events_url
required
string format: uri
forks_url
required
string format: uri
git_commits_url
required
string
git_refs_url
required
string
git_tags_url
required
string
git_url
string
issue_comment_url
required
string
issue_events_url
required
string
issues_url
required
string
keys_url
required
string
labels_url
required
string
languages_url
required
string format: uri
merges_url
required
string format: uri
milestones_url
required
string
notifications_url
required
string
pulls_url
required
string
releases_url
required
string
ssh_url
string
stargazers_url
required
string format: uri
statuses_url
required
string
subscribers_url
required
string format: uri
subscription_url
required
string format: uri
tags_url
required
string format: uri
teams_url
required
string format: uri
trees_url
required
string
clone_url
string
mirror_url
string
nullable
hooks_url
required
string format: uri
svn_url
string
homepage
string
nullable
language
string
nullable
forks_count
integer
stargazers_count
integer
watchers_count
integer
size

The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.

integer
default_branch
string
open_issues_count
integer
is_template
boolean
topics
Array<string>
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
has_discussions
boolean
has_pull_requests
boolean
pull_request_creation_policy

The policy controlling who can create pull requests: all or collaborators_only.

string
Allowed values: all collaborators_only
archived
boolean
disabled
boolean
visibility
string
pushed_at
string format: date-time
nullable
created_at
string format: date-time
nullable
updated_at
string format: date-time
nullable
permissions
object
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
role_name
string
temp_clone_token
string
delete_branch_on_merge
boolean
subscribers_count
integer
network_count
integer
code_of_conduct
Code Of Conduct

Code Of Conduct

object
key
required
string
name
required
string
url
required
string format: uri
body
string
html_url
required
string format: uri
nullable
license
object
key
string
name
string
spdx_id
string
url
string
nullable
node_id
string
forks
integer
open_issues
integer
watchers
integer
allow_forking
boolean
web_commit_signoff_required
boolean
security_and_analysis
object
advanced_security

Enable or disable GitHub Advanced Security for the repository.

For standalone Code Scanning or Secret Protection products, this parameter cannot be used.

object
status
string
Allowed values: enabled disabled
code_security
object
status
string
Allowed values: enabled disabled
dependabot_security_updates

Enable or disable Dependabot security updates for the repository.

object
status

The enablement status of Dependabot security updates for the repository.

string
Allowed values: enabled disabled
secret_scanning
object
status
string
Allowed values: enabled disabled
secret_scanning_push_protection
object
status
string
Allowed values: enabled disabled
secret_scanning_non_provider_patterns
object
status
string
Allowed values: enabled disabled
secret_scanning_ai_detection
object
status
string
Allowed values: enabled disabled
secret_scanning_delegated_alert_dismissal
object
status
string
Allowed values: enabled disabled
secret_scanning_delegated_bypass
object
status
string
Allowed values: enabled disabled
secret_scanning_delegated_bypass_options
object
reviewers

The bypass reviewers for secret scanning delegated bypass

Array<object>
object
reviewer_id
required

The ID of the team or role selected as a bypass reviewer

integer
reviewer_type
required

The type of the bypass reviewer

string
Allowed values: TEAM ROLE
mode

The bypass mode for the reviewer

string
default: ALWAYS
Allowed values: ALWAYS EXEMPT
custom_properties

The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.

object
key
additional properties
any
Examples
Example default
[
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"has_discussions": false,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"security_and_analysis": {
"advanced_security": {
"status": "enabled"
},
"secret_scanning": {
"status": "enabled"
},
"secret_scanning_push_protection": {
"status": "disabled"
},
"secret_scanning_non_provider_patterns": {
"status": "disabled"
},
"secret_scanning_delegated_alert_dismissal": {
"status": "disabled"
}
}
}
]
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"

Not modified

Requires authentication

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}