Skip to main content
POST
https://api.thepurplebox.io
/
v1
/
send
Send email
curl --request POST \
  --url https://api.thepurplebox.io/v1/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "<string>",
  "to": [
    "<string>"
  ],
  "subject": "<string>",
  "body": "<string>",
  "cc": [
    "<string>"
  ],
  "bcc": [
    "<string>"
  ],
  "username": "<string>",
  "reply_to": "<string>",
  "headers": {},
  "attachments": [
    {}
  ]
}
'
{
  "success": true,
  "data": [
    {
      "message": "250 OK queued as 12345",
      "email_id": "12345"
    },
  ],
  "timestamp": "1970-01-01T00:00:00.000Z"
}

Headers

Content-Type
string
application/json

Body

from
string
required
Your verified sender email address.Using username <email> format is also supported.
to
string[]
required
A single email address or an array of email addresses.
subject
string
required
The subject of the email.
body
string
required
The body of the email.
cc
string[]
Carbon copy recipients. A single email address or an array of email addresses.
bcc
string[]
Blind carbon copy recipients. A single email address or an array of email addresses.
username
string
Optional: The name to display as the sender.
reply_to
string
Override the reply_to address. Defaults to the from address or your verified email if the from address is not set.
headers
object
Additional headers to include in the email.
attachments
array
Up to 5 file attachments

Response

success
boolean
Indicates whether the call was successful.
emails
Email Object
timestamp
datetime
The timestamp of the event.
{
  "success": true,
  "data": [
    {
      "message": "250 OK queued as 12345",
      "email_id": "12345"
    },
  ],
  "timestamp": "1970-01-01T00:00:00.000Z"
}