GitHub Push Event Payload Example
A complete GitHub push webhook payload with X-GitHub-Event, X-Hub-Signature-256, and a cURL example for a live inspector.
“github push event payload” is the JSON GitHub POSTs when someone pushes commits. This page shows the fields most handlers actually read, the delivery headers, and how the HMAC is computed.
Inspector URL:
https://hooks.openwebhook.co/YOUR_UUID/github
In the repository: Settings → Webhooks → Add webhook. Content type application/json. Secret optional but recommended. Open the free inspector first so the URL exists.
Headers
POST /github HTTP/1.1
Host: hooks.openwebhook.co
Content-Type: application/json
X-GitHub-Event: push
X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
X-GitHub-Hook-ID: 292430182
X-Hub-Signature-256: sha256=a8b7c6d5e4f30219876543210fedcba9876543210fedcba9876543210fedcba9
User-Agent: GitHub-Hookshot/a1b2c3d
X-GitHub-Event is push for this payload. Other events reuse the same delivery headers with a different event name (pull_request, issues, ping).
X-Hub-Signature-256 is sha256= plus hex HMAC-SHA256 of the raw body with the webhook secret. GitHub may also send the older X-Hub-Signature (sha1=). Prefer 256.
A ping event is sent when you save the webhook. It has no commits; use it only to confirm reachability.
Push payload
{
"ref": "refs/heads/main",
"before": "0000000000000000000000000000000000000000",
"after": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"repository": {
"id": 1296269,
"name": "hello-world",
"full_name": "octocat/hello-world",
"private": false,
"html_url": "https://github.com/octocat/hello-world",
"default_branch": "main"
},
"pusher": {
"name": "octocat",
"email": "octocat@github.com"
},
"sender": {
"login": "octocat",
"id": 1,
"type": "User"
},
"created": false,
"deleted": false,
"forced": false,
"compare": "https://github.com/octocat/hello-world/compare/0000000...6dcb09b",
"commits": [
{
"id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"tree_id": "f9dfba5ddbc0c3e2a1b2c3d4e5f60718293a4b5c",
"distinct": true,
"message": "Fix webhook signature verification",
"timestamp": "2026-09-08T09:15:00+02:00",
"url": "https://github.com/octocat/hello-world/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"author": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"username": "octocat"
},
"added": ["src/webhooks.ts"],
"removed": [],
"modified": ["README.md"]
}
],
"head_commit": {
"id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"message": "Fix webhook signature verification"
}
}
Branch name is ref without refs/heads/. Empty commits can still happen on a force-push of the same tree; use after and forced.
cURL fixture
curl -X POST \
'https://hooks.openwebhook.co/YOUR_UUID/github' \
-H 'content-type: application/json' \
-H 'x-github-event: push' \
-H 'x-github-delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958' \
-H 'x-hub-signature-256: sha256=test' \
--data-binary '{"ref":"refs/heads/main","after":"6dcb09b5b57875f334f61aebed695e2e4193db5e","commits":[{"id":"6dcb09b5b57875f334f61aebed695e2e4193db5e","message":"Fix webhook signature verification"}]}'
Forward that slug to localhost with the CLI if your CI handler already listens on a port.