Skip to main content

Configuring Webhooks

Webhook configurations are managed through the Webhook API, at https://webhooks.wing.eu. Every request is authenticated with your API token. A configuration always belongs to the organization of that token.

Creating a Webhook Configuration​

Use the Create endpoint:

curl -X POST https://webhooks.wing.eu/config \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Webhook",
"subscribedEvents": ["order.packed", "parcel.updated"],
"dispatchConfig": {
"type": "restConfig",
"endpoint": "https://your-domain.com/webhooks",
"customHeaders": { "X-Client-Id": "my-service" }
}
}'
  • name: unique within your organization.
  • subscribedEvents: at least one event type, from the available events.
  • dispatchConfig: where events are sent. With restConfig, endpoint is the URL that receives the POST requests, and the optional customHeaders are added to every request, for example to authenticate Wing on your side.
  • status (optional): ACTIVE (default) or INACTIVE.

A configuration that duplicates an existing one (same endpoint and headers, with an overlapping event) is rejected.

Managing Webhook Configurations​

ActionRequest
ListGET /config
Get oneGET /config/{id}
Update (partial)PUT /config/{id}
DeleteDELETE /config/{id}

The request and response bodies are detailed in the API Reference section.

Delivery and Retries​

Each event is sent as a POST request with a JSON body (see Request Body) and a Content-Type: application/json header, plus your custom headers.

  • Any 2xx answer acknowledges the event.
  • A non-2xx answer is retried up to 5 times, roughly 5 minutes, 10 minutes, 20 minutes, 6 hours and 6 hours after the previous attempt.
  • A request that cannot reach your endpoint at all (DNS, TLS or connection error) is not retried.
  • Once all retries are exhausted, or if your endpoint cannot be reached during a retry, the webhook configuration is deactivated. Set its status back to ACTIVE once your endpoint is fixed.

Replaying Events​

Retry sends again every event of your organization emitted in a time window (from and to, Unix timestamps in seconds, 24 hours at most):

curl -X POST "https://webhooks.wing.eu/retry/history?from=1759920000&to=1759963200" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Endpoint Requirements​

  • A publicly reachable HTTPS URL.
  • Answer quickly with a 2xx status code, and defer any long processing.
  • Be idempotent: the same event can be delivered more than once (retries, replays).