POST
/
v1
/
emails
cURL
curl --request POST \
  --url https://app.weesend.com/api/v1/emails \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "<string>",
  "from": "<string>",
  "subject": "<string>",
  "templateId": "<string>",
  "variables": {},
  "replyTo": "<string>",
  "cc": "<string>",
  "bcc": "<string>",
  "text": "<string>",
  "html": "<string>",
  "headers": {},
  "attachments": [
    {
      "filename": "<string>",
      "content": "<string>"
    }
  ],
  "scheduledAt": "2023-11-07T05:31:56Z",
  "inReplyToId": "<string>"
}
'
{
  "emailId": "<string>"
}
Send a transactional email via the public API.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Pass the optional Idempotency-Key header to make the request safe to retry. The key can be up to 256 characters. The server stores the canonical request body and behaves as follows:

  • Same key + same request body → returns the original emailId with 200 OK without re-sending.
  • Same key + different request body → returns 409 Conflict with code: NOT_UNIQUE so you can detect the mismatch.
  • Same key while another request is still being processed → returns 409 Conflict; retry after a short delay or once the first request completes.

Entries expire after 24 hours. Use a unique key per logical send (for example, an order or signup ID).

Required string length: 1 - 256

Body

application/json
to
required
from
string
required
subject
string

Optional when templateId is provided

Minimum string length: 1
templateId
string

ID of a template from the dashboard

variables
object
replyTo
cc
bcc
text
string | null
Minimum string length: 1
html
string | null
Minimum string length: 1
headers
object

Custom headers to included with the emails

attachments
object[]
Maximum array length: 10
scheduledAt
string<date-time>
inReplyToId
string | null

Response

200 - application/json

Retrieve the user

emailId
string