# Send transactional campaign (with template)
Requires Pro plan

# HTTP method: POST

https://api.sender.net/v2/message/{id}/send

Send a transactional campaign message using a predefined template. You can override the template's content by providing 'text', 'html', or 'headers'.

id string required

ID of the transactional campaign to send.

to object required

Recipient object containing 'email' (required) and optional 'name'. This replaces 'recipient_email', which is still supported for backward compatibility.

variables object

A key-value list of dynamic variables to personalize the content.

attachments object

A list of files to attach, where keys are filenames and values are publicly accessible URLs.

text string

Optional plain-text version of the email. Overrides the template’s text content.

html string

Optional HTML version of the email. Overrides the template’s HTML content.

headers object

Optional headers to include (e.g., custom X- headers or charset). Overrides template headers if provided.

Code snippets

Response example

{
  "success": true,
  "message": "Email sent",
  "emailId": "ep2W4y-7pn8o21-YPpLY9PR5Jy9-x7GYQ"
}