Quickstart

Three steps: mint a key with the capabilities you need, verify the domain you will send from, then fire a POST at /emails.

Create an API key

API keys are scoped to a single project. Open the sevk dashboard, pick the project, then go to Settings → API Keys and issue a new key.

When you create the key, select only the capabilities it actually needs. For sending transactional mail, email:send is enough. If the key will only ever send from one verified domain, pin the key to that domain. Any request with a different from domain will be rejected with a 403 before it hits the queue.

Verify a domain

sevk refuses to send from a domain that is not verified on the project. Add the domain under Domains, publish the DNS records sevk shows you (SPF, DKIM, and the return-path CNAME), and wait for the status to flip to verified. Only then will POST /emails accept a from on that domain.

Send your first email

Once the project has a verified domain and a funded balance, this request will queue a transactional email and return the resulting email id:

curl -X POST https://api.sevk.io/emails \
-H "Authorization: Bearer sevk_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"from": "sevk <[email protected]>",
"subject": "Hello from sevk",
"html": "<p>First send.</p>"
}'

A successful response contains id: the sevk email id you can use to look up delivery status, webhook events, and rendering history. Outbound quota and the per-email price are reserved against your balance during the POST /emails request itself; the actual SMTP handoff then happens on a worker.

Common first-send errors

  • 403, domain not verified: the from domain is not attached to this project or its DNS has not propagated yet.
  • 400, insufficient balance: the project has no free-tier credits left and the balance cannot cover the send.
  • 403, key restricted: the API key is pinned to a different domain than the one you tried to send from.