/api/v1/webhooks (permission: webhooks.manage).
These are outbound events from Gecko to you, not the inbound
repository webhooks your Git provider sends to Gecko.
Event types
Create an endpoint
Verify signatures
Every delivery is signed so you can prove it came from Gecko and wasn’t tampered with. TheX-Gecko-Signature header has the form:
<t>.<body> with your endpoint
secret. Verify every delivery before acting on it:
1
Parse the header
Split on commas:
t is the delivery timestamp, v1 is the signature.2
Recompute the signature
Concatenate the timestamp, a period, and the raw request body, then
compute HMAC-SHA256 with your secret. Use the raw bytes; re-serializing
the JSON will change the signature.
3
Compare timing-safely and reject stale timestamps
Use a constant-time comparison, and reject deliveries older than a few
minutes to block replays.
Delivery and retries
- Respond with a
2xxquickly and process asynchronously; slow handlers get retried as failures. - Failed deliveries are retried with exponential backoff, up to 6 attempts.
- Deliveries can arrive out of order or, after a retry, more than once. Treat handlers as idempotent and use the event’s timestamp, not arrival order, when sequencing matters.
Rotate or revoke
- Pause or narrow:
PATCH /api/v1/webhooks/{id}to disable the endpoint or change its event list. - Revoke:
DELETE /api/v1/webhooks/{id}stops deliveries immediately. - Rotate the secret: create a new endpoint, point it at the same URL, verify both secrets during the cutover, then delete the old endpoint.
Troubleshooting
Endpoint creation is rejected
Endpoint creation is rejected
The URL must be public HTTPS. Loopback (
localhost, 127.0.0.1),
private ranges, link-local addresses, and internal hostnames are refused.
For local development, use a tunnel (for example ngrok) that gives you
a public HTTPS URL.Signatures never match
Signatures never match
Almost always a body problem, not a secret problem: verify against the
raw request bytes before any JSON parsing or re-encoding, and make
sure no proxy in front of your handler rewrites the body. Then confirm
you stored the secret from the create response, not an ID or the
endpoint’s URL.
Deliveries stopped arriving
Deliveries stopped arriving
Check that the endpoint still exists (
GET /api/v1/webhooks), that it
hasn’t been disabled, and that your handler returns 2xx fast enough.
An endpoint that fails all 6 attempts for a given event simply misses
that event; deliveries resume with the next one.See the Webhooks endpoint pages in the sidebar for the full CRUD
reference.