Skip to main content

Set Up Gorgias Objects

POST 

/api/integrations/gorgias/:gorgiasInstance/provision

Creates or updates, through the Gorgias API, everything Gorgias needs to show SKU.io orders and act on them:

Required scope: integrations:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

  1. http_integration — HTTP integration "SKU.io – Orders" that fetches the ticket customer's orders on ticket-created / ticket-updated, sending the shared secret header X-SKU-Webhook-Secret
  2. widget — the ticket sidebar widget for it: a card per order with status, items, shipments and tracking, plus Cancel order / Hold / Release hold buttons
  3. macro_cancel, macro_hold — macros "SKU.io – Cancel order" and "SKU.io – Hold order" (an HTTP action plus a canned reply). They name no order: they act only when the ticket customer has exactly one open order, and otherwise answer ambiguous_order so the agent uses the order card's button
  4. ai_action_status, ai_action_cancel — Gorgias AI Agent actions. Gorgias has no API to create them, so these are always manual, with copy-ready method, url, headers, body and notes.

Idempotent: objects are matched by the ids stored from the previous run, else by their "SKU.io – " name and a configuration pointing at this connection's endpoint (the widget by its integration), and updated; otherwise created. Each new object's id is saved as soon as it is created, and runs for one connection never overlap. Run it again after rotating the webhook secret.

Each item's status is created, updated, manual, failed (with error) or pending. A failure of one item does not stop the others; items that need the HTTP integration fail when it could not be set up.

422 when the connection has no endpoint URL or webhook secret yet, or another run is in progress.

Requires gorgias.manage.

Request​

Responses​

OK

Response Headers
    Content-Type