API reference › Webhook endpoints
POST/webhook-endpoints
Register a webhook endpoint: IDS POSTs it your events, signed by Standard Webhooks (x-conventions.webhooks)
The endpoint receives every event this key reads in GET /events of the key's environment, from now on (eventTypes narrows it). The answer carries the signing secret (whsec_…) — this once: store it. The URL is checked now and before every attempt: https on port 443, a public host, never an internal network or IDS itself (422 WEBHOOK_URL_NOT_ALLOWED with details.reason). The same URL twice → 409 WEBHOOK_ENDPOINT_EXISTS (details.endpointId); too many → 409 WEBHOOK_ENDPOINT_LIMIT.
- Key scope
webhooks:manage- Idempotency-Key
- Not used
- URL
https://ids.express/api/v1/webhook-endpoints
Request body
Unknown fields are rejected (400 VALIDATION_FAILED, details[].path names the field).
application/json — WebhookEndpointRequest
urlstringrequiredlength ≤ 2048https://… on port 443, a public host (never an internal network or an address of IDS); no user, password or #fragment.
eventTypes[]array of stringnullableOnly these event types; absent, null or empty — every type (and every type IDS adds later).
descriptionstringnullablelength ≤ 200Your own note (≤ 200 characters) — no personal data.
Call it
curl -s -X POST "https://ids.express/api/v1/webhook-endpoints" \
-H "Authorization: Bearer $IDS_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "<url>"
}'Answers
201 { endpoint, secret } — the secret is shown only here
Headers: X-Request-Id
application/json — WebhookEndpointCreated
secretstringrequiredpattern ^whsec_[A-Za-z0-9+/]+=*$whsec_ + base64 — the Standard Webhooks signing secret. Shown only in this answer: store it now. IDS keeps it encrypted and never shows it again.
400 VALIDATION_FAILED — a field (details[0].path), an unknown field or event type
Headers: X-Request-Id
Codes: VALIDATION_FAILED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
401 AUTHENTICATION_FAILED — missing, malformed, invalid, revoked or expired key
Headers: X-Request-Id
Codes: AUTHENTICATION_FAILED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
403 API_ACCESS_DISABLED / API_ACCOUNT_DISABLED / API_KEY_IP_NOT_ALLOWED / API_TERMS_NOT_ACCEPTED / FORBIDDEN_SCOPE / API_OWNER_NOT_BILLABLE; a platform's key: PLATFORM_SUSPENDED (a quote, booking or test operation of a suspended platform) / PLATFORM_TARIFF_MISSING (a quote or booking before IDS set its tariff)
Headers: X-Request-Id
Codes: API_ACCESS_DISABLEDAPI_ACCOUNT_DISABLEDAPI_KEY_IP_NOT_ALLOWEDAPI_TERMS_NOT_ACCEPTEDFORBIDDEN_SCOPEAPI_OWNER_NOT_BILLABLEPLATFORM_SUSPENDEDPLATFORM_TARIFF_MISSING
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
409 WEBHOOK_ENDPOINT_EXISTS / WEBHOOK_ENDPOINT_LIMIT / WEBHOOK_ENDPOINT_DISABLED (an endpoint for this host switched off by IDS)
Headers: X-Request-Id
Codes: WEBHOOK_ENDPOINT_EXISTSWEBHOOK_ENDPOINT_LIMITWEBHOOK_ENDPOINT_DISABLED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
422 WEBHOOK_URL_NOT_ALLOWED
Headers: X-Request-Id
Codes: WEBHOOK_URL_NOT_ALLOWED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
429 RATE_LIMITED — per-key or per-IP limit exceeded; wait Retry-After seconds
Headers: X-Request-IdRetry-After
Codes: RATE_LIMITED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
500 INTERNAL_ERROR
Headers: X-Request-Id
Codes: INTERNAL_ERROR
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
503 API_DISABLED (API switched off) / WEBHOOKS_UNAVAILABLE (webhooks are being set up — retry later)
Headers: X-Request-Id
Codes: API_DISABLEDWEBHOOKS_UNAVAILABLE
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
Error codes of this operation
The codes the answers of this operation name. Always read error.retryable of the answer itself — «varies» means it differs per answer. The gates of every keyed request (401, 403, 429, 503) and the whole catalog: errors.
The request is invalid: a field (details[].path), an unknown field, a missing Idempotency-Key, a body that is not JSON, an address the label cannot print. Fix it; repeating it unchanged fails again.
AUTHENTICATION_FAILEDHTTP 401retryable: noMissing, malformed, invalid, revoked or expired key; an environment tag that does not match. (An account switched off answers 403 API_ACCOUNT_DISABLED since SEC.)
API_ACCESS_DISABLEDHTTP 403retryable: noAPI access is switched off for this account.
API_ACCOUNT_DISABLEDHTTP 403retryable: noThe IDS account of this key is switched off, not approved or closed (for an employee's key: its franchise owner's account) — the key stops with it; contact IDS.
API_KEY_IP_NOT_ALLOWEDHTTP 403retryable: noIDS keeps a list of IP addresses for this key and the request came from another one — send it from a listed address, or ask IDS to change the list.
API_TERMS_NOT_ACCEPTEDHTTP 403retryable: noThe IDS account of this key has not accepted the API Terms of Use (/legal/api-terms) — its holder accepts them in the IDS cabinet (Integrations / API), or IDS records a signed agreement (for an employee's key: its franchise owner's account). Retrying does not help until then.
FORBIDDEN_SCOPEHTTP 403retryable: noThe key lacks the scope of this operation (x-scope).
API_OWNER_NOT_BILLABLEHTTP 403retryable: noThe account cannot be billed through the API (no pricing tier, or an admin account).
PLATFORM_SUSPENDEDHTTP 403retryable: noThe platform of this key is suspended by IDS: quotes, bookings and test operations are refused until IDS resumes it; reads, the tracking refresh, a cancellation and a complaint still work. A retry of a booking finished before the suspension replays its answer.
PLATFORM_TARIFF_MISSINGHTTP 403retryable: noThe platform has no tariff yet — IDS sets it; no quote or booking until then.
An endpoint with this URL exists already in this environment (details.endpointId) — a repeated creation finds it there; rotate its secret if you lost it.
The account has as many webhook endpoints in this environment as IDS allows (details.limit) — delete one first.
The endpoint is switched off (status disabled) — IDS sends it nothing, a test event included; ask IDS to switch it on, or create a new endpoint. An endpoint IDS's administrator switched off (details.endpointId) cannot be deleted, nor a new one made for its host, until IDS lifts it.
The webhook URL is not a public https address IDS may send to (details.reason): not https, another port than 443, a user or password or #fragment in it, an internal name (localhost, no dot, .local, .internal…), a domain or an address of IDS itself, a host that resolves to a private, loopback, link-local or reserved address, or a host that does not resolve.
RATE_LIMITEDHTTP 429retryable: yesA limit per minute — the key's requests, its quotes, its platform's keys together, or the client IP (limitScope) — wait Retry-After seconds (retryAfterSec, limit).
INTERNAL_ERRORHTTP 500retryable: noUnexpected — for a booking, check GET /shipments before using a new key; quote the requestId.
API_DISABLEDHTTP 503retryable: noIDS switched the whole API off (/ping and /openapi.json keep answering).
WEBHOOKS_UNAVAILABLEHTTP 503retryable: yesWebhooks cannot be set up right now (IDS is setting them up) — try again later.