REST endpoints for marketing in ServFlo: 4 operations with parameters, request and response fields, permissions and curl examples.
Base URL: https://app.servflo.ai/api. Every call needs Authorization: Bearer sfk_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.
GET /organizations/{organizationId}/marketing/campaigns/{campaignId}/design
The campaign email's block design (custom: true) or the starter (custom: false). A campaign's own blocks may replace its message; the footer (address and unsubscribe) stays. Read-only.
Destructive: deletes the campaign email's own design (a draft or scheduled campaign only); it goes back to the default design with the campaign's text.
Permission
marketing.manage (Owner, Admin)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
emailDesigns_resetCampaign (toolset marketing)
Approval
Over MCP, this tool always waits for your approval in ServFlo. See Approvals.
POST /organizations/{organizationId}/marketing/campaigns/{campaignId}/design/draft
Claude lays out the campaign email as blocks from a short request ("summer promo, bold, with a coupon button"): a heading and short text around the campaign's message, buttons to the business's own links, images from its library; no prices, discounts or coupon codes that the request or the campaign text does not state. The footer (address and unsubscribe) is kept. Needs the campaigns feature. Uses AI credits (402 when none are left); source TEMPLATE when AI is off. Nothing is saved: preview with POST /email-designs/preview document and campaignId, save with PUT …/marketing/campaigns/{campaignId}/design.
Permission
marketing.manage (Owner, Admin)
Risk
write, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
The drafted design ({ version: 1, blocks }), valid for this email and keeping its locked blocks and footer. Not saved: preview it with POST /email-designs/preview document, save it with PUT …/design.
document.version
integer
document.blocks
array of object
document.blocks[].id
string
document.blocks[].type
enum
One of header, heading, text, image, button, divider, spacer, columns, social, message, record, footer.
source
enum
Ai: Claude drafted it. TEMPLATE: AI is off or unavailable (a starter from your brand). One of AI, FAKE, TEMPLATE.
notes
array of string
The AI's note on the design.
warnings
array of string
What was left out of the AI's draft and why: an image not in the library, a link or price you didn't give, a merge field that doesn't exist.