Update integrations
BetaAPI v2 is in public beta: endpoints, fields and behaviour can change before general availability. See the changelog
const url = 'https://app.stoqapp.com/api/v2/external/account/integrations';const options = { method: 'PATCH', headers: {'X-Auth-Token': '<X-Auth-Token>', 'Content-Type': 'application/json'}, body: '{"klaviyo":"string","omnisend":"string","mailchimp":"string","shopify":"string","sync_customers_tag":"string","meta_pixel":"string","flow_triggers":"string","split_order_app":"string"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.stoqapp.com/api/v2/external/account/integrations \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: <X-Auth-Token>' \ --data '{ "klaviyo": "string", "omnisend": "string", "mailchimp": "string", "shopify": "string", "sync_customers_tag": "string", "meta_pixel": "string", "flow_triggers": "string", "split_order_app": "string" }'Update the shop’s integrations: sync signups to Klaviyo, Omnisend, Mailchimp or Shopify customers (with the customer tag), the Omnisend and Mailchimp API keys and Mailchimp audience, the Meta Pixel, Shopify Flow triggers and the SplitOrder app switch. API keys are write only; reads return connected flags.
Note: Deep partial. omnisend.api_key and mailchimp.api_key are never returned by any read; an empty string removes the saved key. A Mailchimp key is checked by fetching the account’s audiences and is not saved when Mailchimp refuses it; mailchimp.list_id must be one of those audiences. Klaviyo connects with OAuth from the Integrations page; this action only turns its sync on or off. flow_triggers.triggers replaces the stored list.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
{ "klaviyo": "string", "omnisend": "string", "mailchimp": "string", "shopify": "string", "sync_customers_tag": "string", "meta_pixel": "string", "flow_triggers": "string", "split_order_app": "string"}Responses
Section titled “Responses”Success — the updated resource.
object
Example generated
{}Accepted — async/bulk work was queued. Poll the returned job.
Returned for async/bulk work — poll the job until it reaches a terminal state.
object
Example
{ "job_id": "job_a1b2c3", "status_url": "/api/v2/external/jobs/job_a1b2c3"}Missing or invalid X-Auth-Token.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "Unauthorized" ]}The request failed validation.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "name is required" ]}Rate limited — cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "Rate limit exceeded" ]}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support