Skip to content

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 given user, you will see private events. Otherwise, you’ll only see public events.

[!NOTE] This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.

API method documentation

username
required
string

The handle for the GitHub user account.

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>
Event

Event

object
id
required
string
type
required
string
nullable
actor
required
Actor

Actor

object
id
required
integer
login
required
string
display_login
string
gravatar_id
required
string
nullable
url
required
string format: uri
avatar_url
required
string format: uri
repo
required
object
id
required
integer
name
required
string
url
required
string format: uri
org
Actor

Actor

object
id
required
integer
login
required
string
display_login
string
gravatar_id
required
string
nullable
url
required
string format: uri
avatar_url
required
string format: uri
payload
required
One of:
CreateEvent
object
ref
required
string
ref_type
required
string
full_ref
required
string
master_branch
required
string
description
string
nullable
pusher_type
required
string
public
required
boolean
created_at
required
string format: date-time
nullable
Examples
Example default
[
{
"id": "22249084964",
"type": "PushEvent",
"actor": {
"id": 583231,
"login": "octocat",
"display_login": "octocat",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
},
"repo": {
"id": 1296269,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"payload": {
"repository_id": 1296269,
"push_id": 10115855396,
"ref": "refs/heads/master",
"head": "7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300",
"before": "883efe034920928c47fe18598c01249d1a9fdabd"
},
"public": true,
"created_at": "2022-06-09T12:47:28Z"
},
{
"id": "22196946742",
"type": "CreateEvent",
"actor": {
"id": 583231,
"login": "octocat",
"display_login": "octocat",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
},
"repo": {
"id": 1296269,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"payload": {
"ref": "master",
"ref_type": "repository",
"full_ref": "refs/heads/master",
"master_branch": "master",
"description": null,
"pusher_type": "user"
},
"public": false,
"created_at": "2022-06-07T07:50:26Z"
}
]