API and MCP

Your code and your agents do the work. A person approves

Plan, write, edit and read results through the API. Connect Claude, ChatGPT or your own agent over MCP. Nothing they prepare goes out until someone on your team approves it.

How it works

Code and agents work like a teammate who can write but cannot press send.

  1. 1

    Connect

    The owner creates an API key in Settings, with a name and only the scopes it needs. Or a teammate adds Mape to their assistant and signs in.

  2. 2

    Draft and edit

    Send a brief and Mape writes the email in your brand, or send a finished document. Change it by replacing parts or by asking in words.

  3. 3

    Ask for review

    Your code or your agent moves the email to “In review”. The team is told, and the email waits.

  4. 4

    A person approves

    Someone on your team reads it in Mape and approves it. After it goes out, your code reads the results or gets a webhook.

What the API can do

A plain JSON API with a bearer key. It is one of the ways into the email router: whatever comes in this way gets the same design, checks and tracking as an email written by hand.

  • Emails

    List them by status and read one in full: its document, status, theme and a summary of its results. Create a draft from a brief or from a full document. Edit it, ask for review, and get the preview as HTML.

  • Contacts

    List and search, read one, and add or update a contact by email address, with name, tags and your own fields.

  • Groups and tags

    List groups and tags, create them, and add or remove contacts.

  • Results

    For each email: the plain sentence, the three rates, orders and sales. Plus the trend over your last 12 emails. Opens are estimated.

  • Themes

    List the themes on the account, so a script knows which design a draft will take.

  • Webhooks

    Mape calls your server when an email goes into review, is approved or is sent, when someone subscribes or unsubscribes, and when results are ready. Each call is signed, and retried for 24 hours.

Lists come in pages with a cursor. Every request that creates something takes an Idempotency-Key header, kept for 24 hours, so a retry never makes a second draft. The full description is served as an OpenAPI file at /v1/openapi.json. To turn HTML or Markdown that your systems already produce into a draft, use Inbound Drafts; its requests are in the docs.

Two ways in, a few lines each

One request from your code, or one address in your agent’s settings.

From your code

Send a brief and Mape writes the email from your brand and your store data. With request_review it goes straight to your team.

Draft an email from a brief
curl https://api.mape.email/v1/emails \
  -H "Authorization: Bearer $MAPE_API_KEY" \
  -H "Idempotency-Key: autumn-blend-week-49" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Autumn blend",
    "brief": "The autumn blend is back this week.",
    "layout": "announcement",
    "request_review": true
  }'
The answer, shortened
{
  "email": {
    "id": "0d6f3c1e-8a52-4b7e-9c1f-2e5a7b9d4c10",
    "title": "Autumn blend",
    "status": "in_review",
    "origin": "ai",
    "subject": "The autumn blend is back"
  },
  "credits_charged": 2
}

Send a document in place of the brief and the email is stored as you wrote it, for no credits.

From your agent

In Claude or ChatGPT, add the server’s address and sign in to Mape: you pick the account and what the assistant may do. An agent on a server sends an API key instead. Many MCP clients read a file like this one.

MCP configuration, with an API key
{
  "mcpServers": {
    "mape": {
      "type": "http",
      "url": "https://api.mape.email/mcp",
      "headers": { "Authorization": "Bearer ${MAPE_API_KEY}" }
    }
  }
}
  • plan_weekMape proposes the week’s emails, as its planner does
  • list_emailsList emails, filtered by status
  • get_emailOne email with its document and results
  • draft_emailDraft an email from a brief or a finished document
  • edit_emailChange an email in words
  • request_reviewMove an email to “In review”
  • preview_emailThe email as readers see it, on a phone and on a desktop
  • list_contactsList and search contacts
  • get_resultsResults of one email, or the recent trend

Three ways to do the same work

A draft is the same draft whoever made it. In Mape it reads “via API” with the key’s name, or “via MCP” with the assistant’s.

Task In MapeAPIMCP
Plan the week’s emails Yes No Yes
Draft an email from a brief Yes Yes Yes
Bring a finished email Yes Yes Yes
Change an email by asking in words Yes Yes Yes
Preview it Yes Yes Yes
Ask the team to review it Yes Yes Yes
Read results Yes Yes Yes
Look up contacts Yes Yes Yes
Add or update contacts, groups and tags Yes Yes No
Approve and send A person, always No No

The one rule: a person approves

No API key and no agent can approve or send an email. They also cannot mark someone as subscribed without proof of consent, change your plan, or invite teammates.

Keys are made by the account owner in Settings. Each has a name, scopes and, if you want, an expiry date. A key is shown once and then stored only as a hash. The list shows its last four characters and when it was last used.

  • Six scopes: read or write emails, read or write contacts, read results, read themes
  • Revoking a key or signing an assistant out works at once
  • A key is never a user: every action is recorded with the key’s name
  • A suppressed address can be added, never removed

Limits and what it costs

The API and MCP are part of every plan. Reading, listing and sending your own finished text are free.

When you ask Mape to write, it costs AI credits exactly as in the app: usually 2 credits for an email from a brief and 1 credit for a change asked in words. Longer emails cost more. The weekly plan uses no credits. A daily ceiling on credits spent through the API stops a runaway script.

Over a limit, the answer is 429 with a Retry-After header. Contacts you add count toward your plan like any import.

PlanRequests a minuteRequests a day
Starter6010,000
Growth12050,000
Pro300200,000
Scale and Custom600500,000

Questions, answered

Can a script or an agent send an email on its own?

No. No API key and no agent can approve or send an email. No scope grants it, and the MCP server has no approve or send tool. The furthest they go is “In review”, which tells your team. Approval stays a person’s tap in Mape.

Which assistants does it work with?

Claude, ChatGPT or your own agent. Mape runs a remote MCP server. A person signs in to Mape from the assistant and picks the account and what it may do. An agent that runs on a server can use an API key instead.

Does it use AI credits?

Only when Mape does the writing, and at the same price as in the app: usually 2 credits for an email written from a brief, and 1 credit for a change asked in words. Longer emails cost more. If your code or your agent supplies the finished email, no credits are charged. The weekly plan uses no credits.

What if a key leaks?

Revoke it in Settings and it stops working at once. Until then it can only do what its scopes allow, it can never send, and a daily ceiling on credit spend from the API keeps a stolen key or a runaway script from emptying your balance. Keys start with mape_, so secret scanners recognise them.

Can the API subscribe people to my list?

Only with proof that they agreed: where, when and the words they agreed to. Without it the contact is stored as “No consent yet” and is not emailed. Unsubscribing through the API is always allowed. A suppressed address can be added through the API but never removed.

Could text inside an email or a contact trick the agent?

Mape’s tools mark contact and imported text as data when they return it, and they never follow instructions found in email bodies, contact fields or inbound emails. It is the same rule Mape’s own AI follows.

Is it on my plan?

Yes. The API and the MCP server are on every plan. Plans differ only in how many requests you can make.

Let your code write. Keep the last word

An API, an MCP server and a team that approves every send, on every plan.

Get started