Send transactional email
Send a transactional email via the public API. Automatically creates/updates contacts.
Authorization
ApiKeyAuth API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.
In: header
Request Body
application/json
Recipient email(s). Can be a string, an object with {name, email}, or an array of either.
Email subject (required if no template)
Email body HTML (required if no template)
Template ID to use for this email. When provided, uses the template's subject, body, from, and reply-to settings. You can override these by explicitly providing subject, body, from, or reply fields in the request. Template variables are populated from the data field.
Custom from address (requires verified domain). Can be a string or an object with {name, email}.
Sender display name (alternative to using from.name)
Whether recipient is subscribed to marketing emails. Defaults to false for transactional emails.
falseTemplate variables
Custom email headers
Reply-to address
emailEmail attachments (max 10 attachments, 10MB total)
items <= 10Response Body
application/json
application/json
application/json
curl -X POST "https://next-api.useplunk.com/v1/send" \ -H "Content-Type: application/json" \ -d '{ "to": "user@example.com", "subject": "Password Reset Request", "body": "<h1>Reset Your Password</h1><p>Click the link to reset: {{resetLink}}</p>", "data": { "resetLink": "https://example.com/reset/abc123" } }'{
"success": true,
"data": {
"emails": [
{
"id": "string",
"to": "string",
"status": "string"
}
]
}
}{
"code": 0,
"error": "string",
"message": "string",
"time": 0
}{
"code": 0,
"error": "string",
"message": "string",
"time": 0
}