To get event data, you can use a GitHub action to print the event to the log.

# change this to the event type you want to get the data for
on:
  pull_request:
    types: [opened, closed, reopened]

jobs:
  printJob:    
    name: Print event
    runs-on: ubuntu-latest
    steps:
    - name: Dump GitHub context
      env:
        GITHUB_CONTEXT: ${{ toJson(github) }}
      run: |
        echo "$GITHUB_CONTEXT"

Alternatively, you can find example event data in the documentation: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#webhook-payload-example-30

Answer from riQQ on Stack Overflow
🌐
GitHub
docs.github.com › en › webhooks › webhook-events-and-payloads
Webhook events and payloads - GitHub Docs
HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers: X-GitHub-Hook-ID: The unique identifier of the webhook. X-GitHub-Event: The name of the event that triggered the delivery.
🌐
GitHub
docs.github.com › en › rest › using-the-rest-api › github-event-types
GitHub event types - GitHub Docs
September 6, 2011 - Each event object includes a payload property and the value is unique to each event type. The payload object for this event is described below. Activity related to an issue or pull request comment.
🌐
GitHub
github.blog › home › changelogs › upcoming changes to github events api payloads
Upcoming changes to GitHub Events API payloads - GitHub Changelog
August 13, 2025 - Smaller payloads: We’ll be trimming unnecessary fields from several event types, most notably pull request and push events. While some detailed information will no longer be included directly in GitHub Activity Events API responses, we’ll continue to provide the necessary identifiers (such as relevant ID numbers) so you can retrieve those details through the standard REST API.
🌐
GitHub
github.blog › home › changelogs › changes in github actions push event payload
Changes in GitHub Actions push event payload - GitHub Changelog
March 22, 2025 - GitHub Actions are triggered by webhook events. The original payload of the event is stored in a file that actions can read at workflow/event.json (see the docs). We’ve made a slight change to the payload for push events in Actions.
🌐
GitHub
github.blog › home › changelogs › github actions: additional information available in github.event payload for scheduled workflow runs
GitHub Actions: Additional information available in github.event payload for scheduled workflow runs - GitHub Changelog
March 22, 2025 - Additional information has been added to the payload of github.event for scheduled runs. Before this change, github.event for scheduled runs would only include the cron schedule. This change adds information…
🌐
Readthedocs
github-action-toolkit.readthedocs.io › en › latest › usage › event_payload.html
GitHub Event Payload - github-action-toolkit v0.9.0
The EventPayload class provides a typed interface for accessing GitHub Actions event data from workflow triggers like push, pull_request, release, and more.
🌐
GitHub
github.com › scottgonzalez › github-event-data
GitHub - scottgonzalez/github-event-data: Payload samples for GitHub events available via web hooks
This is a collection of sample payloads for the various events available via GitHub WebHooks.
Author   scottgonzalez
Find elsewhere
🌐
GitHub
github.com › github › docs › blob › main › content › webhooks › webhook-events-and-payloads.md
docs/content/webhooks/webhook-events-and-payloads.md at main · github/docs
The description of each webhook event lists the availability for that event. For more information, see AUTOTITLE. ... HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers: X-GitHub-Hook-ID: The unique identifier of the webhook.
Author   github
🌐
GitHub
docs.github.com › en › apps › creating-github-apps › writing-code-for-a-github-app › building-a-github-app-that-responds-to-webhook-events
Building a GitHub App that responds to webhook events - GitHub Docs
This sets up a webhook event listener. When your app receives a webhook event from GitHub with a X-GitHub-Event header value of pull_request and an action payload value of opened, it calls the handlePullRequestOpened event handler that is defined above.
🌐
GitHub
lab.github.com › docs › events
Building: Events as triggers | GitHub Learning Lab
A push event is sent to Learning Lab. The course uses the push payload to provide respond to the learner in the pull request for the branch.
🌐
GitHub
gist.github.com › walkingtospace › 0dcfe43116ca6481f129cdaa0e112dc4
Github push webhook event payload example · GitHub
Github push webhook event payload example. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
docs.github.com › en › enterprise-server@3.6 › webhooks › webhook-events-and-payloads
Webhook events and payloads - GitHub Enterprise Server 3.6 Docs
HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers: X-GitHub-Hook-ID: The unique identifier of the webhook. X-GitHub-Event: The name of the event that triggered the delivery.
🌐
GitHub
github.com › orgs › community › discussions › 125470
Passing a parameter from a github action to a github event payload · community · Discussion #125470
However, between step 3 and step 4, I lose the ability to pass parameters. I can use client_payload (https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch) to pass something INTO #3, but I can't pass anything from #3 (a workflow_run) to step #4 (a GHA payload).
🌐
GitHub
docs.github.com › en › actions › using-workflows › events-that-trigger-workflows
Events that trigger workflows - GitHub Docs
March 27, 2023 - More than one activity type triggers this event. For information about each activity type, see Webhook events and payloads. By default, all activity types trigger workflows that run on this event. You can limit your workflow runs to specific activity types using the types keyword.
🌐
AWS
docs.aws.amazon.com › aws codebuild › user guide › build projects › use webhooks with aws codebuild › github webhook events
GitHub webhook events - AWS CodeBuild
The webhook event type is in the X-GitHub-Event header in the webhook payload. In the X-GitHub-Event header, you might see pull_request or push. For a pull request event, the type is in the action field of the webhook event payload.
Top answer
1 of 1
1

The GitHub API provides no way to retrieve a particular event by its ID.

Each event has a payload inside of it. For example

{
    "actor": {
        "avatar_url": "https://avatars.githubusercontent.com/u/240830?",
        "display_login": "sigmavirus24",
        "gravatar_id": "",
        "id": 240830,
        "login": "sigmavirus24",
        "url": "https://api.github.com/users/sigmavirus24"
    },
    "created_at": "2017-01-27T23:50:12Z",
    "id": "5227100855",
    "org": {
        "avatar_url": "https://avatars.githubusercontent.com/u/1782156?",
        "gravatar_id": "",
        "id": 1782156,
        "login": "github3py",
        "url": "https://api.github.com/orgs/github3py"
    },
    "payload": {
        "before": "7d52c200d80d86f70fbda3e9ebf48060867f9f65",
        "commits": [
            {
                "author": {
                    "email": "[email protected]",
                    "name": "Ian Cordasco"
                },
                "distinct": true,
                "message": "Create test.txt",
                "sha": "a623ca5974523ec35fd83909dd99b220e498ef58",
                "url": "https://api.github.com/repos/github3py/delete_contents/commits/a623ca5974523ec35fd83909dd99b220e498ef58"
            }
        ],
        "distinct_size": 1,
        "head": "a623ca5974523ec35fd83909dd99b220e498ef58",
        "push_id": 1525269783,
        "ref": "refs/heads/master",
        "size": 1
    },
    "public": true,
    "repo": {
        "id": 50486230,
        "name": "github3py/delete_contents",
        "url": "https://api.github.com/repos/github3py/delete_contents"
    },
    "type": "PushEvent"
}

Is an event from a list after doing GET /orgs/github3py/events. If you look closely you'll see

    "payload": {
        "before": "7d52c200d80d86f70fbda3e9ebf48060867f9f65",
        "commits": [
            {
                "author": {
                    "email": "[email protected]",
                    "name": "Ian Cordasco"
                },
                "distinct": true,
                "message": "Create test.txt",
                "sha": "a623ca5974523ec35fd83909dd99b220e498ef58",
                "url": "https://api.github.com/repos/github3py/delete_contents/commits/a623ca5974523ec35fd83909dd99b220e498ef58"
            }
        ],
        "distinct_size": 1,
        "head": "a623ca5974523ec35fd83909dd99b220e498ef58",
        "push_id": 1525269783,
        "ref": "refs/heads/master",
        "size": 1
    },

Which is the payload from the event. That's the only way to get that payload (from listing events).

🌐
DeepWiki
deepwiki.com › hub4j › github-api › 6.1-event-payloads
Event Payloads | hub4j/github-api | DeepWiki
January 14, 2026 - Event payloads represent the structured data received from GitHub webhook events and the Events API. The library provides strongly-typed classes for parsing and accessing event data, with automatic relationship establishment between nested objects.
🌐
GitHub
docs2.lfe.io › webhooks
Webhooks | GitHub API
June 2, 2023 - In addition to the fields documented for each event, webhook payloads include the user who performed the event (sender) as well as the organization (organization) and/or repository (repository) which the event occurred on. HTTP requests made to your webhook’s configured URL endpoint will contain several special headers: Also, the User-Agent for the requests will have the prefix GitHub-Hookshot/.