Skip to main content
Send individual or bulk transactional emails to one or more recipients. The sender address must belong to a verified domain on your project.
This endpoint requires a secret key (sk_*). Never expose your secret key in client-side code.

POST /v1/send

to
string | object | array
required
Recipient email address(es). Accepts three formats:
subject
string
Email subject line. Required unless a template is specified. Supports {{variable}} syntax.
body
string
HTML email body. Required unless a template is specified. Supports {{variable}} syntax.
template
string
ID of a saved template to use as the email’s subject, body, from address, and reply-to. You can override any of these by providing the corresponding field in the request.
from
string | object
Sender email address. Required unless the specified template already has a from address configured. The domain must be verified on your project.Accepts a plain email string or an object with name and email.
name
string
Sender display name. Alternative to from.name — used when from is provided as a plain string.
reply
string
Reply-to email address.
subscribed
boolean
default:"false"
Sets the recipient’s subscription status. Defaults to false for transactional emails, which means new contacts are created as unsubscribed. Set to true to opt them in to marketing emails.
headers
object
Custom email headers as key-value pairs. Values must be strings.
data
object
Template variables and contact data. Simple values ("key": "value") are saved to the contact record. To pass a value to the template without saving it to the contact, use the non-persistent format.System variables are automatically available in every template:
VariableDescription
{{id}}Contact ID
{{email}}Contact email
{{unsubscribeUrl}}One-click unsubscribe link
{{subscribeUrl}}Re-subscribe link
{{manageUrl}}Subscription management page
Fallback syntax: use {{field ?? default}} to provide a default if the variable is missing.
attachments
array
Email attachments. Maximum 10 attachments, 10 MB total.

Response

success
boolean
required
true when the request was accepted.
data
object
required

Examples

curl --request POST \
  --url https://next-api.useplunk.com/v1/send \
  --header 'Authorization: Bearer sk_live_yourkey' \
  --header 'Content-Type: application/json' \
  --data '{
    "to": "[email protected]",
    "from": {
      "name": "My App",
      "email": "[email protected]"
    },
    "subject": "Your password reset code",
    "body": "<h1>Reset your password</h1><p>Your code: <strong>{{resetCode}}</strong></p><p><a href=\"{{unsubscribeUrl}}\">Unsubscribe</a></p>",
    "data": {
      "resetCode": { "value": "ABC-123", "persistent": false }
    }
  }'

Example response

200
{
  "success": true,
  "data": {
    "emails": [
      {
        "contact": {
          "id": "clx_contact_abc123",
          "email": "[email protected]"
        },
        "email": "clx_email_xyz789"
      }
    ],
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Build docs developers (and LLMs) love