Request headers
Required and optional headers for public submissions.
| Header | Required | Purpose |
|---|---|---|
Content-Type | Yes | application/json, application/x-www-form-urlencoded or multipart/form-data. |
Origin | Yes | Canonical customer website origin. Must be on the website allowlist. |
Accept | Recommended | Use application/json to receive JSON. Without it, native form posts receive a redirect. |
Idempotency-Key | Optional | Safe retry key, maximum 128 characters. |
Referer | Fallback | Used only to derive an origin when Origin is absent. |
Origin is required
Browsers send Origin automatically. Server-side clients must send it explicitly:
-H 'Origin: https://customer-site.example'
Origin: null, wildcards and unlisted origins are rejected with 403 origin_not_allowed. The Origin header is a CORS control, not authentication.
Accept
JSON request bodies automatically receive JSON responses. For urlencoded or multipart requests, send Accept: application/json if you want a JSON error response and a JSON success response instead of a redirect.
Idempotency-Key
Use a UUID or another high-entropy value. Do not reuse a key for a changed payload. See Idempotency.
CORS preflight
OPTIONS requests return 204 for an allowed origin and include:
Access-Control-Allow-OriginAccess-Control-Allow-Methods: POST, OPTIONSAccess-Control-Allow-Headers: Content-Type, Accept, Idempotency-KeyAccess-Control-Max-Age: 600
CORS headers are also included on error responses for allowed origins.