Mailpark
Get started

Authentication

Every request carries an API key as a bearer token. Keys belong to one account, are either test or live, and have scopes that limit what they can do.

curl https://api.mailpark.io/v1/me \
  -H "Authorization: Bearer sk_test_…"

A missing or wrong key returns 401 unauthorized. Check a key with GET /v1/me: it returns the key's name, environment and scopes.

Test and live keys

PrefixSends real emailUse it for
sk_test_…Never. Everything lands in the test inbox.Development, CI, and AI agents.
sk_live_…Yes, once a person has gone live.Your production app.

Create keys in Settings → API keys. The full key is shown once. Revoking a key stops it straight away. Read more in test and live mode.

Keep keys out of code
Store keys in environment variables or your secret manager. Never commit them or ship them to a browser: anyone with a key can send email as you.

Scopes

A key can only call endpoints its scopes allow; anything else returns 403 missing_scope. Reading most objects needs no scope. New keys get every scope except sequences:activate on live keys.

ScopeAllows
emails:sendSend single and batch emails.
contacts:writeCreate, update and delete contacts and lists.
events:writeRecord events and define event types.
templates:writeCreate and change templates and upload images.
broadcasts:draftDraft broadcasts. Approving them is always a person's job.
sequences:writeCreate, change and turn off sequences.
sequences:activateTurn sequences on. Test keys only.
webhooks:writeAdd and remove webhooks.
logs:readRead the send log, contacts, events and activity.
domains:writeAdd, remove and set up sending domains.

What only people can do

Some actions always need someone signed in to the web app. API keys, and so AI agents, get 403 humans_only:

  • Approve, reject or release broadcasts
  • Go live
  • Resume marketing after a pause
  • Change the plan, billing, payment method or spending cap
  • Create or revoke API keys, and manage the team
  • Bulk-delete contacts

Agents can still prepare all of it. A drafted broadcast comes back with an approval_url: give that link to the person who approves it.

Audit log

Every change made with a key is recorded with the key's name. Read it with GET /v1/activity, or filter to one key with ?actor_type=api_key&actor_id=key_….