Webhooks

Webhook Setup

You set your status update and ETA webhook URLs on your API integration in the web app, when you create it or later from its page. See Authentication for how to create an integration. booking and job_update webhooks go to separate URLs that our team sets up for you on request.

Delivery and retries

We count a webhook as delivered when your endpoint responds with 200, 201, 202 or 204. We don't currently retry failed webhooks. If your endpoint rejects a webhook, times out or is unavailable, that webhook is not sent again. Use GET /jobs/{job_id} to get the current state of a job if you think you missed an update.

Disabling an API integration stops API requests with its keys, but webhooks for jobs already booked on it are still sent.

Webhook Headers

Every webhook is a POST with a JSON body and these headers:

HeaderValue
Content-Typeapplication/json
Acceptapplication/json
User-AgentGophr-Webhook/1.0
X-Gophr-Webhooktrue
X-Gophr-EventThe type of event: status, eta, booking or job_update
X-Gophr-Config-Public-ReferenceThe public reference of the API integration the job belongs to, e.g. apiconfig_01k9zqv3m8f6t2h4c7r5w0x1yd
X-Gophr-TimestampWhen the webhook was signed, in Unix seconds (see Webhook Security)
X-Gophr-SignatureThe webhook's signature (see Webhook Security)

Webhooks never contain your API key. If our team has set up custom headers for your integration, those are sent too.

HTTP header names are case-insensitive, so read them without depending on their case.

Identifying the API integration

If you have more than one API integration sending webhooks to the same URL, use the X-Gophr-Config-Public-Reference header to tell which integration a webhook belongs to. The public reference identifies the integration but is not a secret, so it is safe to log and store. You can find it on the API integration's page in the web app.

Webhook Security

Every webhook is signed with your integration's webhook signing secret, in the X-Gophr-Timestamp and X-Gophr-Signature headers. Check the signature before you trust a webhook: see Webhook Signature Verification for how. Below is an example request (the signature is illustrative):

curl --request POST \
  --url https://example.com/your-status-update-webhook-url \
  --header 'X-Gophr-Timestamp: 1764230400' \
  --header 'X-Gophr-Signature: v1=d2de7f926421291731f86fd63003b1e8220245c718335e89989a6a2e44c20363' \
  --header 'X-Gophr-Event: status' \
  --header 'X-Gophr-Config-Public-Reference: apiconfig_01k9zqv3m8f6t2h4c7r5w0x1yd' \
  --header 'Content-Type: application/json' \
  --data '{
  "job_id": "b8f0c1a2-3d4e-4f56-a7b8-9c0d1e2f3a4b",
  "delivery_id": "74afea12-24aa-44c7-a55b-b2dc2a9a02d3",
  "external_id": "12345",
  "pickup_eta": "2026-12-08T10:57:16+00:00",
  "delivery_eta": "2026-12-08T11:09:28+00:00",
  "courier_location_lat": "51.50700000",
  "courier_location_lng": "-0.10500000",
  "status": "EN_ROUTE",
  "leg_type": null,
  "price_net": { "amount": 11.91, "currency": "GBP" },
  "price_gross": { "amount": 14.29, "currency": "GBP" },
  "meta_data": [],
  "courier_name": "Alex",
  "courier_notes": null,
  "courier_mobile_number": "+447700900123",
  "cancellation_comment": null,
  "proof_of_pickup": [],
  "proof_of_delivery": [],
  "events": [
    { "timestamp": 1796727420, "status": "ACCEPTED_BY_COURIER" },
    { "timestamp": 1796727610, "status": "AT_PICKUP" },
    { "timestamp": 1796727790, "status": "EN_ROUTE" }
  ]
}'

See Status Update Webhook for more examples.

Testing Webhooks

Webhooks can be tested using our POST /jobs/{job_id}/deliveries/{delivery_id}/progress endpoint in sandbox. Hitting this endpoint will progress the delivery to the next status and cause the status update webhook to be fired. The API key needs the jobs:write scope.

If you wish to receive the webhook locally then we suggest using a tool like ngrok which will allow you to expose a public URL locally for the payload to be sent to. Then set that URL on your API integration in the web app.


Did this page help you?