Skip to main content
POST
/
api
/
v1
/
emails
Send email
curl --request POST \
  --url https://api.torpedo.co.mz/api/v1/emails \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "from": "Acme <hello@myapp.com>",
  "to": "user@example.com",
  "subject": "Welcome to Acme",
  "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "queued"
  }
}

Authorizations

X-API-Key
string
header
required

Prefix tor_ followed by a base64url-encoded random key. Obtain one from POST /api/v1/workspaces or POST /api/v1/auth/keys.

Headers

Idempotency-Key
string

Optional unique key for deduplication. If a request with the same key has already been accepted, returns the original response without sending again.

Body

application/json

Provide at least one of html or text.

from
string
required

Sender address. Must use a verified domain. Accepts bare email or display name format.

Example:

"Acme <hello@myapp.com>"

to
string<email>
required
Example:

"user@example.com"

subject
string
required
Example:

"Welcome to Acme"

html
string

HTML body of the email. If text is omitted, Torpedo generates plain text from this field.

Example:

"<h1>Welcome!</h1><p>Thanks for signing up.</p>"

text
string

Optional plain-text body. Set to an empty string to send no text part.

Example:

"Welcome! Thanks for signing up."

replyTo
string<email>

Optional reply-to address

Response

Email queued for delivery

data
object