POST
/
v1
/
emails
curl --request POST \
  --url https://app.unsend.dev/api/v1/emails \
  --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>",
  "attachments": [
    {
      "filename": "<string>",
      "content": "<string>"
    }
  ],
  "scheduledAt": "2023-11-07T05:31:56Z"
}'
{
  "emailId": "<string>"
}

Body

application/json
to
required
from
string
required
subject
string

Optional when templateId is provided

templateId
string

ID of a template from the dashboard

variables
object
replyTo
cc
bcc
text
string
html
string
attachments
object[]
scheduledAt
string

Response

200 - application/json
Retrieve the user
emailId
string