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:
integrations:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
http_integration— HTTP integration "SKU.io – Orders" that fetches the ticket customer's orders on ticket-created / ticket-updated, sending the shared secret headerX-SKU-Webhook-Secretwidget— the ticket sidebar widget for it: a card per order with status, items, shipments and tracking, plus Cancel order / Hold / Release hold buttonsmacro_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 answerambiguous_orderso the agent uses the order card's buttonai_action_status,ai_action_cancel— Gorgias AI Agent actions. Gorgias has no API to create them, so these are alwaysmanual, with copy-readymethod,url,headers,bodyandnotes.
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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.