Request headers

Required and optional headers for public submissions.
HeaderRequiredPurpose
Content-TypeYesapplication/json, application/x-www-form-urlencoded or multipart/form-data.
OriginYesCanonical customer website origin. Must be on the website allowlist.
AcceptRecommendedUse application/json to receive JSON. Without it, native form posts receive a redirect.
Idempotency-KeyOptionalSafe retry key, maximum 128 characters.
RefererFallbackUsed 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-Origin
  • Access-Control-Allow-Methods: POST, OPTIONS
  • Access-Control-Allow-Headers: Content-Type, Accept, Idempotency-Key
  • Access-Control-Max-Age: 600

CORS headers are also included on error responses for allowed origins.