DevelopersAPI reference

Campaigns API

REST endpoints for campaigns in SKUFlow: 21 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
List marketing campaignsGET /organizations/{organizationId}/marketing/campaignsread
Create a campaignPOST /organizations/{organizationId}/marketing/campaignswrite
Get a campaignGET /organizations/{organizationId}/marketing/campaigns/{campaignId}read
Change a campaignPATCH /organizations/{organizationId}/marketing/campaigns/{campaignId}write
Delete a campaignDELETE /organizations/{organizationId}/marketing/campaigns/{campaignId}sensitive
Duplicate a campaignPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/duplicatewrite
Preview a campaignPOST /organizations/{organizationId}/marketing/campaigns/previewwrite
Count an audiencePOST /organizations/{organizationId}/marketing/audience/previewwrite
Draft campaign copy with AIPOST /organizations/{organizationId}/marketing/campaigns/draftwrite
Send a test to yourselfPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/testwrite
Send or schedule a campaignPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/sendsensitive
Pause a campaignPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/pausewrite
Resume a campaignPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/resumesensitive
Cancel a campaignPOST /organizations/{organizationId}/marketing/campaigns/{campaignId}/cancelwrite
A campaign's recipientsGET /organizations/{organizationId}/marketing/campaigns/{campaignId}/recipientsread
A campaign's results and revenueGET /organizations/{organizationId}/marketing/campaigns/{campaignId}/resultsread
List saved segmentsGET /organizations/{organizationId}/marketing/segmentsread
Save a segmentPOST /organizations/{organizationId}/marketing/segmentswrite
Get a segmentGET /organizations/{organizationId}/marketing/segments/{segmentId}read
Change a segmentPATCH /organizations/{organizationId}/marketing/segments/{segmentId}write
Delete a segmentDELETE /organizations/{organizationId}/marketing/segments/{segmentId}sensitive

List marketing campaigns

GET /organizations/{organizationId}/marketing/campaigns

Email and text broadcasts, newest first, with status and (once started) results. Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolcampaigns_list (toolset marketing)

Parameters

NameInTypeRequiredDescription
statusqueryenumNoOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
businessUnitIdquerystringNoOnly this business unit (GET /business-units), or "none" for records without one. Up to 100 characters.
limitqueryintegerNo1–200.
offsetqueryintegerNo

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
totalinteger
itemsarray of object
items[].idstring
items[].namestring
items[].statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
items[].channelsarray of enum
items[].audienceobject
items[].segmentobject or null
items[].segment.idstring
items[].segment.namestring
items[].businessUnitIdstring or nullThe business unit it is for; null = the whole business.
items[].emailSubjectstring or null
items[].emailPreheaderstring or null
items[].emailBodystring or null
items[].smsBodystring or null
items[].scheduleModeenumOne of NOW, AT, LOCAL_TIME.
items[].scheduledAtstring (date-time) or null
items[].localDatestring or null
items[].localTimestring or null
items[].attributionWindowDaysinteger
items[].utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
items[].trackLinksboolean
items[].audienceCountintegerCustomers in the frozen audience (when started).
items[].snapshotCompleteboolean
items[].startedAtstring (date-time) or null
items[].completedAtstring (date-time) or null
items[].pausedAtstring (date-time) or null
items[].cancelledAtstring (date-time) or null
items[].duplicatedFromIdstring or null
items[].createdAtstring (date-time)
items[].updatedAtstring (date-time)
items[].problemsarray of stringWhat is missing before it can be sent.
items[].countsobject or nullResults; null for a campaign never started.
items[].counts.recipientsintegerCustomer × channel rows in the frozen audience.
items[].counts.pendingintegerWaiting for their send time.
items[].counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
items[].counts.sentintegerHanded to the provider (or logged in test mode).
items[].counts.deliveredinteger
items[].counts.testModeintegerLogged in test mode (no provider): counted in sent.
items[].counts.openedintegerWhere the email provider reports opens.
items[].counts.clickedintegerWhere the email provider reports clicks.
items[].counts.bouncedinteger
items[].counts.failedinteger
items[].counts.skippedintegerRefused by consent, suppression, missing address …
items[].counts.cancelledinteger
items[].counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
items[].counts.byChannelobject
items[].counts.skippedReasonsarray of object

Create a campaign

POST /organizations/{organizationId}/marketing/campaigns

Saves a DRAFT campaign (nothing is sent). Preview it with POST /marketing/campaigns/preview, test it with …/test, then send or schedule it with …/send. Always marketing: only customers who agreed to marketing get it.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_create (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Request body

FieldTypeRequiredDescription
namestringYesUp to 200 characters.
channelsarray of enumYesEMAIL and/or SMS. Each channel reaches the customers whose consent allows it. Up to 2 items.
audienceobjectYes{ kind: FILTERS, filters } (the audience builder), { kind: SEGMENT, segmentId } or { kind: MANUAL, customerIds }.
emailSubjectstring or nullNoUp to 200 characters.
emailPreheaderstring or nullNoThe inbox preview line after the subject. Up to 200 characters.
emailBodystring or nullNoPlain text or HTML with {{merge.fields}}; goes in the branded email with the unsubscribe footer.
smsBodystring or nullNoWith {{merge.fields}}; "Reply STOP to opt out." is added. Up to 1600 characters.
scheduleModeenumNoNOW when sent; AT scheduledAt; LOCAL_TIME: localDate at localTime in each recipient's timezone (from their state). One of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or nullNo
localDatestring or nullNo
localTimestring or nullNo
attributionWindowDaysintegerNoDays after it reaches someone during which their requests, approved quotes and payments count (default 30). 1–365.
trackLinksbooleanNoAdd UTM tags to links (default on).
businessUnitIdstring or nullNoThe business unit the campaign is for (GET /business-units), for reporting by unit; null = the whole business. Does not narrow the audience. Up to 100 characters.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","channels":["EMAIL"],"audience":{"kind":"FILTERS"}}'

Response

201: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Get a campaign

GET /organizations/{organizationId}/marketing/campaigns/{campaignId}

One campaign: content, audience, schedule, status and results (sent, delivered, opened, clicked, bounced, unsubscribed, skipped with reasons). Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolcampaigns_get (toolset marketing)

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Change a campaign

PATCH /organizations/{organizationId}/marketing/campaigns/{campaignId}

Changes the fields sent, on a DRAFT or SCHEDULED campaign (a scheduled one goes back to DRAFT and must be sent or scheduled again). 409 once sending: duplicate it instead.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_update (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
namestringNoUp to 200 characters.
channelsarray of enumNoEMAIL and/or SMS. Each channel reaches the customers whose consent allows it. Up to 2 items.
audienceobjectNo{ kind: FILTERS, filters } (the audience builder), { kind: SEGMENT, segmentId } or { kind: MANUAL, customerIds }.
emailSubjectstring or nullNoUp to 200 characters.
emailPreheaderstring or nullNoThe inbox preview line after the subject. Up to 200 characters.
emailBodystring or nullNoPlain text or HTML with {{merge.fields}}; goes in the branded email with the unsubscribe footer.
smsBodystring or nullNoWith {{merge.fields}}; "Reply STOP to opt out." is added. Up to 1600 characters.
scheduleModeenumNoNOW when sent; AT scheduledAt; LOCAL_TIME: localDate at localTime in each recipient's timezone (from their state). One of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or nullNo
localDatestring or nullNo
localTimestring or nullNo
attributionWindowDaysintegerNoDays after it reaches someone during which their requests, approved quotes and payments count (default 30). 1–365.
trackLinksbooleanNoAdd UTM tags to links (default on).
businessUnitIdstring or nullNoThe business unit the campaign is for (GET /business-units), for reporting by unit; null = the whole business. Does not narrow the audience. Up to 100 characters.

Example

curl -X PATCH "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","channels":["EMAIL"],"audience":{"kind":"FILTERS"}}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Delete a campaign

DELETE /organizations/{organizationId}/marketing/campaigns/{campaignId}

Destructive: deletes a DRAFT or CANCELLED campaign (its messages stay in the message log). A sent campaign keeps its results and cannot be deleted (409).

Permissionmarketing.manage (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolcampaigns_delete (toolset marketing)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Example

curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

Duplicate a campaign

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/duplicate

A new DRAFT with the same content, audience and settings ("Copy of …"). Nothing is sent.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_duplicate (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/duplicate" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

201: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Preview a campaign

POST /organizations/{organizationId}/marketing/campaigns/preview

Renders the email (branded, with the unsubscribe footer) and the text (with the opt-out line) for a sample customer of the audience, with the audience's live count and reach by consent, and the text's segments and cost against this month's allowance. Nothing is sent or saved.

Permissionmarketing.read (Owner, Admin, Staff)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_preview (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Request body

FieldTypeRequiredDescription
namestringNoUp to 200 characters.
channelsarray of enumYesEMAIL and/or SMS. Each channel reaches the customers whose consent allows it. Up to 2 items.
audienceobjectYes{ kind: FILTERS, filters } (the audience builder), { kind: SEGMENT, segmentId } or { kind: MANUAL, customerIds }.
emailSubjectstring or nullNoUp to 200 characters.
emailPreheaderstring or nullNoThe inbox preview line after the subject. Up to 200 characters.
emailBodystring or nullNoPlain text or HTML with {{merge.fields}}; goes in the branded email with the unsubscribe footer.
smsBodystring or nullNoWith {{merge.fields}}; "Reply STOP to opt out." is added. Up to 1600 characters.
scheduleModeenumNoNOW when sent; AT scheduledAt; LOCAL_TIME: localDate at localTime in each recipient's timezone (from their state). One of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or nullNo
localDatestring or nullNo
localTimestring or nullNo
attributionWindowDaysintegerNoDays after it reaches someone during which their requests, approved quotes and payments count (default 30). 1–365.
trackLinksbooleanNoAdd UTM tags to links (default on).
businessUnitIdstring or nullNoThe business unit the campaign is for (GET /business-units), for reporting by unit; null = the whole business. Does not narrow the audience. Up to 100 characters.
campaignIdstringNoThe campaign being edited (its id goes in utm_content).

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/preview" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channels":["EMAIL"],"audience":{"kind":"FILTERS"}}'

Response

200: the answer's fields
FieldTypeDescription
sampleCustomerobject or null
sampleCustomer.idstring
sampleCustomer.namestring
emailobject or null
email.subjectstring or null
email.bodystring
email.htmlstring or null
email.unresolvedarray of string
email.blockingarray of string
smsobject or null
sms.subjectstring or null
sms.bodystring
sms.htmlstring or null
sms.unresolvedarray of string
sms.blockingarray of string
audienceobject
audience.totalintegerCustomers in the audience (archived and do-not-service never are).
audience.checkedintegerCustomers whose consent was checked one by one.
audience.estimatedbooleanReach scaled from the first customers checked (very large audiences).
audience.reachableobject
audience.reachable.EMAILinteger
audience.reachable.SMSinteger
audience.reachable.anyinteger
audience.unreachablearray of object
audience.unreachable[].reasonstring
audience.unreachable[].textstring
audience.unreachable[].countinteger
audience.samplearray of object
audience.sample[].customerIdstring
audience.sample[].namestring
audience.sample[].emailobject
audience.sample[].smsobject
smsEstimateobject or null
smsEstimate.segmentsPerTextinteger
smsEstimate.encodingenumOne of GSM-7, UCS-2.
smsEstimate.charactersinteger
smsEstimate.recipientsinteger
smsEstimate.totalSegmentsinteger
smsEstimate.allowanceRemaininginteger or null
smsEstimate.overageSegmentsinteger
smsEstimate.overageCentsinteger

Count an audience

POST /organizations/{organizationId}/marketing/audience/preview

The audience builder's live count: how many customers match (archived and do-not-service never do), how many consent lets you email or text for marketing, why the others cannot be reached, and a sample. Nothing is saved.

Permissionmarketing.read (Owner, Admin, Staff)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_audience (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Request body

FieldTypeRequiredDescription
audienceobjectYes{ kind: FILTERS, filters } (the audience builder), { kind: SEGMENT, segmentId } or { kind: MANUAL, customerIds }.
channelsarray of enumNoEMAIL and/or SMS. Each channel reaches the customers whose consent allows it. Up to 2 items. Default ["EMAIL"].
sampleSizeintegerNo1–100.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/audience/preview" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audience":{"kind":"FILTERS"}}'

Response

200: the answer's fields
FieldTypeDescription
totalintegerCustomers in the audience (archived and do-not-service never are).
checkedintegerCustomers whose consent was checked one by one.
estimatedbooleanReach scaled from the first customers checked (very large audiences).
reachableobject
reachable.EMAILinteger
reachable.SMSinteger
reachable.anyinteger
unreachablearray of object
unreachable[].reasonstring
unreachable[].textstring
unreachable[].countinteger
samplearray of object
sample[].customerIdstring
sample[].namestring
sample[].emailobject
sample[].email.okboolean
sample[].email.reasonstring or null
sample[].smsobject
sample[].sms.okboolean
sample[].sms.reasonstring or null

Draft campaign copy with AI

POST /organizations/{organizationId}/marketing/campaigns/draft

Claude writes the email (subject, preheader, body) and the text from your goal, with merge fields, inventing no prices or offers you did not give. Uses AI credits (402 when none are left). source says AI or TEMPLATE (AI off). Nothing is saved: put the answer in the campaign.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_draft (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Request body

FieldTypeRequiredDescription
goalstringYesWhat the campaign is for: "Spring team tees, 10% off orders of 48+ until May 31". Up to 1000 characters.
channelsarray of enumYesEMAIL and/or SMS. Each channel reaches the customers whose consent allows it. Up to 2 items.
toneenumNoOne of friendly, professional, urgent.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/draft" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"goal":"string","channels":["EMAIL"]}'

Response

200: the answer's fields
FieldTypeDescription
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
sourceenumOne of AI, FAKE, TEMPLATE.

Send a test to yourself

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/test

Sends the campaign marked "[Test]" to your own email (default: your account's) and/or phone, rendered for a sample customer of the audience. Logged as TEST; never counted in results; no customer gets it.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_test (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
emailempty string or string (email) or nullNoWhere to send the test email; default your account's email.
phonestring or nullNoWhere to send the test text (the campaign must have one). Up to 40 characters.
nowstring (date-time)NoTests only: act as of this moment (ISO 8601). Refused when NODE_ENV=production.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/test" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"dana@example.com","phone":"+15555550123","now":"2026-11-03T15:00:00Z"}'

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
channelenumOne of EMAIL, SMS.
statusstring
statusReasonstring or null
toAddressstring or null
subjectstring or null

Send or schedule a campaign

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/send

Customer-visible: sends the DRAFT now, or schedules it (its scheduleMode). The audience is frozen; each customer gets it once per channel, only when marketing consent allows (opted in, not unsubscribed, not suppressed, OK to text for texts), with the unsubscribe footer or STOP line, held by quiet hours. Large audiences go out in pages. Preview and test it first.

Permissionmarketing.manage (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolcampaigns_send (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
nowstring (date-time)NoTests only: act as of this moment (ISO 8601). Refused when NODE_ENV=production.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/send" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"now":"2026-11-03T15:00:00Z"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Pause a campaign

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/pause

Stops a scheduled or sending campaign: nothing new is queued and messages held (quiet hours) are withdrawn. Messages already handed to the provider are not recalled. Resume with …/resume.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_pause (toolset marketing)

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
nowstring (date-time)NoTests only: act as of this moment (ISO 8601). Refused when NODE_ENV=production.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/pause" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"now":"2026-11-03T15:00:00Z"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Resume a campaign

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/resume

Customer-visible: a paused campaign continues where it stopped; nobody gets it twice.

Permissionmarketing.manage (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolcampaigns_resume (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
nowstring (date-time)NoTests only: act as of this moment (ISO 8601). Refused when NODE_ENV=production.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/resume" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"now":"2026-11-03T15:00:00Z"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

Cancel a campaign

POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/cancel

Ends a scheduled, sending or paused campaign for good: the rest of the audience never gets it. Results so far are kept.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolcampaigns_cancel (toolset marketing)

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Request body

FieldTypeRequiredDescription
nowstring (date-time)NoTests only: act as of this moment (ISO 8601). Refused when NODE_ENV=production.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/cancel" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"now":"2026-11-03T15:00:00Z"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
statusenumOne of DRAFT, SCHEDULED, SENDING, PAUSED, SENT, CANCELLED.
channelsarray of enum
audienceobject
segmentobject or null
segment.idstring
segment.namestring
businessUnitIdstring or nullThe business unit it is for; null = the whole business.
emailSubjectstring or null
emailPreheaderstring or null
emailBodystring or null
smsBodystring or null
scheduleModeenumOne of NOW, AT, LOCAL_TIME.
scheduledAtstring (date-time) or null
localDatestring or null
localTimestring or null
attributionWindowDaysinteger
utmCampaignstring or nullutm_campaign on its links (fixed when it starts).
trackLinksboolean
audienceCountintegerCustomers in the frozen audience (when started).
snapshotCompleteboolean
startedAtstring (date-time) or null
completedAtstring (date-time) or null
pausedAtstring (date-time) or null
cancelledAtstring (date-time) or null
duplicatedFromIdstring or null
createdAtstring (date-time)
updatedAtstring (date-time)
problemsarray of stringWhat is missing before it can be sent.
countsobject or nullResults; null for a campaign never started.
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger

A campaign's recipients

GET /organizations/{organizationId}/marketing/campaigns/{campaignId}/recipients

Who is in the frozen audience, per channel: when it goes, what became of it (queued, skipped with the reason, sent, opened, clicked). Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolcampaigns_recipients (toolset marketing)

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.
statusqueryenumNoOne of PENDING, QUEUED, SKIPPED, FAILED, CANCELLED.
channelqueryenumNoOne of EMAIL, SMS.
limitqueryintegerNo1–200.
offsetqueryintegerNo

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/recipients" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
totalinteger
itemsarray of object
items[].idstring
items[].customerIdstring
items[].customerNamestring
items[].channelenumOne of EMAIL, SMS.
items[].statusstring
items[].reasonstring or null
items[].sendAtstring (date-time)
items[].timeZonestring or null
items[].messageIdstring or null
items[].messageStatusstring or null
items[].sentAtstring (date-time) or null
items[].openedAtstring (date-time) or null
items[].clickedAtstring (date-time) or null

A campaign's results and revenue

GET /organizations/{organizationId}/marketing/campaigns/{campaignId}/results

Delivery and engagement counts, plus attribution: requests, approved quotes and paid invoices (with revenue) by recipients within the attribution window after it reached them, and requests carrying its UTM tags. Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolcampaigns_results (toolset marketing)

Parameters

NameInTypeRequiredDescription
campaignIdpathstringYesA campaign id, from GET /marketing/campaigns.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/campaigns/{campaignId}/results" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
countsobject
counts.recipientsintegerCustomer × channel rows in the frozen audience.
counts.pendingintegerWaiting for their send time.
counts.queuedintegerQueued or held by quiet hours, not handed to the provider yet.
counts.sentintegerHanded to the provider (or logged in test mode).
counts.deliveredinteger
counts.testModeintegerLogged in test mode (no provider): counted in sent.
counts.openedintegerWhere the email provider reports opens.
counts.clickedintegerWhere the email provider reports clicks.
counts.bouncedinteger
counts.failedinteger
counts.skippedintegerRefused by consent, suppression, missing address …
counts.cancelledinteger
counts.unsubscribedintegerOpted out of marketing (link, STOP, complaint) after it reached them.
counts.byChannelobject
counts.byChannel.EMAILobject
counts.byChannel.SMSobject
counts.skippedReasonsarray of object
counts.skippedReasons[].reasonstring
counts.skippedReasons[].countinteger
attributionobject
attribution.windowDaysinteger
attribution.utmCampaignstring or null
attribution.reachedintegerCustomers it reached (sent, delivered or logged in test mode).
attribution.requestsinteger
attribution.quotesApprovedinteger
attribution.invoicesPaidinteger
attribution.revenueCentsintegerTotal of the invoices recipients paid in the window.

List saved segments

GET /organizations/{organizationId}/marketing/segments

Saved audiences (named sets of audience-builder filters) for campaigns, by name. Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolsegments_list (toolset marketing)

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/segments" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
namestring
descriptionstring or null
filtersobject
filters.tagsAnyarray of stringCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumUp to 2 items.
filters.zipsarray of stringAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringUp to 100 items.
filters.lifetimeValueMinCentsinteger0–100000000.
filters.lifetimeValueMaxCentsinteger0–100000000.
filters.behavioursarray of stringCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringUp to 50 items.
createdAtstring (date-time)
updatedAtstring (date-time)

Save a segment

POST /organizations/{organizationId}/marketing/segments

Saves audience filters under a name, for campaigns (the filters are applied when a campaign starts, so the segment stays current).

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolsegments_create (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Request body

FieldTypeRequiredDescription
namestringYesUp to 120 characters.
descriptionstring or nullNoUp to 500 characters.
filtersobjectYesThe audience builder's filters: tags, customer type, ZIPs and cities, lifetime value, Customer 360 behaviours and at risk, lead sources.
filters.tagsAnyarray of stringNoCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringNoLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumNoUp to 2 items.
filters.zipsarray of stringNoAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringNoUp to 100 items.
filters.lifetimeValueMinCentsintegerNo0–100000000.
filters.lifetimeValueMaxCentsintegerNo0–100000000.
filters.behavioursarray of stringNoCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanNoCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringNoUp to 50 items.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/segments" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","filters":{"tagsAny":["string"],"tagsNone":["string"],"customerTypes":["RESIDENTIAL"]}}'

Response

201: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
filtersobject
filters.tagsAnyarray of stringCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumUp to 2 items.
filters.zipsarray of stringAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringUp to 100 items.
filters.lifetimeValueMinCentsinteger0–100000000.
filters.lifetimeValueMaxCentsinteger0–100000000.
filters.behavioursarray of stringCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringUp to 50 items.
createdAtstring (date-time)
updatedAtstring (date-time)

Get a segment

GET /organizations/{organizationId}/marketing/segments/{segmentId}

One saved audience: its name, description and audience-builder filters. Read-only.

Permissionmarketing.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolsegments_get (toolset marketing)

Parameters

NameInTypeRequiredDescription
segmentIdpathstringYesA saved segment id, from GET /marketing/segments.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/segments/{segmentId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
filtersobject
filters.tagsAnyarray of stringCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumUp to 2 items.
filters.zipsarray of stringAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringUp to 100 items.
filters.lifetimeValueMinCentsinteger0–100000000.
filters.lifetimeValueMaxCentsinteger0–100000000.
filters.behavioursarray of stringCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringUp to 50 items.
createdAtstring (date-time)
updatedAtstring (date-time)

Change a segment

PATCH /organizations/{organizationId}/marketing/segments/{segmentId}

Replaces its name, description and filters.

Permissionmarketing.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolsegments_update (toolset marketing)
PlanMarketing campaigns: the Grow plan and up.

Parameters

NameInTypeRequiredDescription
segmentIdpathstringYesA saved segment id, from GET /marketing/segments.

Request body

FieldTypeRequiredDescription
namestringYesUp to 120 characters.
descriptionstring or nullNoUp to 500 characters.
filtersobjectYesThe audience builder's filters: tags, customer type, ZIPs and cities, lifetime value, Customer 360 behaviours and at risk, lead sources.
filters.tagsAnyarray of stringNoCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringNoLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumNoUp to 2 items.
filters.zipsarray of stringNoAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringNoUp to 100 items.
filters.lifetimeValueMinCentsintegerNo0–100000000.
filters.lifetimeValueMaxCentsintegerNo0–100000000.
filters.behavioursarray of stringNoCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanNoCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringNoUp to 50 items.

Example

curl -X PATCH "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/segments/{segmentId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","filters":{"tagsAny":["string"],"tagsNone":["string"],"customerTypes":["RESIDENTIAL"]}}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
filtersobject
filters.tagsAnyarray of stringCustomers with at least one of these tags. Up to 50 items.
filters.tagsNonearray of stringLeave out customers with any of these tags. Up to 50 items.
filters.customerTypesarray of enumUp to 2 items.
filters.zipsarray of stringAn address (or the billing address) in one of these ZIP codes. Up to 500 items.
filters.citiesarray of stringUp to 100 items.
filters.lifetimeValueMinCentsinteger0–100000000.
filters.lifetimeValueMaxCentsinteger0–100000000.
filters.behavioursarray of stringCustomer 360 behaviours, all of them (BOOKS_ONLINE, PAYS_ON_TIME …). Up to 20 items.
filters.atRiskbooleanCustomer 360: health AT_RISK or a HIGH lapse risk.
filters.leadSourceIdsarray of stringUp to 50 items.
createdAtstring (date-time)
updatedAtstring (date-time)

Delete a segment

DELETE /organizations/{organizationId}/marketing/segments/{segmentId}

Destructive: deletes a saved audience. 409 while a running campaign uses it.

Permissionmarketing.manage (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolsegments_delete (toolset marketing)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
segmentIdpathstringYesA saved segment id, from GET /marketing/segments.

Example

curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/marketing/segments/{segmentId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

On this page