Skip to content

Update integrations

BetaAPI v2 is in public beta: endpoints, fields and behaviour can change before general availability. See the changelog

PATCH
/account/integrations
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.

Media typeapplication/json
object
klaviyo
omnisend
mailchimp
shopify
sync_customers_tag
meta_pixel
flow_triggers
split_order_app

Example

{
"klaviyo": "string",
"omnisend": "string",
"mailchimp": "string",
"shopify": "string",
"sync_customers_tag": "string",
"meta_pixel": "string",
"flow_triggers": "string",
"split_order_app": "string"
}

Success — the updated resource.

Media typeapplication/json
object

Example generated

{}

Accepted — async/bulk work was queued. Poll the returned job.

Media typeapplication/json

Returned for async/bulk work — poll the job until it reaches a terminal state.

object
job_id
string
status_url
string

Example

{
"job_id": "job_a1b2c3",
"status_url": "/api/v2/external/jobs/job_a1b2c3"
}

Missing or invalid X-Auth-Token.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Unauthorized"
]
}

The request failed validation.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"name is required"
]
}

Rate limited — cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Rate limit exceeded"
]
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support