BlogGitLab Webhooks

How to Test GitLab Webhooks

GitLab webhook events cover repository activity, merge requests, pipelines, and releases so your CI and deployment workflows stay in sync.

GitLab Official Webhook Docs

1. GitLab Webhook Events

GitLab can send the following webhook events to your endpoint:

push_events
tag_push_events
merge_requests_events
note_events
pipeline_events
job_events
deployment_events
release_events

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving GitLab webhooks for testing:

  1. Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
  2. Copy the URL (e.g., https://h.hookray.com/abc123).
  3. In your GitLab dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
  4. Select the events you want to receive (see list above).
  5. Trigger a test event — HookRay will show the incoming webhook in real-time.

3. Sample GitLab Webhook Payload

Here's an example of what a GitLab webhook payload looks like:

payload.json
{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "user": {
    "username": "devrel"
  },
  "project": {
    "path_with_namespace": "acme/hookray"
  },
  "object_attributes": {
    "iid": 81,
    "title": "Add webhook replay endpoint",
    "state": "opened"
  }
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. GitLab cannot reach localhost URLs — use HookRay's cloud URL instead.

Getting 400 or 500 errors?

HookRay accepts any payload and returns 200 OK by default, so the issue is likely on GitLab's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

GitLab signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.

5. Next Steps

  • Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
  • Enable smart parsing (Pro plan) to see GitLab-specific fields highlighted automatically
  • Check the GitLab webhook documentation for the complete event reference

Ready to test GitLab webhooks?

Get a free webhook URL in 5 seconds. No signup required.

Start Testing GitLab Webhooks — Free