Guides
Authentication
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.
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.
(?<![A-Za-z0-9_-])mc_(?:eu_)?[A-Za-z0-9_-]{43}(?![A-Za-z0-9_-])Levels
| Level | In the API | Can |
|---|---|---|
| Read only | read_only | Looks at campaigns, subscribers and reports. Changes nothing. |
| Drafts only | drafts | Reads 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 approval | send_with_approval | Does 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 access | full | Everything the dashboard does, with no review: sending, deleting, API keys and billing. Keep it on a server you control. |
| Signups only | signups | Only 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.
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_contact | 600 an hour, 5 per visitor in 10 minutes |
| update_newsletter | 3 slug changes a day per account |
| refresh_subscription_revenue | 120 an hour |
| get_creator_matches | 120 an hour |
| send_creator_intro | 30 an hour |
| reply_creator_intro | 60 an hour |
| preview_campaign_as_reader | 60 an hour |
| import_stripe_subscribers | 20 an hour |
| bootstrap_newsletter | 20 an hour |
| onboard_brand_domains | 3 an hour |
| export_report | 60 an hour |
| check_newsletter_slug | 300 an hour |
| send_welcome_test_email | 20 an hour |
| set_newsletter_mount | 20 an hour |
| check_newsletter_mount | 30 an hour |
| rotate_newsletter_mount_token | 10 an hour |
| create_campaign | 60 an hour |
| duplicate_campaign | 60 an hour |
| send_test_email | 30 an hour |
| schedule_campaign | 30 an hour |
| send_campaign | 30 an hour |
| send_campaign_to_more | 30 an hour |
| resend_campaign | 30 an hour |
| resume_campaign | 30 an hour |
| preview_campaign_cleanup | 30 an hour |
| preview_campaign_recipients | 30 an hour |
| bulk_update_campaigns | 60 an hour |
| check_campaign | 60 an hour |
| preview_feed | 60 an hour |
| create_series | 60 an hour |
| run_series | 30 an hour |
| create_briefing | 30 an hour |
| run_briefing | 6 an hour |
| add_ai_key | 20 an hour |
| check_ai_key | 30 an hour |
| create_template | 60 an hour |
| create_snippet | 120 an hour |
| delete_contact | 120 an hour |
| import_contacts | 120 an hour |
| export_contacts | 30 an hour |
| approve_held_signups | 60 an hour |
| reject_held_signups | 60 an hour |
| create_form | 60 an hour |
| create_post_import | 20 an hour |
| start_post_import | 20 an hour |
| add_redirect | 300 an hour |
| import_redirects | 60 an hour |
| search_recommendable_newsletters | 120 an hour |
| add_recommendation | 30 an hour |
| update_recommendation | 60 an hour |
| remove_recommendation | 60 an hour |
| create_audio_version | 30 an hour |
| add_tag | 600 an hour |
| remove_tag | 600 an hour |
| delete_tag | 60 an hour |
| create_custom_field | 60 an hour |
| delete_custom_field | 60 an hour |
| set_contact_field | 600 an hour |
| preview_segment | 600 an hour |
| create_segment | 60 an hour |
| create_segment_snapshot | 30 an hour |
| create_poll | 120 an hour |
| create_survey | 60 an hour |
| export_survey_responses | 30 an hour |
| create_automation | 60 an hour |
| activate_automation | 30 an hour |
| get_automation_report | 120 an hour |
| enroll_contacts | 120 an hour |
| create_automation_from_template | 60 an hour |
| add_domain | 10 an hour |
| check_domain | 60 an hour |
| set_apex_website | 60 an hour |
| connect_payments | 30 an hour |
| refresh_group_subscription | 60 an hour |
| create_group_checkout | 30 an hour |
| invite_group_seat | 100 an hour |
| send_group_manager_link | 30 an hour |
| list_group_invoices | 60 an hour |
| open_group_billing_portal | 30 an hour |
| refresh_reader_billing | 30 an hour |
| schedule_reader_pause | 30 an hour |
| cancel_reader_pause | 30 an hour |
| resume_reader_subscription | 30 an hour |
| accept_reader_save_offer | 30 an hour |
| cancel_reader_subscription | 30 an hour |
| request_sponsorship | 30 an hour |
| create_sponsorship_invoice | 30 an hour |
| refresh_sponsorship_invoice | 60 an hour |
| email_sponsorship_invoice | 30 an hour |
| email_sponsorship_manager | 30 an hour |
| cancel_sponsorship_booking | 30 an hour |
| upload_sponsorship_asset | 30 an hour |
| create_product | 60 an hour |
| set_product_file | 30 an hour |
| resend_order_email | 30 an hour |
| generate_image | 10 an hour |
| upload_image | 60 an hour |
| upload_file | 30 an hour |
| search_stock_photos | 120 an hour |
| use_stock_photo | 60 an hour |
| search_gifs | 120 an hour |
| create_api_key | 10 an hour |
| create_webhook_endpoint | 30 an hour |
| rotate_webhook_secret | 10 an hour |
| send_test_webhook | 30 an hour |
| resend_webhook_delivery | 120 an hour |
| change_plan | 30 an hour |
| add_dedicated_ip | 30 an hour |
| open_billing_portal | 30 an hour |
| export_account_data | 1 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.