Send Email
The Send Email endpoint is the core of Postject. Use this endpoint to execute high-deliverability transactions.
POSThttps://api.postject.com/v1/send
Request Body
tostring (required)
The email address of the recipient.
subjectstring (required)
The subject line of the email.
htmlstring (required)
The HTML body of the email. You can use Handlebars syntax like {{name}} if providing variables.
variablesobject (optional)
A JSON object of key-value pairs matching the variables inside your html template.
Example Request
json
{
"to": "elon@spacex.com",
"subject": "Launch coordinates updated",
"html": "<p>Hello {{name}}, the launch is scheduled for {{date}}.</p>",
"variables": {
"name": "Elon",
"date": "Tuesday, 4PM"
}
}Response
A successful request returns a 201 Created containing the internal Message ID, which you can use to track delivery status via webhooks.
json
{
"id": "msg_01hy4z...",
"status": "queued"
}