Skip to content
Mailwright

Help center

API reference

Use an API key to send mail and manage campaigns from your own code.

Updated: November 12, 2026

Base URL and auth

The v1 API lives at /backend/v1 on this site. Authenticate with an API key from Settings → API & webhooks, sent as the X-API-Key header or as Authorization: Bearer <key>.

Keys are shown once when created; keep the secret somewhere safe.

Check a key

GET /v1/me returns the workspace, the key permissions, and the plan limits. Example: curl -H "Authorization: Bearer <your key>" https://mailwright.tech/backend/v1/me

Endpoints

Every endpoint below needs a valid key; the permission column is the permission the key must carry.

  • GET /v1/me — workspace, key permissions, plan limits.
  • GET /v1/senders — mailboxes the key may send from (senders.read).
  • POST /v1/emails — send one plain email, 202, idempotent via Idempotency-Key (send.plain).
  • POST /v1/emails/personalized — send one email rendered with merge tags (send.personalized).
  • GET /v1/emails/{email_id} — delivery status for one email.
  • GET /v1/campaigns — paged campaign list (campaigns.read).
  • POST /v1/campaigns — create a campaign with leads (campaigns.create).
  • GET /v1/campaigns/{campaign_id} — one campaign (campaigns.read).
  • GET /v1/campaigns/{campaign_id}/analytics — campaign analytics (analytics.read).
  • POST /v1/campaigns/{campaign_id}/launch — enqueue a campaign send; preflight applies (campaigns.send).

Limits and errors

Each key has its own per-minute rate limit and optional daily and monthly send limits. A key without the permission for an endpoint gets 403 permission_denied.

A revoked, expired, or unknown key gets 401 invalid_api_key. Exceeding the per-minute limit returns 429 rate_limited. Usage counts only calls that pass the permission check.

Webhooks

Outbound webhooks are configured in Settings → API & webhooks. The signing secret is shown once. Test deliveries use the test.ping event.

Retries run after 1 minute, 5 minutes, 30 minutes, 2 hours, and 12 hours. The endpoint pauses after 20 failed deliveries.

Related

Did this help?

Still stuck? Contact support