← All tags

Activity API Reference

Activity APIs provide access to notifications, subscriptions, and timelines.

32 endpoints tagged activity, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List public events

GET /events

Parameters

NameInRequiredDescription
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
503Service unavailableyes

Get feeds

GET /feeds

Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.

Parameters

No parameters.

Responses

StatusDescriptionHas JSON body
200Responseyes

List public events for a network of repositories

GET /networks/{owner}/{repo}/events

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
403Forbiddenyes
304Not modifiedno
301Moved permanentlyyes

List notifications for the authenticated user

GET /notifications

List all notifications for the current user, sorted by most recently updated.

Parameters

NameInRequiredDescription
allquerynoIf true, show notifications marked as read.
participatingquerynoIf true, only shows notifications in which the user is directly participating or mentioned.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
beforequerynoOnly show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of results per page (max 50). For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes
422Validation failed, or the endpoint has been spammed.yes

Mark notifications as read

PUT /notifications

Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.

Parameters

No parameters.

Responses

StatusDescriptionHas JSON body
202Responseyes
205Reset Contentno
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

Get a thread

GET /notifications/threads/{thread_id}

Gets information about a notification thread.

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

Mark a thread as read

PATCH /notifications/threads/{thread_id}

Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
205Reset Contentno
304Not modifiedno
403Forbiddenyes

Mark a thread as done

DELETE /notifications/threads/{thread_id}

Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
204No contentno

Get a thread subscription for the authenticated user

GET /notifications/threads/{thread_id}/subscription

This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

Set a thread subscription

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

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

Delete a thread subscription

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

Parameters

NameInRequiredDescription
thread_idpathyesThe 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).

Responses

StatusDescriptionHas JSON body
204Responseno
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

List public organization events

GET /orgs/{org}/events

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repository events

GET /repos/{owner}/{repo}/events

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repository notifications for the authenticated user

GET /repos/{owner}/{repo}/notifications

Lists all notifications for the current user in the specified repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
allquerynoIf true, show notifications marked as read.
participatingquerynoIf true, only shows notifications in which the user is directly participating or mentioned.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
beforequerynoOnly show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Mark repository notifications as read

PUT /repos/{owner}/{repo}/notifications

Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
202Responseyes
205Reset Contentno

List stargazers

GET /repos/{owner}/{repo}/stargazers

Lists the people that have starred the repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes

List watchers

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

Lists the people watching the specified repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a repository subscription

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

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200if you subscribe to the repositoryyes
404Not Found if you don't subscribe to the repositoryno
403Forbiddenyes

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

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

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

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

List repositories starred by the authenticated user

GET /user/starred

Lists repositories the authenticated user has starred.

Parameters

NameInRequiredDescription
sortquerynoThe property to sort the results by. created means when the repository was starred. updated means when the repository was last pushed to.
directionquerynoThe direction to sort the results by.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

Check if a repository is starred by the authenticated user

GET /user/starred/{owner}/{repo}

Whether the authenticated user has starred the repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Response if this repository is starred by youno
404Not Found if this repository is not starred by youyes
401Requires authenticationyes
304Not modifiedno
403Forbiddenyes

Star a repository for the authenticated user

PUT /user/starred/{owner}/{repo}

Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP method."

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes
401Requires authenticationyes
304Not modifiedno

Unstar a repository for the authenticated user

DELETE /user/starred/{owner}/{repo}

Unstar a repository that the authenticated user has previously starred.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
404Resource not foundyes
401Requires authenticationyes
304Not modifiedno
403Forbiddenyes

List repositories watched by the authenticated user

GET /user/subscriptions

Lists repositories the authenticated user is watching.

Parameters

NameInRequiredDescription
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
304Not modifiedno
403Forbiddenyes
401Requires authenticationyes

List events for the authenticated user

GET /users/{username}/events

If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List organization events for the authenticated user

GET /users/{username}/events/orgs/{org}

This is the user's organization dashboard. You must be authenticated as the user to view this.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List public events for a user

GET /users/{username}/events/public

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List events received by the authenticated user

GET /users/{username}/received_events

These are events that you've received by watching repositories and following users. If you are authenticated as the

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List public events received by a user

GET /users/{username}/received_events/public

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repositories starred by a user

GET /users/{username}/starred

Lists repositories a user has starred.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
sortquerynoThe property to sort the results by. created means when the repository was starred. updated means when the repository was last pushed to.
directionquerynoThe direction to sort the results by.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repositories watched by a user

GET /users/{username}/subscriptions

Lists repositories a user is watching.

Parameters

NameInRequiredDescription
usernamepathyesThe handle for the GitHub user account.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes