This endpoint requires a secret key (
sk_*). Never expose your secret key in client-side code.POST /v1/send
Recipient email address(es). Accepts three formats:
- String:
"[email protected]" - Object:
{ "name": "Jane Doe", "email": "[email protected]" } - Array: mix of strings and objects
Email subject line. Required unless a
template is specified. Supports {{variable}} syntax.HTML email body. Required unless a
template is specified. Supports {{variable}} syntax.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.
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.Sender display name. Alternative to
from.name — used when from is provided as a plain string.Reply-to email address.
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.Custom email headers as key-value pairs. Values must be strings.
Template variables and contact data. Simple values (
Fallback syntax: use
"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:| Variable | Description |
|---|---|
{{id}} | Contact ID |
{{email}} | Contact email |
{{unsubscribeUrl}} | One-click unsubscribe link |
{{subscribeUrl}} | Re-subscribe link |
{{manageUrl}} | Subscription management page |
{{field ?? default}} to provide a default if the variable is missing.Email attachments. Maximum 10 attachments, 10 MB total.
Response
true when the request was accepted.Examples
Example response
200