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. 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_ and are shown once: Mailkit 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.

On a newsletter shared with you, the keys you create with it open in the dashboard work on that newsletter alone, with your role on its team, up to 5 of them. Endpoints your role doesn't run answer 403 forbidden, and its owner's other newsletters 404 not_found. They stop once you're off the team.

Header
Authorization: Bearer mc_…

Three levels

LevelCan
Full accessEvery endpoint and MCP tool, including creating and revoking keys. Keep it on a server or in your AI assistant's settings.
Signups onlyOnly 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.
TransactionalOnly send_email, get_email, list_emails, list_templates, get_template, for sign-in codes, password resets and other emails your app sends one person at a time. Keep it on your app's server.

A signups only or transactional key calling anything else gets 403 forbidden. Keys made before levels existed are signups only. Revoked keys get 401 unauthorized.

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://mailkit.wara.dev/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_contact30,000 an hour, 5 per visitor in 10 minutes
update_newsletter3 slug changes a day per account
get_summary120 an hour
answer_review_questions5 an hour
check_newsletter_slug300 an hour
send_welcome_test_email20 an hour
set_website_domain10 an hour
check_website_domain60 an hour
invite_team_member10 an hour
preview_summary_email30 an hour
send_inbox_check_email3 a day
create_campaign60 an hour
duplicate_campaign60 an hour
count_section_readers600 an hour
send_test_email30 an hour
get_campaign_tips60 an hour
schedule_campaign30 an hour
send_campaign30 an hour
send_campaign_to_more30 an hour
resume_campaign30 an hour
update_campaign_archive240 an hour
preview_campaign_cleanup30 an hour
create_author60 an hour
create_automation60 an hour
update_automation600 an hour
turn_on_automation60 an hour
send_automation_test_email20 an hour
add_to_automation120 an hour
update_contacts_status60 an hour
tag_contacts120 an hour
untag_contacts120 an hour
delete_contact120 an hour
delete_contacts60 an hour
import_contacts120 an hour
bring_back_contacts120 an hour
export_contacts30 an hour
create_contact_field60 an hour
count_segment600 an hour
create_segment60 an hour
add_domain10 an hour
check_domain60 an hour
upload_image60 an hour
create_video_block60 an hour
create_api_key10 an hour
change_plan30 an hour
open_billing_portal30 an hour
preview_plan_cancellation60 an hour
cancel_plan10 an hour
keep_plan10 an hour
remind_before_renewal10 an hour

Plans

This server is self-hosted without billing: no plans and no limits on emails or subscribers. The billing endpoints answer 404 billing_off.