Me Send DocsDashboard

API keys

Every request to https://api.mesend.co carries Authorization: Bearer <key>. A key belongs to one project and sees only that project's data.

Permissions

PermissionCan do
full_accessEverything the API offers. This is the default for a new key.
sending_accessOnly POST /emails and POST /emails/batch. Any other call answers 401 restricted_api_key.
supportRead-only: list and read emails, received emails and domains. It cannot send. Support keys are issued by the project operator, not over the API.

Use a sending-only key in the application that sends mail, so a leaked key cannot read your email log or change your configuration.

Create a key

curl https://api.mesend.co/api-keys \
  -H "Authorization: Bearer $ME_SEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Production sender","permission":"sending_access"}'

The response is { "id": "...", "token": "re_..." }. The token is shown once: only a SHA-256 hash is stored, so a lost key cannot be recovered, only replaced. name is required and at most 50 characters.

Restrict a key to one domain

A sending_access key can carry a domain_id. It may then send only from that domain; a send from any other domain answers 403 validation_error.

{ "name": "Billing mailer", "permission": "sending_access", "domain_id": "<domain id>" }

domain_id is refused on a full_access key and must be a domain of this project.

Manage keys

Managing keys needs a full_access key. An OAuth access token cannot create or delete keys or domains.

What an invalid key returns

SituationResponse
No Authorization header401 missing_api_key
Unknown key on a send endpoint401 validation_error
Unknown key anywhere else400 validation_error
Sending-only key on a non-send endpoint401 restricted_api_key

OAuth for apps

An app can act on one project without being given a key. See CLI, MCP server and SMTP.