Reference

API reference

Base URL https://eu.flockstack.io/api/v1. Bodies are JSON; GET and DELETE take their parameters in the query string. Each endpoint is also the MCP tool named under it. The same reference as OpenAPI 3.1.

Overview

Subscribers, email results and sends per hour, as on the dashboard's first page.

Get the overview

GET/api/v1/overview

The dashboard's overview for one newsletter: subscribers each day of the last 30 days, email results of the last 30 days against the 30 before, emails sent per hour today and yesterday, and the plan's usage this month, which the account's newsletters share.

MCP toolget_overviewKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

timeZone

query · string

IANA time zone for days and hours, e.g. Europe/Paris. Default: UTC.

Request
curl "https://eu.flockstack.io/api/v1/overview?timeZone=Europe%2FParis" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Newsletters

Sender, postal address, welcome and confirmation emails, list cleanup and archive.

List newsletters

GET/api/v1/newsletters

Lists the account's newsletters, 3 at most, first created first, with their settings and active contacts. Actions that take a newsletter use the first one when it's left out.

MCP toollist_newslettersKeyFull accessRead-onlySafe to repeat
Request
curl "https://eu.flockstack.io/api/v1/newsletters" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a newsletter

GET/api/v1/newsletters/{id}

Gets a newsletter's settings: sender, postal address, welcome and confirmation emails, list cleanup and archive.

MCP toolget_newsletterKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The newsletter's ID or slug

Request
curl "https://eu.flockstack.io/api/v1/newsletters/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Create a newsletter

POST/api/v1/newsletters

Creates a newsletter. An account has up to 3, sharing its plan's emails and subscribers; one more answers conflict. Without a fromEmail it sends from the shared address hello@<slug>.<shared domain>, which FlockStack sets up in a few minutes. List cleanup is on unless cleanup.enabled is false. Without a postalAddress, its emails print the server's default if it has one: FlockStack's address on FlockStack Cloud.

MCP toolcreate_newsletterKeyFull access
Parameter
namerequired

body · string

The newsletter's name, shown in emails and on the archive

slug

body · string

Lowercase letters, digits and dashes. Default: made from the name, numbered when another newsletter has it.

imageUrl

body · string

Square logo, 128×128 or larger: an https:// link

fromName

body · string

Name in the From field

fromEmail

body · string

The shared address (hello@<slug>.<shared domain>, set automatically) or an address on a domain added to this account

replyTo

body · string

Where replies go. Empty: replies to the shared address go to the account owner.

postalAddress

body · string

Printed in the footer of every email. Never set, it's the server's default (FlockStack's address on FlockStack Cloud, none on a self-hosted server); saved empty, there's none and sending waits for one.

archiveEnabled

body · boolean

A public page for each sent issue, with a signup form. On for new newsletters: the website goes live after the first issue.

description

body · string

One sentence under the name on the archive, 200 characters at most

author

body · object

The archive's author page; the author's name is fromName

author.bio

body · string

Under the author's name on the archive, 160 characters at most

author.imageUrl

body · string

Author photo: an https:// link. The newsletter image otherwise.

socialLinks

body · string[]

https:// links shown on the archive, 8 at most

requireConfirmation

body · boolean

Confirmed opt-in: new signups get an email with a button and only join once they click it. On for new newsletters.

cleanup

body · object

List cleanup at each send: contacts who ignored several issues get a last-chance email instead, and become dormant if they don't answer

cleanup.enabled

body · boolean

On for new newsletters

cleanup.issues

body · number | null

Ignored issues in a row before the last-chance email, 2 to 100. Default 6.

cleanup.days

body · number | null

Days without an open, click or signup, 30 to 3650. Default 180.

welcome

body · object

Email sent to each new subscriber. Not sent while signups need confirming.

welcome.enabled

body · boolean

welcome.subject

body · string

welcome.previewText

body · string

welcome.markdown

body · string

Markdown

confirmation

body · object

The confirmation email for confirmed opt-in. Sent back unchanged, the built-in one stays built-in and follows the name and description.

confirmation.subject

body · string

confirmation.previewText

body · string

confirmation.markdown

body · string

Markdown that keeps the button: an HTML link like <a href="{{confirm_url}}">Confirm</a>

Request
curl -X POST "https://eu.flockstack.io/api/v1/newsletters" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Field notes","postalAddress":"Field Notes Ltd, 1 Main St, Paris, France"}'

Update a newsletter

PATCH/api/v1/newsletters/{id}

Changes a newsletter's settings. Send only the fields to change; nested groups (welcome, confirmation, cleanup, author) keep the fields you leave out. An account changes slugs 3 times a day at most: one more answers rate_limited.

MCP toolupdate_newsletterKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The newsletter's ID or slug

name

body · string

The newsletter's name, shown in emails and on the archive

slug

body · string

Lowercase letters, digits and dashes, not a name FlockStack keeps like www, api or mail. The shared from address (hello@<slug>.<shared domain>) and the archive subdomain follow it.

imageUrl

body · string

Square logo, 128×128 or larger: an https:// link

fromName

body · string

Name in the From field

fromEmail

body · string

The shared address (hello@<slug>.<shared domain>, set automatically) or an address on a domain added to this account

replyTo

body · string

Where replies go. Empty: replies to the shared address go to the account owner.

postalAddress

body · string

Printed in the footer of every email. Never set, it's the server's default (FlockStack's address on FlockStack Cloud, none on a self-hosted server); saved empty, there's none and sending waits for one.

archiveEnabled

body · boolean

A public page for each sent issue, with a signup form. On for new newsletters: the website goes live after the first issue.

description

body · string

One sentence under the name on the archive, 200 characters at most

author

body · object

The archive's author page; the author's name is fromName

author.bio

body · string

Under the author's name on the archive, 160 characters at most

author.imageUrl

body · string

Author photo: an https:// link. The newsletter image otherwise.

socialLinks

body · string[]

https:// links shown on the archive, 8 at most

requireConfirmation

body · boolean

Confirmed opt-in: new signups get an email with a button and only join once they click it. On for new newsletters.

cleanup

body · object

List cleanup at each send: contacts who ignored several issues get a last-chance email instead, and become dormant if they don't answer

cleanup.enabled

body · boolean

On for new newsletters

cleanup.issues

body · number | null

Ignored issues in a row before the last-chance email, 2 to 100. Default 6.

cleanup.days

body · number | null

Days without an open, click or signup, 30 to 3650. Default 180.

welcome

body · object

Email sent to each new subscriber. Not sent while signups need confirming.

welcome.enabled

body · boolean

welcome.subject

body · string

welcome.previewText

body · string

welcome.markdown

body · string

Markdown

confirmation

body · object

The confirmation email for confirmed opt-in. Sent back unchanged, the built-in one stays built-in and follows the name and description.

confirmation.subject

body · string

confirmation.previewText

body · string

confirmation.markdown

body · string

Markdown that keeps the button: an HTML link like <a href="{{confirm_url}}">Confirm</a>

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/newsletters/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"replyTo":"jane@example.com","requireConfirmation":true}'

Check a slug

GET/api/v1/newsletters/slugs/{slug}

Says whether a newsletter can take a slug: available, or taken by another newsletter, reserved by FlockStack or invalid, with the message saving it would answer. Checking doesn't count toward the 3 slug changes a day.

MCP toolcheck_newsletter_slugKeyFull accessRead-onlySafe to repeat
Parameter
slugrequired

path · string

The slug to check

id

query · string

The newsletter that would take it, by ID or slug: its own slug is available to it

Request
curl "https://eu.flockstack.io/api/v1/newsletters/slugs/6650f1c2e9b1d4a012345678?slug=field-notes" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Send a test of the welcome email

POST/api/v1/newsletters/{id}/welcome-test

Sends the saved welcome email to the account owner's address, switched on or not. It counts toward the plan's emails.

MCP toolsend_welcome_test_emailKeyFull accessReaches outside FlockStack
Parameter
idrequired

path · string

The newsletter's ID or slug

Request
curl -X POST "https://eu.flockstack.io/api/v1/newsletters/6650f1c2e9b1d4a012345678/welcome-test" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Campaigns

Drafts, test emails, scheduling, sending, sending in steps and reports.

List campaigns

GET/api/v1/campaigns

Lists campaigns, newest activity first: sent issues by send date, scheduled ones by send time, drafts by last edit. Content is left out; get_campaign has it.

MCP toollist_campaignsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

Only this newsletter's: its ID or slug. Default: every newsletter.

status

query · "draft" | "scheduled" | "sending" | "paused" | "sent"

Only campaigns with this status

limit

query · integer

How many, 50 by default, 200 at most

Request
curl "https://eu.flockstack.io/api/v1/campaigns?status=sent&limit=10" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a campaign

GET/api/v1/campaigns/{id}

Gets a campaign with its content, stats and, for drafts, what would block sending it now.

MCP toolget_campaignKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The campaign's ID

Request
curl "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a campaign's report

GET/api/v1/campaigns/{id}/report

Delivery, open, click, bounce, complaint and unsubscribe rates of a sent campaign, its list cleanup emails, results by inbox provider, and how many contacts a capped send hasn't reached yet.

MCP toolget_campaign_reportKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The campaign's ID

Request
curl "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/report" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Create a draft campaign

POST/api/v1/campaigns

Creates a draft. Nothing is sent: review it in the dashboard or with get_campaign, then send_test_email, schedule_campaign or send_campaign.

MCP toolcreate_campaignKeyFull access
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

subject

body · string

Subject line, 200 characters at most

previewText

body · string

Text inbox apps show after the subject, 300 characters at most

format

body · "markdown" | "rich" | "html"

markdown (the default when content is given), rich or html, as in update_campaign

content

body · string

The body in that format, 500 KB at most

archiveSlug

body · string

The issue's page path once sent. Default: made from the subject; a taken slug gets a number.

audience

body · "all" | "free" | "paid"

Who gets it: all active contacts (the default), only free readers, or only paid readers. free and paid need the newsletter's paid tier (set_paid_tier). A paid issue's web page shows a teaser; the full text is only in the email.

segment

body · string | null

A saved segment's ID or name: the campaign goes to its active contacts (within its audience) instead of all the newsletter's. null goes back to everyone.

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"This week","previewText":"Three links worth your time","content":"# This week\n\nThree links worth your time."}'

Update a draft campaign

PATCH/api/v1/campaigns/{id}

Changes a draft or scheduled campaign's subject, preview text, content, audience or segment. Send only the fields to change; format goes with content. Sent campaigns can't change.

MCP toolupdate_campaignKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The campaign's ID

subject

body · string

Subject line, 200 characters at most

previewText

body · string

Text inbox apps show after the subject, 300 characters at most

format

body · "markdown" | "rich" | "html"

With content: the format it's in. Default: the campaign's current format.

content

body · string

The body in that format, 500 KB at most

audience

body · "all" | "free" | "paid"

Who gets it: all active contacts (the default), only free readers, or only paid readers. free and paid need the newsletter's paid tier (set_paid_tier). A paid issue's web page shows a teaser; the full text is only in the email.

segment

body · string | null

A saved segment's ID or name: the campaign goes to its active contacts (within its audience) instead of all the newsletter's. null goes back to everyone.

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"This week, and one more link"}'

Delete a draft campaign

DELETE/api/v1/campaigns/{id}

Deletes a draft or scheduled campaign: it leaves every list and a scheduled send never goes out. Sent campaigns can't be deleted.

MCP tooldelete_campaignKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Duplicate a campaign

POST/api/v1/campaigns/{id}/duplicate

Copies a campaign's subject, preview text, content and segment into a new draft.

MCP toolduplicate_campaignKeyFull access
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/duplicate" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Send a test email

POST/api/v1/campaigns/{id}/test

Sends the campaign as saved to the account owner's address, subject prefixed with [Test]. Nobody else gets it. It counts toward the plan's emails.

MCP toolsend_test_emailKeyFull accessReaches outside FlockStack
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/test" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Schedule a campaign

POST/api/v1/campaigns/{id}/schedule

Schedules a draft to send by itself at a time within a year. It goes out without asking again, unless unschedule_campaign runs first. Sending can't be undone: emails can't be recalled once they go out. Ask the user to confirm first. Plan limits and pre-send checks run now and again when it goes out. FlockStack Cloud paces a send by the volume its account has proven: its largest campaign of the last 60 days whose bounces and complaints stayed under the pause level, counted a day after it went out. A send, with what the account's other sends still have to send or sent in the last 24 hours, goes at full speed up to 200 emails, or that volume times 2 on the first day of the account's 30-day warm-up, rising to 5 by its last day and after it. A bigger send goes out over 4 hours plus 4 for each time it doubles that, 72 at most (spreadHours, sendingUntil); a resume keeps the pace, each step of send_campaign_to_more gets its own. Contacts never mailed before go in steps: a slice first, the rest 3 hours after it if the slice's bounces and complaints stay under the pause level. Past 2.00% hard bounces (at least 5) or 0.08% complaints (at least 2), the campaign pauses with pauseCode high_rates, or first_send_slice for a slice, and resume_campaign sends the rest. Past 5.00% (at least 10) or 0.30% (at least 3), the account is blocked.

MCP toolschedule_campaignKeyFull accessCan't be undoneSafe to repeatReaches outside FlockStack
Parameter
idrequired

path · string

The campaign's ID

scheduledAtrequired

body · string

ISO 8601 date and time, e.g. 2026-10-20T09:00:00Z, at least a minute ahead

audience

body · "all" | "free" | "paid"

Who gets it: all, free or paid readers. Default: the campaign's own audience (see create_campaign).

audienceLimit

body · integer

Send to this many contacts at most, the most engaged first. The rest can follow with send_campaign_to_more.

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/schedule" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduledAt":"2026-10-20T09:00:00Z"}'

Cancel a scheduled send

POST/api/v1/campaigns/{id}/unschedule

Turns a scheduled campaign back into a draft, so it doesn't go out.

MCP toolunschedule_campaignKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/unschedule" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Send a campaign now

POST/api/v1/campaigns/{id}/send

Sends a draft or scheduled campaign now to the newsletter's active contacts, to the campaign's segment (update_campaign) or to its free or paid readers only (audience), most engaged first. Sending can't be undone: emails can't be recalled once they go out. Ask the user to confirm first. A campaign that is already sending or sent answers conflict, so a retry never sends twice. Plan limits, the from address, the postal address and the email size are checked first. FlockStack Cloud paces a send by the volume its account has proven: its largest campaign of the last 60 days whose bounces and complaints stayed under the pause level, counted a day after it went out. A send, with what the account's other sends still have to send or sent in the last 24 hours, goes at full speed up to 200 emails, or that volume times 2 on the first day of the account's 30-day warm-up, rising to 5 by its last day and after it. A bigger send goes out over 4 hours plus 4 for each time it doubles that, 72 at most (spreadHours, sendingUntil); a resume keeps the pace, each step of send_campaign_to_more gets its own. Contacts never mailed before go in steps: a slice first, the rest 3 hours after it if the slice's bounces and complaints stay under the pause level. Past 2.00% hard bounces (at least 5) or 0.08% complaints (at least 2), the campaign pauses with pauseCode high_rates, or first_send_slice for a slice, and resume_campaign sends the rest. Past 5.00% (at least 10) or 0.30% (at least 3), the account is blocked.

MCP toolsend_campaignKeyFull accessCan't be undoneReaches outside FlockStack
Parameter
idrequired

path · string

The campaign's ID

audience

body · "all" | "free" | "paid"

Who gets it: all, free or paid readers. Default: the campaign's own audience (see create_campaign).

audienceLimit

body · integer

Send to this many contacts at most, the most engaged first. The rest can follow with send_campaign_to_more.

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/send" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Send a campaign to more contacts

POST/api/v1/campaigns/{id}/send-more

Sends a sent campaign to contacts who haven't received it yet, the next most engaged first: a send in steps. Sending can't be undone: emails can't be recalled once they go out. Ask the user to confirm first. Each call starts a new step, so check get_campaign_report before calling it again; while a step is still sending it answers conflict. FlockStack Cloud paces a send by the volume its account has proven: its largest campaign of the last 60 days whose bounces and complaints stayed under the pause level, counted a day after it went out. A send, with what the account's other sends still have to send or sent in the last 24 hours, goes at full speed up to 200 emails, or that volume times 2 on the first day of the account's 30-day warm-up, rising to 5 by its last day and after it. A bigger send goes out over 4 hours plus 4 for each time it doubles that, 72 at most (spreadHours, sendingUntil); a resume keeps the pace, each step of send_campaign_to_more gets its own. Contacts never mailed before go in steps: a slice first, the rest 3 hours after it if the slice's bounces and complaints stay under the pause level. Past 2.00% hard bounces (at least 5) or 0.08% complaints (at least 2), the campaign pauses with pauseCode high_rates, or first_send_slice for a slice, and resume_campaign sends the rest. Past 5.00% (at least 10) or 0.30% (at least 3), the account is blocked.

MCP toolsend_campaign_to_moreKeyFull accessCan't be undoneReaches outside FlockStack
Parameter
idrequired

path · string

The campaign's ID

additional

body · integer

How many more contacts. Default: everyone who hasn't received it.

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/send-more" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"additional":2000}'

Pause a campaign

POST/api/v1/campaigns/{id}/pause

Stops a campaign that is sending. Emails already sent stay sent; the rest wait until resume_campaign.

MCP toolpause_campaignKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/pause" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Resume a paused campaign

POST/api/v1/campaigns/{id}/resume

Sends the rest of a paused campaign. Sending can't be undone: emails can't be recalled once they go out. Ask the user to confirm first. The plan limits and the account's state are checked again first. Resumed after a high_rates or first_send_slice pause, only the block level stops it again.

MCP toolresume_campaignKeyFull accessCan't be undoneReaches outside FlockStack
Parameter
idrequired

path · string

The campaign's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/resume" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Update a campaign's archive page

PATCH/api/v1/campaigns/{id}/archive

Changes the path of a campaign's archive page (/p/<slug>), or pins a sent issue to the top of the archive. Works on sent campaigns too.

MCP toolupdate_campaign_archiveKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The campaign's ID

slug

body · string

Lowercase letters, digits and dashes. Empty removes it from a draft.

pinned

body · boolean

Pinned issues lead the archive

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/archive" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pinned":true}'

Preview the list cleanup of a send

GET/api/v1/campaigns/{id}/cleanup-preview

Counts what the newsletter's list cleanup would do if the campaign went out now: issues sent, last-chance emails instead, contacts still waiting to answer one, and contacts made dormant. Reads the whole list, so it can take a few seconds.

MCP toolpreview_campaign_cleanupKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The campaign's ID

audienceLimit

query · integer

Count for a send capped at this many contacts

includeRanks

query · boolean

Also return, for each cold contact, how many issue recipients come before it, to recount any limit without asking again

Request
curl "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/cleanup-preview" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Preview who a campaign goes to

GET/api/v1/campaigns/{id}/recipients

Counts the contacts a send of the campaign would reach if it went out now, and shows the first few: the active contacts of its audience (all, free or paid) that are in its segment, or all the newsletter's, with suppressed addresses out. It also counts the emails it would use from the plan (the list cleanup's last-chance emails included) and whether they fit. Reads the whole list when the list cleanup is on, so it can take a few seconds.

MCP toolpreview_campaign_recipientsKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The campaign's ID

audienceLimit

query · integer

Count for a send capped at this many contacts

sample

query · integer

How many of the most engaged recipients to list, 10 by default

Request
curl "https://eu.flockstack.io/api/v1/campaigns/6650f1c2e9b1d4a012345678/recipients" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Contacts

Search, signups, imports with checks, status changes, deletes and exports.

List contacts

GET/api/v1/contacts

Lists contacts, newest signups first, 50 a page. Filter by newsletter, status, tag or the start of the email address; pass nextCursor back as cursor for the next page. counts has every status for the same filters.

MCP toollist_contactsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

Only this newsletter's: its ID or slug. Default: every newsletter.

status

query · "active" | "pending" | "unsubscribed" | "bounced" | "complained" | "dormant"

Only contacts with this status

tier

query · "free" | "paid"

Only free or only paid contacts

search

query · string

Contacts whose email starts with this

tag

query · string

Only contacts with this tag

limit

query · integer

Contacts per page, 50 by default, 100 at most

cursor

query · string

nextCursor from the previous page

Request
curl "https://eu.flockstack.io/api/v1/contacts?status=active&search=jane" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a contact

GET/api/v1/contacts/{id}

Gets one contact by ID or email address, with its status, dates and engagement.

MCP toolget_contactKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

query · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

Request
curl "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Add a contact

POST/api/v1/contacts

Signs someone up, like the archive's form: they get the welcome email, or the confirmation email when the newsletter asks new subscribers to confirm. Signing up again keeps the contact as it is unless resubscribe is true, but its tags and fields are added to and set. Works with signups only keys, for website forms. Signups and confirmation emails keep coming in over the plan's limits; welcome emails count toward the month's emails and are skipped once they're used up, never sent later (get_billing's usage.welcomeEmailsPaused). A misspelled domain (gmial.com) answers validation_failed with the address it was likely meant to be; spam trap addresses, domains that can't receive email, and addresses FlockStack knows can't receive email (they hard bounced or hit a spam trap, from any sender on FlockStack) answer validation_failed too.

MCP tooladd_contactKeyFull access or signups onlyReaches outside FlockStack
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

emailrequired

body · string

The subscriber's email address

source

body · string

Where they signed up, e.g. website. Default: api.

resubscribe

body · boolean

Bring back a contact who unsubscribed or went dormant. Bounced and complained addresses never come back, nor does a contact deleted after it unsubscribed.

ip

body · string

The visitor's IP address: one visitor gets 5 signups in 10 minutes

referral

body · string

The ref in the address the visitor arrived by, for a signup form of your own on a newsletter with a referral program: it credits the subscriber who shared the link, once this one confirms

tags

body · string[]

Tags to add: letters, digits, spaces and - _ . : / + &, 40 characters at most, lowercased

fields

body · object

Custom field values by field key, e.g. { "first_name": "Jane" }. null clears a value. The newsletter has to have the field (create_custom_field).

Request
curl -X POST "https://eu.flockstack.io/api/v1/contacts" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"jane@example.com","source":"website"}'

Unsubscribe or reactivate a contact

PATCH/api/v1/contacts/{id}

unsubscribed stops all emails to the contact, for good: only the person signing up again brings them back. active brings back a dormant contact; unsubscribes, bounces and complaints are final.

MCP toolupdate_contact_statusKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

body · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

statusrequired

body · "active" | "unsubscribed"

active (dormant contacts only) or unsubscribed

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"unsubscribed"}'

Delete a contact

DELETE/api/v1/contacts/{id}

Deletes a contact from its newsletter, with its dates and engagement. It can't be undone. For a contact who unsubscribed, bounced or complained, FlockStack keeps a hash of the address so the newsletter never emails it again: import_contacts leaves it out, and add_contact or a signup form adds it back with that status. Any other contact can be added again like a new one.

MCP tooldelete_contactKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

query · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Import contacts

POST/api/v1/contacts/import

Adds up to 1000 contacts per call, with the same checks as the dashboard's CSV import: invalid, misspelled (gmial.com…), spam trap, role (info@, support@…), throwaway, duplicate and suppressed addresses, undeliverable ones (FlockStack knows they can't receive email: they hard bounced or hit a spam trap, from any sender on FlockStack), and addresses on domains that can't receive email, are left out and counted. consent must be true: "These people agreed to receive my emails". Existing contacts keep their status unless a row gives a stricter one (unsubscribed, bounced, complained), which is final. No welcome emails go out. Rows can carry tags and custom field values, and tags adds tags to every contact in the call. For more rows, send the next chunk with the importId of the first.

MCP toolimport_contactsKeyFull accessCan't be undoneSafe to repeat
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

consentrequired

body · boolean

Must be true: These people agreed to receive my emails. Bought or scraped lists aren't allowed.

contactsrequired

body · object[]

The rows, 1000 at most

contacts[].emailrequired

body · string

Invalid addresses are left out and counted

contacts[].status

body · "active" | "dormant" | "unsubscribed" | "bounced" | "complained"

active (default), dormant, unsubscribed, bounced or complained

contacts[].subscribedAt

body · string

When they signed up, ISO 8601

contacts[].emailsReceived

body · number

Emails they got on the previous platform

contacts[].openRate

body · number

0 to 1, from the previous platform: sends reach the most engaged first

contacts[].clickRate

body · number

0 to 1, from the previous platform

contacts[].tags

body · string[]

Tags for this contact, added to the ones it has. Invalid tags are left out.

contacts[].fields

body · object

Custom field values by field key. Keys the newsletter has no field for and values that don't fit the field's type are left out.

tags

body · string[]

Tags added to every contact in the call, new or existing, e.g. the name of the list they came from

importId

body · string

The importId of the first chunk, to add rows to the same import

duplicates

body · integer

Duplicates you removed before sending, counted in the import's report

Request
curl -X POST "https://eu.flockstack.io/api/v1/contacts/import" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"consent":true,"contacts":[{"email":"jane@example.com","subscribedAt":"2025-03-01T00:00:00Z"},{"email":"sam@example.com","status":"unsubscribed"}]}'

Export contacts

GET/api/v1/contacts/export

Makes a CSV download link for the contacts matching the filters, valid for an hour, no API key needed to open it. The columns go back in through the import as they are.

MCP toolexport_contactsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

Only this newsletter's: its ID or slug. Default: every newsletter.

status

query · "active" | "pending" | "unsubscribed" | "bounced" | "complained" | "dormant"

Only contacts with this status

search

query · string

Contacts whose email starts with this

tag

query · string

Only contacts with this tag

Request
curl "https://eu.flockstack.io/api/v1/contacts/export?status=active" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Referrals

A referral program with rewards: settings, who referred whom, and the leaderboard.

Get referral settings

GET/api/v1/referrals/settings

Gets a newsletter's referral program: whether it is on, its rewards, and how many referrals counted. Every subscriber has a link of their own to your website. A referral counts for the subscriber who shared it once the new subscriber confirms their address, and rewards unlock at the numbers you set.

MCP toolget_referral_settingsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

Request
curl "https://eu.flockstack.io/api/v1/referrals/settings" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Update referral settings

PATCH/api/v1/referrals/settings

Turns a newsletter's referral program on or off and sets its rewards. Send only what changes; rewards replaces the whole list. A reward is a title, the number of referrals that unlocks it (1 to 10000) and a link or a message, revealed on the subscriber's referral page and sent in an email through the usual sending path, with its unsubscribe link, counted toward the month's emails. Up to 10 rewards. The program needs the newsletter's confirmation emails and website on: referral links lead to the website's signup form, and a referral counts once the new subscriber confirms. Put {{referral_link}} and {{referral_count}} in an issue to show each subscriber their link and count.

MCP toolupdate_referral_settingsKeyFull accessSafe to repeat
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

enabled

body · boolean

Turn the program on or off. Off keeps the counts and rewards.

rewards

body · object[]

The whole list of rewards

rewards[].id

body · string

The reward's ID, to keep its unlocks when you change it. Leave it out for a new reward.

rewards[].referralsrequired

body · integer

Confirmed referrals that unlock it

rewards[].titlerequired

body · string

What the subscriber gets, 100 characters at most

rewards[].url

body · string

An https:// link revealed on unlock, e.g. a file or a page

rewards[].text

body · string

A message revealed on unlock, 1,000 characters at most

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/referrals/settings" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"rewards":[{"referrals":3,"title":"The field guide","url":"https://example.com/field-guide.pdf"}]}'

List referrals

GET/api/v1/referrals

Lists a newsletter's referrals, newest first, 50 a page: who referred whom, and whether it counted. A referral is pending until the new subscriber confirms, credited once it counts, and rejected when it never will: a self-referral, a repeat of one inbox or network, a flood, an address that can't be emailed. Pass nextCursor back as cursor for the next page.

MCP toollist_referralsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

status

query · "pending" | "credited" | "rejected"

Only referrals with this status

referrer

query · string

Only this subscriber's referrals: their contact ID

limit

query · integer

Referrals per page, 50 by default, 100 at most

cursor

query · string

nextCursor from the previous page

Request
curl "https://eu.flockstack.io/api/v1/referrals?status=rejected" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get the referral leaderboard

GET/api/v1/referrals/leaderboard

Lists the subscribers with the most confirmed referrals, most first, with how many each brought in.

MCP toolget_referral_leaderboardKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

limit

query · integer

How many subscribers, 25 by default, 100 at most

Request
curl "https://eu.flockstack.io/api/v1/referrals/leaderboard" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Tags and fields

Free-form tags on contacts, and custom fields (text, number, date) for merge tags, segments and automations.

List tags

GET/api/v1/tags

Lists the tags a newsletter's contacts have had, each with how many contacts have it now. Filter list_contacts or a segment by a tag.

MCP toollist_tagsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

Request
curl "https://eu.flockstack.io/api/v1/tags" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Add a tag to a contact

POST/api/v1/contacts/{id}/tags

Gives a contact a tag, which segments can filter by and automations can start from (the tag added trigger). A contact has up to 30 tags and a newsletter up to 200. Adding a tag the contact has changes nothing.

MCP tooladd_tagKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

body · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

tagrequired

body · string

The tag: letters, digits, spaces and - _ . : / + &, 40 characters at most. Tags are lowercased, so VIP and vip are one tag.

Request
curl -X POST "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678/tags" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tag":"vip"}'

Remove a tag from a contact

DELETE/api/v1/contacts/{id}/tags

Takes a tag off a contact. The tag stays on the newsletter's list of tags (delete_tag removes it everywhere).

MCP toolremove_tagKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

query · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

tagrequired

query · string

The tag: letters, digits, spaces and - _ . : / + &, 40 characters at most. Tags are lowercased, so VIP and vip are one tag.

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678/tags" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Delete a tag

DELETE/api/v1/tags

Takes a tag off every contact of the newsletter and forgets it. It can't be undone. Segments and automations that name the tag keep working but match nobody.

MCP tooldelete_tagKeyFull accessCan't be undoneSafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

tagrequired

query · string

The tag: letters, digits, spaces and - _ . : / + &, 40 characters at most. Tags are lowercased, so VIP and vip are one tag.

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/tags" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

List custom fields

GET/api/v1/custom-fields

Lists a newsletter's custom fields: values like a first name, a plan or a renewal date that each contact can have. Merge tags ({{first_name|there}}), segments and automations use them.

MCP toollist_custom_fieldsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

Request
curl "https://eu.flockstack.io/api/v1/custom-fields" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Create a custom field

POST/api/v1/custom-fields

Adds a custom field to a newsletter, up to 20. Its type is text (500 characters), number or date (YYYY-MM-DD) and can't change later. Merge tags in campaigns name it by key: {{first_name}}, or {{first_name|there}} to print "there" for contacts without a value.

MCP toolcreate_custom_fieldKeyFull access
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

labelrequired

body · string

What the dashboard calls it, e.g. First name

key

body · string

Lowercase letters, digits and underscores, starting with a letter. Default: made from the label (first_name).

typerequired

body · "text" | "number" | "date"

text, number or date

onSignupForm

body · boolean

Ask for it on the newsletter's own signup form. Default: false.

Request
curl -X POST "https://eu.flockstack.io/api/v1/custom-fields" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"First name","type":"text"}'

Update a custom field

PATCH/api/v1/custom-fields/{key}

Changes a custom field's label, or whether the newsletter's signup form asks for it. Its key and type stay, since merge tags, segments and contacts' values use them.

MCP toolupdate_custom_fieldKeyFull accessSafe to repeat
Parameter
keyrequired

path · string

The field's key, e.g. first_name

newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter.

label

body · string

What the dashboard calls it

onSignupForm

body · boolean

Ask for it on the newsletter's own signup form

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/custom-fields/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Given name"}'

Delete a custom field

DELETE/api/v1/custom-fields/{key}

Deletes a custom field and every contact's value for it. It can't be undone. Merge tags that name it print their fallback, and segments that use it match nobody.

MCP tooldelete_custom_fieldKeyFull accessCan't be undoneSafe to repeat
Parameter
keyrequired

path · string

The field's key, e.g. first_name

newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/custom-fields/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Set a contact's custom field

PATCH/api/v1/contacts/{id}/fields

Sets one custom field of a contact, or clears it with a null value. The value has to fit the field's type: text, a number, or a date as YYYY-MM-DD.

MCP toolset_contact_fieldKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The contact's ID or email address

newsletter

body · string

The newsletter's ID or slug, needed for an email address that is a contact of several newsletters

fieldrequired

body · string

The field's key, e.g. first_name

valuerequired

body · string | number | null

The value, or null to clear it

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/contacts/6650f1c2e9b1d4a012345678/fields" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"field":"first_name","value":"Jane"}'

Segments

Saved audiences: rules over a newsletter's contacts, with live counts, that a campaign or an automation can use.

List segments

GET/api/v1/segments

Lists a newsletter's saved segments, each with its rules and live counts: how many contacts it matches now and how many of those are active. A segment is a saved audience: send a campaign to it (update_campaign's segment) or start an automation from it.

MCP toollist_segmentsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

Request
curl "https://eu.flockstack.io/api/v1/segments" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a segment

GET/api/v1/segments/{id}

Gets a segment with its rules, live counts and the newest contacts it matches.

MCP toolget_segmentKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The segment's ID

Request
curl "https://eu.flockstack.io/api/v1/segments/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Preview a segment

POST/api/v1/segments/preview

Counts the contacts some rules match, live, without saving them: send either rules or the ID or name of a saved segment. matching is every status, active the contacts that can get email, sendable those the account never suppressed. The list cleanup and the account's warm-up still apply when a campaign goes out (preview_campaign_recipients).

MCP toolpreview_segmentKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter.

segment

body · string

A saved segment's ID or name, instead of rules

rules

body · object

Rules to count, instead of a saved segment

rules.matchrequired

body · "all" | "any"

all: every condition (or group) has to hold. any: one is enough.

rules.conditionsrequired

body · object[]

Conditions, or groups of conditions (a group has match and conditions and no type)

sample

body · integer

How many matching contacts to list, 10 by default

Request
curl -X POST "https://eu.flockstack.io/api/v1/segments/preview" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rules":{"match":"all","conditions":[{"type":"tag","op":"has","value":"vip"}]}}'

Create a segment

POST/api/v1/segments

Saves rules as a segment, up to 50 a newsletter. Rules combine conditions with all (and) or any (or), and a condition can be a group with its own all or any, one level deep. Conditions: status, tag (has or has_not), field (a custom field compared with eq, neq, gt, gte, lt, lte, contains, starts_with, is_set, is_not_set), signup_date (from, to), source, engagement (opened, clicked, opened_or_clicked or dormant over days, or never_opened) and imported. Text comparisons are case sensitive. It follows the list: contacts are matched each time it's counted or sent to.

MCP toolcreate_segmentKeyFull access
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

namerequired

body · string

The segment's name, unique in the newsletter

description

body · string

What the segment is for, 300 characters at most

rulesrequired

body · object

The rules

rules.matchrequired

body · "all" | "any"

all: every condition (or group) has to hold. any: one is enough.

rules.conditionsrequired

body · object[]

Conditions, or groups of conditions (a group has match and conditions and no type)

Request
curl -X POST "https://eu.flockstack.io/api/v1/segments" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Engaged readers","rules":{"match":"all","conditions":[{"type":"engagement","kind":"opened_or_clicked","days":30}]}}'

Update a segment

PATCH/api/v1/segments/{id}

Changes a segment's name, description or rules. Campaigns not yet sent and automations that use it follow the change; a campaign already sending keeps the audience it started with.

MCP toolupdate_segmentKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The segment's ID

name

body · string

The segment's name, unique in the newsletter

description

body · string | null

What the segment is for. null clears it.

rules

body · object

The new rules, which replace the old ones

rules.matchrequired

body · "all" | "any"

all: every condition (or group) has to hold. any: one is enough.

rules.conditionsrequired

body · object[]

Conditions, or groups of conditions (a group has match and conditions and no type)

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/segments/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Engaged this month"}'

Delete a segment

DELETE/api/v1/segments/{id}

Deletes a saved segment. It can't be undone. A segment that a draft, scheduled or sending campaign, or an automation, still uses answers conflict: pick another audience for them first. Campaigns already sent keep the audience they went to.

MCP tooldelete_segmentKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The segment's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/segments/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Automations

Series of emails and actions that start for a contact when they subscribe, get a tag, join a segment or reach a date.

List automations

GET/api/v1/automations

Lists a newsletter's automations, newest first, each with its trigger, steps and how many contacts are in it, finished it or left it. An automation sends a series of emails and changes tags for each contact it starts for.

MCP toollist_automationsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

The newsletter's ID or slug. Default: the account's first newsletter.

status

query · "draft" | "active" | "paused"

Only automations with this status

Request
curl "https://eu.flockstack.io/api/v1/automations" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get an automation

GET/api/v1/automations/{id}

Gets an automation with its trigger, its steps (emails with their content) and how many contacts are in it.

MCP toolget_automationKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The automation's ID

Request
curl "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Create an automation

POST/api/v1/automations

Creates an automation as a draft: nothing is sent until activate_automation. A trigger starts it for a contact (they subscribe, get a tag, join a segment, or reach a date), and steps run in order: send an email, wait, add or remove a tag, or end. Up to 20 steps and 50 automations a newsletter. A contact enters an automation once. Emails go through the same checks as a campaign's: the account's plan emails, suppression and sending limits, with an unsubscribe link in each.

MCP toolcreate_automationKeyFull access
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

namerequired

body · string

The automation's name, 100 characters at most

triggerrequired

body · object

What starts the automation for a contact

trigger.typerequired

body · "subscribed" | "tag_added" | "segment_joined" | "date_field"

subscribed: a contact joins (confirmed, if the newsletter asks for it). tag_added: a contact gets the tag. segment_joined: a contact starts matching the segment, checked about every hour. date_field: the day of a contact's date field, plus offsetDays.

trigger.tag

body · string

tag_added: the tag. subscribed: only contacts who signed up with this tag.

trigger.source

body · string

subscribed: only contacts with this source, e.g. website or api

trigger.segment

body · string

segment_joined: the segment's ID or name

trigger.field

body · string

date_field: the key of a date custom field

trigger.offsetDays

body · integer

date_field: days after the date it starts, negative for before. Default 0.

trigger.repeat

body · "once" | "yearly"

date_field: once, or every year on that day (birthdays, anniversaries). Default once.

trigger.includeExisting

body · boolean

segment_joined: also start for the contacts already in the segment when it's activated. Default false: only the ones who join after.

steps

body · object[]

The steps, in order. Default: none yet.

steps[].id

body · string

A step's ID. Send the IDs you got back so contacts waiting on a step stay on it when the steps change.

steps[].typerequired

body · "email" | "wait" | "add_tag" | "remove_tag" | "end"

email: send an email. wait: wait. add_tag, remove_tag: change the contact's tags. end: the contact is done.

steps[].subject

body · string

email: the subject line, 200 characters at most

steps[].previewText

body · string

email: the text inbox apps show after the subject

steps[].format

body · "markdown" | "rich" | "html"

email: the format of content: markdown (the default), rich (an HTML fragment, what the dashboard editor writes) or html (a complete email)

steps[].content

body · string

email: the body in that format, 500 KB at most. Merge tags like {{first_name|there}} are filled in per contact.

steps[].amount

body · integer

wait: how many units

steps[].unit

body · "minutes" | "hours" | "days"

wait: minutes, hours or days

steps[].tag

body · string

add_tag, remove_tag: the tag

Request
curl -X POST "https://eu.flockstack.io/api/v1/automations" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Welcome series","trigger":{"type":"subscribed"},"steps":[{"type":"email","subject":"Welcome","content":"Thanks for joining, {{first_name|friend}}."},{"type":"wait","amount":2,"unit":"days"},{"type":"email","subject":"Where to start","content":"Here are three issues worth your time."}]}'

Update an automation

PATCH/api/v1/automations/{id}

Changes an automation's name, trigger or steps. The trigger and steps of an active automation can't change: pause_automation first, then activate_automation again. Send all the steps, with the IDs you got back for the ones that stay, so contacts waiting on a step remain on it; a step without an ID is new.

MCP toolupdate_automationKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The automation's ID

name

body · string

The automation's name, 100 characters at most

trigger

body · object

The new trigger

trigger.typerequired

body · "subscribed" | "tag_added" | "segment_joined" | "date_field"

subscribed: a contact joins (confirmed, if the newsletter asks for it). tag_added: a contact gets the tag. segment_joined: a contact starts matching the segment, checked about every hour. date_field: the day of a contact's date field, plus offsetDays.

trigger.tag

body · string

tag_added: the tag. subscribed: only contacts who signed up with this tag.

trigger.source

body · string

subscribed: only contacts with this source, e.g. website or api

trigger.segment

body · string

segment_joined: the segment's ID or name

trigger.field

body · string

date_field: the key of a date custom field

trigger.offsetDays

body · integer

date_field: days after the date it starts, negative for before. Default 0.

trigger.repeat

body · "once" | "yearly"

date_field: once, or every year on that day (birthdays, anniversaries). Default once.

trigger.includeExisting

body · boolean

segment_joined: also start for the contacts already in the segment when it's activated. Default false: only the ones who join after.

steps

body · object[]

All the steps, which replace the old ones

steps[].id

body · string

A step's ID. Send the IDs you got back so contacts waiting on a step stay on it when the steps change.

steps[].typerequired

body · "email" | "wait" | "add_tag" | "remove_tag" | "end"

email: send an email. wait: wait. add_tag, remove_tag: change the contact's tags. end: the contact is done.

steps[].subject

body · string

email: the subject line, 200 characters at most

steps[].previewText

body · string

email: the text inbox apps show after the subject

steps[].format

body · "markdown" | "rich" | "html"

email: the format of content: markdown (the default), rich (an HTML fragment, what the dashboard editor writes) or html (a complete email)

steps[].content

body · string

email: the body in that format, 500 KB at most. Merge tags like {{first_name|there}} are filled in per contact.

steps[].amount

body · integer

wait: how many units

steps[].unit

body · "minutes" | "hours" | "days"

wait: minutes, hours or days

steps[].tag

body · string

add_tag, remove_tag: the tag

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Welcome series, shorter"}'

Activate an automation

POST/api/v1/automations/{id}/activate

Switches an automation on: from now on, contacts the trigger starts for get its emails without anyone asking again, until pause_automation. Sending can't be undone: emails can't be recalled once they go out. Ask the user to confirm first. The account's plan, from address, postal address and every email's size are checked first, and again as the emails go out. A segment trigger starts only the contacts who join the segment from now on, unless includeExisting is true. Contacts who unsubscribe, bounce or complain leave it.

MCP toolactivate_automationKeyFull accessCan't be undoneSafe to repeatReaches outside FlockStack
Parameter
idrequired

path · string

The automation's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678/activate" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Pause an automation

POST/api/v1/automations/{id}/pause

Stops an active automation: no new contacts enter and none move on, and no emails go out. Contacts in it continue where they were when it's activated again.

MCP toolpause_automationKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The automation's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678/pause" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Delete an automation

DELETE/api/v1/automations/{id}

Deletes an automation: it leaves every list and the contacts in it are taken out, so nothing more is sent. It can't be undone. Emails already sent stay sent.

MCP tooldelete_automationKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The automation's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get an automation's report

GET/api/v1/automations/{id}/report

How an automation is doing: how many contacts entered, are in it, finished it or left it (and why), and for each step how many contacts wait to run it and, for emails, how many were sent, delivered, opened, clicked, bounced and complained.

MCP toolget_automation_reportKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The automation's ID

Request
curl "https://eu.flockstack.io/api/v1/automations/6650f1c2e9b1d4a012345678/report" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Domains

Own sending domains with their DNS records, and the shared address.

List domains

GET/api/v1/domains

Lists the account's own sending domains with their DNS records and status as last checked, and each newsletter's shared address (hello@<slug>.<shared domain>), which works with no setup.

MCP toollist_domainsKeyFull accessRead-onlySafe to repeat
Request
curl "https://eu.flockstack.io/api/v1/domains" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Add a domain

POST/api/v1/domains

Adds a domain to send from, in the account's own tenant at the email provider: emails are signed with DKIM and bounces return to a subdomain of it (rp.<domain> on PostShiba, bounce.<domain> on Amazon SES). The answer lists the DNS records to add; check_domain reads them once they're in. Newsletters can send from it once it's verified.

MCP tooladd_domainKeyFull accessReaches outside FlockStack
Parameter
domainrequired

body · string

e.g. example.com. An address or a link works too: jane@example.com and https://www.example.com/about both add example.com.

archiveHost

body · string

Used when the domain's setup lists an archive step: the subdomain for the archive, tracked links and unsubscribe links. Default: news.<domain>.

Request
curl -X POST "https://eu.flockstack.io/api/v1/domains" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com"}'

Check a domain's DNS records

POST/api/v1/domains/{id}/check

Asks the email provider and DNS again whether the domain's records are in, and looks up its DMARC record or its parent domain's. On PostShiba, a check within a minute of the last one answers what that one found. When its setup lists an archive step, the newsletter sending from the domain moves its archive and links to that subdomain once it points at FlockStack.

MCP toolcheck_domainKeyFull accessSafe to repeatReaches outside FlockStack
Parameter
idrequired

path · string

The domain's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/domains/6650f1c2e9b1d4a012345678/check" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Remove a domain

DELETE/api/v1/domains/{id}

Removes a domain from the email provider, and its archive subdomain from FlockStack when its setup lists one. Newsletters on it can't send until they move to another address. Refused while a campaign from it is sending, paused or scheduled. Adding it again needs new DNS records.

MCP toolremove_domainKeyFull accessCan't be undoneSafe to repeatReaches outside FlockStack
Parameter
idrequired

path · string

The domain's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/domains/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Payments

Whether the account can take payments, and connecting its Stripe account. FlockStack takes no cut of sales.

Get the payments status

GET/api/v1/payments

Whether the account can take payments for products and paid subscriptions: on FlockStack Cloud, whether its connected Stripe account can take charges; on a self-hosted server, whether Stripe is set up. refresh asks Stripe for the account's latest status. FlockStack takes no cut of what you earn: your readers pay your own Stripe account, and only Stripe's own processing fee comes off.

MCP toolget_payments_statusKeyFull accessRead-onlySafe to repeatReaches outside FlockStack
Parameter
refresh

query · boolean

Ask Stripe again, e.g. after the account owner finished onboarding. Default: false.

Request
curl "https://eu.flockstack.io/api/v1/payments?refresh=true" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Connect a Stripe account

POST/api/v1/payments/connect

Returns Stripe's own page where the account owner connects their Stripe account, or finishes connecting it: the account is created in their name, so they keep their money, refunds and disputes in their own Stripe dashboard. Nothing is connected until they finish there; get_payments_status shows when it is. Give the URL to the user. A self-hosted server answers conflict: it charges with its owner's own Stripe key. FlockStack takes no cut of what you earn: your readers pay your own Stripe account, and only Stripe's own processing fee comes off.

MCP toolconnect_paymentsKeyFull accessReaches outside FlockStack
Request
curl -X POST "https://eu.flockstack.io/api/v1/payments/connect" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Products

Digital products readers buy once: files kept private, pages on the newsletter's site, Stripe Checkout on your own account.

Create a product

POST/api/v1/products

Creates a digital product for one of the newsletter's readers to buy, as a draft: upload its file with set_product_file, then publish it with update_product (status active). It then has a page at /shop/<slug> on the newsletter's site, and buyers pay through Stripe Checkout and get a download link by email. FlockStack takes no cut: the buyer pays your Stripe account, and only Stripe's own processing fee comes off.

MCP toolcreate_productKeyFull access
Parameter
newsletter

body · string

The newsletter's ID or slug. Default: the account's first newsletter, the one it has had longest.

titlerequired

body · string

The product's name, shown on its page and in Stripe's checkout, 120 characters at most

description

body · string

What the buyer gets, 2,000 characters at most

priceCentsrequired

body · integer

The price in the currency's smallest unit, e.g. 1900 for $19.00 (at least 100)

currency

body · "usd" | "eur" | "gbp" | "cad" | "aud" | "nzd" | "chf" | "sek" | "nok" | "dkk"

Default: usd

slug

body · string

The product page's path on the newsletter's site: /shop/<slug>. Default: made from the title.

imageUrl

body · string

A cover image: an https:// link, e.g. from upload_image. Empty removes it.

Request
curl -X POST "https://eu.flockstack.io/api/v1/products" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Launch checklist","priceCents":1900,"description":"A 12-page PDF of everything to do before you send your first issue."}'

Update a product

PATCH/api/v1/products/{id}

Changes a product's title, description, price, currency, slug or cover image, or puts it on sale (status active) or takes it back to a draft. Send only the fields to change. A price change applies to the next sale; earlier orders keep what they paid. Putting a product on sale needs its file and a Stripe account that can take payments (get_payments_status). FlockStack takes no cut: the buyer pays your Stripe account, and only Stripe's own processing fee comes off.

MCP toolupdate_productKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The product's ID

title

body · string

The product's name, shown on its page and in Stripe's checkout, 120 characters at most

description

body · string

What the buyer gets, 2,000 characters at most

priceCents

body · integer

The price in the currency's smallest unit, e.g. 1900 for $19.00 (at least 100)

currency

body · "usd" | "eur" | "gbp" | "cad" | "aud" | "nzd" | "chf" | "sek" | "nok" | "dkk"

The currency: usd, eur, gbp, cad, aud, nzd, chf, sek, nok, dkk

slug

body · string

The product page's path on the newsletter's site: /shop/<slug>. Default: made from the title.

imageUrl

body · string

A cover image: an https:// link, e.g. from upload_image. Empty removes it.

status

body · "draft" | "active"

active puts it on sale; draft takes it off sale without archiving it. Use archive_product to retire it.

Request
curl -X PATCH "https://eu.flockstack.io/api/v1/products/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"priceCents":2400,"status":"active"}'

List products

GET/api/v1/products

Lists the account's digital products, newest first, with how many each sold and what it earned.

MCP toollist_productsKeyFull accessRead-onlySafe to repeat
Parameter
newsletter

query · string

Only this newsletter's: its ID or slug. Default: every newsletter.

status

query · "draft" | "active" | "archived"

Only products with this status

Request
curl "https://eu.flockstack.io/api/v1/products?status=active" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get a product

GET/api/v1/products/{id}

Gets one product with its file, its public page and what it sold.

MCP toolget_productKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The product's ID

Request
curl "https://eu.flockstack.io/api/v1/products/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Archive a product

POST/api/v1/products/{id}/archive

Takes a product off sale and off the shop. Its earlier buyers keep their download links, and its orders stay. update_product with status draft brings it back.

MCP toolarchive_productKeyFull accessSafe to repeat
Parameter
idrequired

path · string

The product's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/products/6650f1c2e9b1d4a012345678/archive" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Upload a product's file

POST/api/v1/products/{id}/file

Stores the file buyers download, up to 15 MB, sent as base64. It is kept in a private bucket and only ever served through a signed link that expires, never from a public URL. Replacing it changes what every buyer downloads from then on.

MCP toolset_product_fileKeyFull accessReaches outside FlockStack
Parameter
idrequired

path · string

The product's ID

base64required

body · string

The file, base64 encoded; a data: URL works too

fileNamerequired

body · string

The name buyers download it as, e.g. launch-checklist.pdf

contentType

body · string

The file's type, e.g. application/pdf. Default: application/octet-stream.

Request
curl -X POST "https://eu.flockstack.io/api/v1/products/6650f1c2e9b1d4a012345678/file" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base64":"…","fileName":"…"}'

Orders

What readers bought, who got their download link, and resending it. Refunds are made in Stripe.

List orders

GET/api/v1/orders

Lists the orders of the account's products, newest first, 50 a page: who bought, what they paid, whether the download email went out, and refunds. Pass nextCursor back as cursor for the next page.

MCP toollist_ordersKeyFull accessRead-onlySafe to repeat
Parameter
product

query · string

Only this product's orders: its ID

status

query · "paid" | "refunded" | "disputed"

Only orders with this status

limit

query · integer

Orders per page, 50 by default, 100 at most

cursor

query · string

nextCursor from the previous page

Request
curl "https://eu.flockstack.io/api/v1/orders?status=paid&limit=20" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get an order

GET/api/v1/orders/{id}

Gets one order: the buyer, the amount, refunds, how many times the file was downloaded and whether the download email went out.

MCP toolget_orderKeyFull accessRead-onlySafe to repeat
Parameter
idrequired

path · string

The order's ID

Request
curl "https://eu.flockstack.io/api/v1/orders/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Resend an order's download link

POST/api/v1/orders/{id}/resend

Emails the buyer a new download link, valid for 7 days. The earlier link stops working. Refunded and disputed orders can't be resent. Refunds are made in your Stripe dashboard.

MCP toolresend_order_emailKeyFull accessReaches outside FlockStack
Parameter
idrequired

path · string

The order's ID

Request
curl -X POST "https://eu.flockstack.io/api/v1/orders/6650f1c2e9b1d4a012345678/resend" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Images

Pictures for campaign content, on FlockStack's CDN, kept in the account's library to use again.

List images

GET/api/v1/images

Lists the images uploaded to the account, newest first, 50 a page, so a campaign can use one again without uploading it twice. Pass nextCursor back as cursor for the next page.

MCP toollist_imagesKeyFull accessRead-onlySafe to repeat
Parameter
limit

query · integer

Images per page, 50 by default, 100 at most

cursor

query · string

nextCursor from the previous page

Request
curl "https://eu.flockstack.io/api/v1/images?limit=20" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Upload an image

POST/api/v1/images

Stores a PNG, JPEG, GIF or WebP image under 4 MB on FlockStack's CDN and returns its URL for campaign content. Send the file as base64 (under about 3 MB, since requests stop at 4.5 MB) or an https:// link FlockStack downloads. The URL never changes: sent emails keep pointing at it. list_images finds images uploaded before.

MCP toolupload_imageKeyFull accessReaches outside FlockStack
Parameter
base64

body · string

The image file, base64 encoded; a data: URL works too

url

body · string

An https:// link to the image

fileName

body · string

Used in the stored file's name

contentType

body · string

The file's type, checked against its first bytes

Request
curl -X POST "https://eu.flockstack.io/api/v1/images" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/cover.png"}'

API keys

Keys for the REST API and MCP.

List API keys

GET/api/v1/api-keys

Lists the account's API keys, revoked ones included, with their level and when they were last used. Keys themselves are never shown again.

MCP toollist_api_keysKeyFull accessRead-onlySafe to repeat
Request
curl "https://eu.flockstack.io/api/v1/api-keys" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Create an API key

POST/api/v1/api-keys

Creates an API key and returns it once; only its hash is stored. full can do everything a full key can, including creating more keys; signups can only add contacts, for keys that end up in website code. An account has up to 20 active keys: one more answers conflict until one is revoked.

MCP toolcreate_api_keyKeyFull access
Parameter
namerequired

body · string

What the key is for, e.g. Website signups

levelrequired

body · "full" | "signups"

full or signups

Request
curl -X POST "https://eu.flockstack.io/api/v1/api-keys" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Website signups","level":"signups"}'

Revoke an API key

DELETE/api/v1/api-keys/{id}

Revokes an API key for good: requests with it answer unauthorized from now on. A key can revoke itself.

MCP toolrevoke_api_keyKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The API key's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/api-keys/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

List connected apps

GET/api/v1/connected-apps

Lists the apps connected to the account with OAuth, such as ChatGPT, Claude and Grok Bot, with when they were connected and last used. Each one has full access, like a full access API key.

MCP toollist_connected_appsKeyFull accessRead-onlySafe to repeat
Request
curl "https://eu.flockstack.io/api/v1/connected-apps" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Disconnect an app

DELETE/api/v1/connected-apps/{id}

Disconnects an app connected with OAuth: its tokens stop working at once, and it has to ask for access again to come back. An app can disconnect itself.

MCP toolrevoke_connected_appKeyFull accessCan't be undoneSafe to repeat
Parameter
idrequired

path · string

The connected app's ID

Request
curl -X DELETE "https://eu.flockstack.io/api/v1/connected-apps/6650f1c2e9b1d4a012345678" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Billing

Plan, usage and links to Stripe to change plan.

Get the plan and usage

GET/api/v1/billing

The account's plan, subscription status and this month's usage against the plan's limits, with every plan on sale for comparison. Works without an active plan. A self-hosted server has no billing and answers billing_off.

MCP toolget_billingKeyFull accessRead-onlySafe to repeat
Request
curl "https://eu.flockstack.io/api/v1/billing" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Change plan

POST/api/v1/billing/change-plan

Returns a billing page where the account owner picks up the change: Checkout without a paid plan (on a free plan too: the paid plan takes over), the Customer Portal with one (Stripe confirms the exact change there; Polar's portal lists the plans). Nothing changes until they confirm there. Give the URL to the user. A self-hosted server has no billing and answers billing_off.

MCP toolchange_planKeyFull accessReaches outside FlockStack
Parameter
planrequired

body · "starter" | "growth" | "pro" | "scale" | "max"

starter, growth, pro, scale or max

interval

body · "month" | "year"

month (default) or year, which costs 10 months

Request
curl -X POST "https://eu.flockstack.io/api/v1/billing/change-plan" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"growth","interval":"year"}'

Open the billing portal

POST/api/v1/billing/portal

Returns a Customer Portal link (Stripe or Polar) for the account owner: payment method, invoices, plan changes and cancellation. A self-hosted server has no billing and answers billing_off.

MCP toolopen_billing_portalKeyFull accessReaches outside FlockStack
Request
curl -X POST "https://eu.flockstack.io/api/v1/billing/portal" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Export

Everything the account has in ZIP files: contacts, issues, images and settings. Never a paid feature.

Export all account data

POST/api/v1/account/export

Starts an export of everything the account has, as ZIP files: every newsletter's contacts as a CSV (status, source, signup dates, engagement, tags), the suppression list, every issue and draft as Markdown and HTML with frontmatter (title, date, newsletter, archive address, status), the pictures they use, and a manifest.json that lists it all with each newsletter's settings. It is built in the background, which can take minutes for a large account; the account owner gets the download links by email, and get_account_export answers with them once status is ready. The links work for 7 days. Leaving is never a paid feature: it works for blocked accounts, paused ones and accounts without a plan. While an export is being made, calling this again answers that export with started false.

MCP toolexport_account_dataKeyFull accessReaches outside FlockStack
Request
curl -X POST "https://eu.flockstack.io/api/v1/account/export" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"

Get an account export

GET/api/v1/account/export

Gets an account export by ID, or the latest one: its status and, once it is ready, the download links. Works for blocked accounts and accounts without a plan.

MCP toolget_account_exportKeyFull accessRead-onlySafe to repeat
Parameter
id

query · string

The export's ID. Default: the latest one.

Request
curl "https://eu.flockstack.io/api/v1/account/export" \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY"