Transactional — One-off Send¶
Send one-off messages without a pre-built message object.
Tip
For reusable messages, use /transactional/message/ + /transactional/message/send/ instead.
Endpoint¶
| Method | URL |
|---|---|
POST |
/transactional/<transactional>/transaction |
POST¶
Note
The payload must be JSON. Set Content-Type: application/json.
The payload is a dictionary with a single "recipients" array. Each entry:
| Key | Type | Description |
|---|---|---|
email |
string (optional) | Recipient email address |
telephone |
string (optional) | Recipient phone number |
externalreference |
string (optional) | ID from the calling system, returned unchanged in notifications |
payload |
object | The message content |
payload.sms |
string | SMS text (if telephone is set) |
payload.email |
string | Complete email (headers + body, if email is set) |
At least one of email or telephone must be present per recipient.
Example (SMS)¶
Returns: A dictionary with:
| Key | Description |
|---|---|
created |
New contacts created in the contact list. Dict with email and telephone arrays. |
nonsubscribed |
Existing contacts who unsubscribed — messages were not sent to these. Dict with email and telephone arrays. |