Skip to main content

GitHub event types

For the GitHub Events API, learn about each event type, the triggering action on GitHub, and each event's unique properties.

The Events API can return different types of events triggered by activity on GitHub. Each event response contains shared properties, but has a unique payload object determined by its event type. The Event object common properties describes the properties shared by all events, and each event type describes the payload properties that are unique to the specific event.

Event object common properties

The event objects returned from the Events API endpoints have the same structure.

Event API attribute nameTypeDescription
idintegerUnique identifier for the event.
typestringThe type of event. Events uses PascalCase for the name.
actorobjectThe user that triggered the event.
actor.idintegerThe unique identifier for the actor.
actor.loginstringThe username of the actor.
actor.display_loginstringThe specific display format of the username.
actor.gravatar_idstringThe unique identifier of the Gravatar profile for the actor.
actor.urlstringThe REST API URL used to retrieve the user object, which includes additional user information.
actor.avatar_urlstringThe URL of the actor's profile image.
repoobjectThe repository object where the event occurred.
repo.idintegerThe unique identifier of the repository.
repo.namestringThe name of the repository, which includes the owner and repository name. For example, octocat/hello-world is the name of the hello-world repository owned by the octocat personal account.
repo.urlstringThe REST API URL used to retrieve the repository object, which includes additional repository information.
payloadobjectThe event payload object is unique to the event type. See the event type below for the event API payload object.
publicbooleanWhether the event is visible to all users.
created_atstringThe date and time when the event was triggered. It is formatted according to ISO 8601.
orgobjectThe organization that was chosen by the actor to perform action that triggers the event.
The property appears in the event object only if it is applicable.
org.idintegerThe unique identifier for the organization.
org.loginstringThe name of the organization.
org.gravatar_idstringThe unique identifier of the Gravatar profile for the organization.
org.urlstringThe REST API URL used to retrieve the organization object, which includes additional organization information.
org.avatar_urlstringThe URL of the organization's profile image.

Example WatchEvent event object

This example shows the format of the WatchEvent response when using the Events API.

HTTP/2 200
Link: <https://api.github.com/resource?page=2>; rel="next",
      <https://api.github.com/resource?page=5>; rel="last"
[
  {
    "id": "12345",
    "type": "WatchEvent",
    "actor": {
      "id": 1,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif"
    },
    "repo": {
      "id": 3,
      "name": "octocat/Hello-World",
      "url": "https://api.github.com/repos/octocat/Hello-World"
    },
    "payload": {
      "action": "started"
    },
    "public": false,
    "created_at": "2011-09-06T17:26:27Z",
    "org": {
      "id": 1,
      "login":