> ## Documentation Index
> Fetch the complete documentation index at: https://torpedo.co.mz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first email in under 5 minutes

## 1. Create your account and API key

[Sign up for Torpedo](https://torpedo.co.mz/signup), create a workspace, and create an API key
from the dashboard. Copy the key when it is shown—it is returned **once only** and cannot be
recovered.

Store the key as `TORPEDO_API_KEY` in your application's server-side secret storage. Never put it
in browser code, a mobile application, source control, logs, or an MCP request.

***

## 2. Add a domain

```bash cURL theme={null}
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" }'
```

```js Node.js theme={null}
const res = await fetch('https://api.torpedo.co.mz/api/v1/domains', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.TORPEDO_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ domain: 'myapp.com' }),
})
const { data } = await res.json()
// data.dns contains the DNS records to add
```

The response includes DNS records. Add all of them to your DNS provider:

| Type | Name | Value |
| - | - | - |
| CNAME | `torpedo1._domainkey.myapp.com` | `torpedo1.dkim.amazonses.com` |
| CNAME | `torpedo2._domainkey.myapp.com` | `torpedo2.dkim.amazonses.com` |
| CNAME | `torpedo3._domainkey.myapp.com` | `torpedo3.dkim.amazonses.com` |
| TXT | `myapp.com` | `v=spf1 include:amazonses.com ~all` |
| TXT | `_dmarc.myapp.com` | `v=DMARC1; p=none;` |

> [!NOTE]
>
> 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:

```bash cURL theme={null}
curl -X POST https://api.torpedo.co.mz/api/v1/domains/DOMAIN_ID/verification-checks \
  -H "X-API-Key: YOUR_API_KEY"
```

```js Node.js theme={null}
const res = await fetch(
  `https://api.torpedo.co.mz/api/v1/domains/${domainId}/verification-checks`,
  {
    method: 'POST',
    headers: { 'X-API-Key': process.env.TORPEDO_API_KEY },
  }
)
const { data } = await res.json()
console.log(data.status) // 'verified' when DNS is set up correctly
```

***

## 4. Send your first email

```bash cURL theme={null}
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."
  }'
```

```js Node.js theme={null}
const res = await fetch('https://api.torpedo.co.mz/api/v1/emails', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.TORPEDO_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    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.',
  }),
})
const { data } = await res.json()
console.log(data.id) // email ID
console.log(data.status) // 'queued'
```

```python Python theme={null}
import httpx

res = httpx.post(
    'https://api.torpedo.co.mz/api/v1/emails',
    headers={'X-API-Key': TORPEDO_API_KEY},
    json={
        '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.',
    },
)
data = res.json()['data']
print(data['id'], data['status'])  # queued
```

The response is `202 Accepted` — email is queued and will be delivered asynchronously.

> [!TIP]
>
> You've sent your first email with Torpedo.

## Verify a phone number

The same API key can send one-time codes over WhatsApp. No domain is needed for this:

```bash theme={null}
curl -X POST https://api.torpedo.co.mz/api/v1/verify \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "+258841234567" }'
```

Then check the code the user types with `POST /api/v1/verify/{id}/check`. You need a WhatsApp balance
first; see [Verify phone numbers on WhatsApp](https://torpedo.co.mz/docs/guides/whatsapp-verify.md).

## Next steps

> [card] [Verify phone numbers](https://torpedo.co.mz/docs/guides/whatsapp-verify.md)
>
> Send WhatsApp one-time codes with SMS fallback

> [card] [Set up webhooks](https://torpedo.co.mz/docs/guides/webhooks.md)
>
> Get notified on delivery, bounces, and complaints

> [card] [Manage suppressions](https://torpedo.co.mz/docs/guides/manage-suppressions.md)
>
> Understand and manage the suppression list


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.