Receive GitLab webhook
POST
/webhooks/gitlab/{webhookId}Signed request
Proven by Standard Webhooks headers or X-Gitlab-Token, not by a session.
POST /webhooks/gitlab/{webhookId} needs no session or CSRF token, and ReleaseFlow proves the delivery with that source's own secret before it reads the payload. Which check applies is chosen when the source is connected:
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
webhookId | string | Required |
Headers
| Name | Type | Required | Notes |
|---|---|---|---|
webhook-id | string | Optional | |
webhook-timestamp | string | Optional | |
webhook-signature | string | Optional | |
X-Gitlab-Token | string | Optional | |
X-Gitlab-Event | string | Optional | |
X-Gitlab-Event-UUID | string | Optional |
Request body
application/json · The body is optional.
The provider’s JSON payload, exactly as it was signed.
Response
Success: 200
| Field | Type | Required | Notes |
|---|---|---|---|
outcome | string | Optional |
Errors
| Status | Code | Applies to |
|---|---|---|
400 | invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUID | Any endpoint |
404 | not_foundno such address | Any endpoint |
405 | method_not_allowedthe address does not take that method | Any endpoint |
415 | unsupported_media_typethe address does not read a body of that type | Any endpoint |
500 | internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind it | Any endpoint |
400 | webhook_payload_malformed | Webhooks area |
401 | webhook_signature_invalid | Webhooks area |
413 | webhook_payload_too_large | Webhooks area |
422 | webhook_repository_mismatch | Webhooks area |
Request
bash
# Sign the exact bytes of payload.json with the webhook secret (see the guide).
curl -X POST "http://localhost:8080/webhooks/gitlab/$WEBHOOK_ID" \
-H "webhook-id: $WEBHOOK_ID" \
-H "webhook-timestamp: $WEBHOOK_TIMESTAMP" \
-H "webhook-signature: $WEBHOOK_SIGNATURE" \
-H "X-Gitlab-Token: $X_GITLAB_TOKEN" \
-H "X-Gitlab-Event: $X_GITLAB_EVENT" \
-H "X-Gitlab-Event-UUID: $X_GITLAB_EVENT_UUID" \
-H "Content-Type: application/json" \
--data-binary @payload.json
Response
200Example
{
"outcome": "<string>"
}