Skip to main content
POST
/
templated_messages
Send a dynamically templated message
curl --request POST \
  --url https://api.paubox.net/v1/{api_username}/templated_messages \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "template_name": "detailed_test",
    "template_values": "{ \"name\": \"Howard\", \"conditional\":\"true\",\"items\":[\"one\",\"two\",\"three\"] }",
    "message": {
      "recipients": [
        "recipient@host.com",
        "Recipient Name <recipient2@host.com>"
      ],
      "bcc": [
        "recipient3@host.com",
        "Recipient Name <recipient4@host.com>"
      ],
      "headers": {
        "subject": "sample email",
        "from": "sender@authorized_domain.com",
        "reply-to": "Sender Name <sender@authorized_domain.com>"
      },
      "allowNonTLS": false,
      "forceSecureNotification": false,
      "attachments": [
        {
          "fileName": "hello_world.txt",
          "contentType": "text/plain",
          "content": "SGVsbG8gV29ybGQ"
        }
      ]
    }
  }
}
'
{
  "sourceTrackingId": "3d38ab13-0af8-4028-bd45-XXXXXXXXXXXX",
  "data": "Service OK"
}

Documentation Index

Fetch the complete documentation index at: https://docs.paubox.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Paubox API uses a custom token format in the Authorization header.

IMPORTANT: You must prefix your API key with "Token token="

Format: Authorization: Token token=YOUR_API_KEY_HERE

Example: Authorization: Token token=9e5b092b632445b8f570c62ae54f30fda1044305

Do NOT use just the API key alone or Bearer token format.

Body

application/json
data
object
required

Response

Templated message sent successfully

sourceTrackingId
string

Identifier for tracking the message source.

customHeaders
object
data
string
Example:

"Service OK"