Skip to main content

1. Create a workspace

curl -X POST https://api.torpedo.co.mz/api/v1/workspaces \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme Corp" }'
Save the apiKey.key from the response. It is returned once only and cannot be recovered.

2. Add a domain

curl -X POST https://api.torpedo.co.mz/api/v1/domains \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "myapp.com" }'
The response includes DNS records. Add all of them to your DNS provider:
TypeNameValue
CNAMEtorpedo1._domainkey.myapp.comtorpedo1.dkim.amazonses.com
CNAMEtorpedo2._domainkey.myapp.comtorpedo2.dkim.amazonses.com
CNAMEtorpedo3._domainkey.myapp.comtorpedo3.dkim.amazonses.com
TXTmyapp.comv=spf1 include:amazonses.com ~all
TXT_dmarc.myapp.comv=DMARC1; p=none;
DNS propagation can take a few minutes to a few hours depending on your provider’s TTL settings.

3. Verify the domain

Once DNS has propagated, trigger a verification check:
curl -X POST https://api.torpedo.co.mz/api/v1/domains/DOMAIN_ID/verification-checks \
  -H "X-API-Key: YOUR_API_KEY"

4. Send your first email

curl -X POST https://api.torpedo.co.mz/api/v1/emails \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@myapp.com>",
    "to": "user@example.com",
    "subject": "Welcome to Acme",
    "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    "text": "Welcome! Thanks for signing up."
  }'
The response is 202 Accepted — email is queued and will be delivered asynchronously.
You’ve sent your first email with Torpedo.

Next steps

Set up webhooks

Get notified on delivery, bounces, and complaints

Manage suppressions

Understand and manage the suppression list