Guides

Authentication

Every request carries an API key as a bearer token. The key decides the account, and its level decides what it can do: read only, drafts only, send with approval, full access or signups only. ChatGPT and Claude don't need one: they connect to the MCP server with OAuth.

Send the key

Create keys on the dashboard's API keys page. They start with mc_, or mc_eu_ for an account in the European Union, and are shown once: FlockStack only keeps their hash, their first characters and when they were last used. The REST API and the MCP server take the same header. An account has up to 20 active keys.

Header
Authorization: Bearer mc_…

Regions

An account lives in one region, and its keys only work there: https://flockstack.io for the United States, https://eu.flockstack.io for the European Union. A key from the other region answers 401 unauthorized. The prefix tells them apart: mc_ and 43 more characters in the United States, mc_eu_ and 43 in the European Union. See where your data is stored.

Secret scanning

To find FlockStack keys in code, logs or a secret scanner's custom patterns, match both formats with this regular expression.

Regular expression
(?<![A-Za-z0-9_-])mc_(?:eu_)?[A-Za-z0-9_-]{43}(?![A-Za-z0-9_-])

Levels

LevelIn the APICan
Read onlyread_onlyLooks at campaigns, subscribers and reports. Changes nothing.
Drafts onlydraftsReads everything and writes drafts: campaigns, templates, segments and automations that don't go out. Can't send, schedule, publish, delete, import or touch settings.
Send with approvalsend_with_approvalDoes the work, then asks you before anything goes out or can't be undone. Sends, schedules, deletes and large imports wait for your OK on the Approvals page.
Full accessfullEverything the dashboard does, with no review: sending, deleting, API keys and billing. Keep it on a server you control.
Signups onlysignupsOnly add_contact (POST /api/v1/contacts), for signup forms. It can go in a web page: that endpoint answers browsers, and the key can't read or send anything.

Calling something its level doesn't allow gets 403 forbidden, and MCP lists only the tools a key can run. A key can also be limited to one newsletter, capped at a number of calls a day (429 daily_cap_reached past it) and set to expire (401 unauthorized after). Keys made before levels existed are signups only, and keys made as full access stay full. Revoked keys get 401 unauthorized. A send with approval key's sends and deletes wait for the owner: see Agent safety.

A signup form

With a signups only key, from the browser. Pass the visitor's IP from a server to limit signups per visitor.

JavaScript
await fetch("https://flockstack.io/api/v1/contacts", {
  method: "POST",
  headers: {
    Authorization: "Bearer mc_your_signups_only_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ email: form.email.value, source: "website" }),
});

Rate limits

Each key gets 300 requests a minute across REST and MCP. Some actions have their own limit, for each key and for the account: its keys, connected apps and dashboard share the account's, so more keys don't raise it. Over a limit the answer is 429 rate_limited; wait and retry.

add_contact600 an hour, 5 per visitor in 10 minutes
update_newsletter3 slug changes a day per account
refresh_subscription_revenue120 an hour
get_creator_matches120 an hour
send_creator_intro30 an hour
reply_creator_intro60 an hour
preview_campaign_as_reader60 an hour
import_stripe_subscribers20 an hour
bootstrap_newsletter20 an hour
onboard_brand_domains3 an hour
export_report60 an hour
check_newsletter_slug300 an hour
send_welcome_test_email20 an hour
set_newsletter_mount20 an hour
check_newsletter_mount30 an hour
rotate_newsletter_mount_token10 an hour
create_campaign60 an hour
duplicate_campaign60 an hour
send_test_email30 an hour
schedule_campaign30 an hour
send_campaign30 an hour
send_campaign_to_more30 an hour
resend_campaign30 an hour
resume_campaign30 an hour
preview_campaign_cleanup30 an hour
preview_campaign_recipients30 an hour
bulk_update_campaigns60 an hour
check_campaign60 an hour
preview_feed60 an hour
create_series60 an hour
run_series30 an hour
create_briefing30 an hour
run_briefing6 an hour
add_ai_key20 an hour
check_ai_key30 an hour
create_template60 an hour
create_snippet120 an hour
delete_contact120 an hour
import_contacts120 an hour
export_contacts30 an hour
approve_held_signups60 an hour
reject_held_signups60 an hour
create_form60 an hour
create_post_import20 an hour
start_post_import20 an hour
add_redirect300 an hour
import_redirects60 an hour
search_recommendable_newsletters120 an hour
add_recommendation30 an hour
update_recommendation60 an hour
remove_recommendation60 an hour
create_audio_version30 an hour
add_tag600 an hour
remove_tag600 an hour
delete_tag60 an hour
create_custom_field60 an hour
delete_custom_field60 an hour
set_contact_field600 an hour
preview_segment600 an hour
create_segment60 an hour
create_segment_snapshot30 an hour
create_poll120 an hour
create_survey60 an hour
export_survey_responses30 an hour
create_automation60 an hour
activate_automation30 an hour
get_automation_report120 an hour
enroll_contacts120 an hour
create_automation_from_template60 an hour
add_domain10 an hour
check_domain60 an hour
set_apex_website60 an hour
connect_payments30 an hour
refresh_group_subscription60 an hour
create_group_checkout30 an hour
invite_group_seat100 an hour
send_group_manager_link30 an hour
list_group_invoices60 an hour
open_group_billing_portal30 an hour
refresh_reader_billing30 an hour
schedule_reader_pause30 an hour
cancel_reader_pause30 an hour
resume_reader_subscription30 an hour
accept_reader_save_offer30 an hour
cancel_reader_subscription30 an hour
request_sponsorship30 an hour
create_sponsorship_invoice30 an hour
refresh_sponsorship_invoice60 an hour
email_sponsorship_invoice30 an hour
email_sponsorship_manager30 an hour
cancel_sponsorship_booking30 an hour
upload_sponsorship_asset30 an hour
create_product60 an hour
set_product_file30 an hour
resend_order_email30 an hour
generate_image10 an hour
upload_image60 an hour
upload_file30 an hour
search_stock_photos120 an hour
use_stock_photo60 an hour
search_gifs120 an hour
create_api_key10 an hour
create_webhook_endpoint30 an hour
rotate_webhook_secret10 an hour
send_test_webhook30 an hour
resend_webhook_delivery120 an hour
change_plan30 an hour
add_dedicated_ip30 an hour
open_billing_portal30 an hour
export_account_data1 every 5 minutes

Plans

Every account has a plan, the Free plan until it pays for one (get_billing says which), so the API and MCP work on it with the Free plan's limits: 2,500 subscribers, 10,000 emails a month, 1 webhook endpoint, 1 newsletter and 2 automations. Its first 3 campaigns go to 500 people at most, refused with plan_limit_emails and the numbers. A paid plan that ends puts the account back on Free, with its data kept. Signups and confirmation emails keep coming in over the plan's limits. On a paid plan, sending goes on past the plan's emails as extra emails, at $0.15 per 1,000, up to the monthly limit the owner sets with set_extra_emails_limit; extraEmails in get_billing has the count, the limit and the cost so far. Past that limit, or on the Free plan or a plan from FlockStack, campaign sends stop with plan_limit_emails, and over the subscribers with plan_limit_subscribers. Welcome emails count toward the month's emails like issues: once they're used up, new subscribers get none until the count starts over or the plan grows, and don't get one later. usage.welcomeEmailsPaused in get_billing and get_overview says so.