GitLab push webhook payload example

GitLab · event: Push Hook · content type: application/json

This is a representative sample — fake IDs, real structure. To see a payload with your data, point the provider at a capture URL (button below).

See it live, not frozen

One click creates a free capture bin with this exact payload already in it — pretty-printed, headers inspectable, replayable to your own endpoint:

Then paste the bin's URL into GitLab's webhook settings to capture a real delivery. No signup.

Headers

content-type: application/json
x-gitlab-event: Push Hook
x-gitlab-token: your-secret-token-here
x-gitlab-instance: https://gitlab.example.com
x-gitlab-event-uuid: c2675c66-7e6e-4fe2-9ac3-288534ef34b9

Body

{
  "object_kind": "push",
  "event_name": "push",
  "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
  "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "ref": "refs/heads/main",
  "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "user_id": 4,
  "user_name": "John Smith",
  "user_username": "jsmith",
  "user_email": "john@example.com",
  "project_id": 15,
  "project": {
    "id": 15,
    "name": "diaspora",
    "default_branch": "main",
    "web_url": "https://gitlab.example.com/mike/diaspora",
    "path_with_namespace": "mike/diaspora",
    "namespace": "Mike"
  },
  "commits": [
    {
      "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "message": "fix partial clone handling\n",
      "title": "fix partial clone handling",
      "timestamp": "2026-08-29T00:00:00+00:00",
      "url": "https://gitlab.example.com/mike/diaspora/-/commit/da1560886d4f",
      "author": {
        "name": "John Smith",
        "email": "john@example.com"
      },
      "added": [
        "CHANGELOG"
      ],
      "modified": [
        "app/controllers/application_controller.rb"
      ],
      "removed": []
    }
  ],
  "total_commits_count": 1,
  "repository": {
    "name": "diaspora",
    "url": "git@gitlab.example.com:mike/diaspora.git",
    "homepage": "https://gitlab.example.com/mike/diaspora"
  }
}

Things that bite people

Send it yourself

Reproduce this delivery against any endpoint (your handler, a bin, staging):

$ curl -X POST https://your-endpoint.example/hook \
  -H 'content-type: application/json' \
  -H 'x-gitlab-event: Push Hook' \
  -H 'x-gitlab-token: your-secret-token-here' \
  -H 'x-gitlab-instance: https://gitlab.example.com' \
  -H 'x-gitlab-event-uuid: c2675c66-7e6e-4fe2-9ac3-288534ef34b9' \
 -d '{"object_kind":"push","event_name":"push","before":"95790bf891e76fee5e1747ab589903a6a1f80f22","after":"da1560886d4f094c3e6c9ef40349f7d38b5d27d7","ref":"refs/heads/main","checkout_sha":"da1560886d4f094c3e6c9ef40349f7d38b5d27d7","user_id":4,"user_name":"John Smith","user_username":"jsmith","user_email":"john@example.com","project_id":15,"project":{"id":15,"name":"diaspora","default_branch":"main","web_url":"https://gitlab.example.com/mike/diaspora","path_with_namespace":"mike/diaspora","namespace":"Mike"},"commits":[{"id":"da1560886d4f094c3e6c9ef40349f7d38b5d27d7","message":"fix partial clone handling\n","title":"fix partial clone handling","timestamp":"2026-08-29T00:00:00+00:00","url":"https://gitlab.example.com/mike/diaspora/-/commit/da1560886d4f","author":{"name":"John Smith","email":"john@example.com"},"added":["CHANGELOG"],"modified":["app/controllers/application_controller.rb"],"removed":[]}],"total_commits_count":1,"repository":{"name":"diaspora","url":"git@gitlab.example.com:mike/diaspora.git","homepage":"https://gitlab.example.com/mike/diaspora"}}'

← All payload examples · Related guide · Signature debugger · Docs