"attachments": [
{ "attachmentName": "invoice.pdf", "content": "JVBERi0xLjQK..." },
{ "attachmentName": "receipt.pdf", "content": "JVBERi0xLjQK..." }
]attachments inside a payload item when the files belong to that recipient — an invoice, a certificate — which is the usual case. Put it at request level when the very same files go to everyone. One or the other, never both.templateId or html, not both.subject is required with html; with templateId the template subject wins and any subject sent here is ignored.overallStatus and each status.curl --location 'https://api.trucontact.co/deliver' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "billing@yourcompany.com",
"templateId": "66f1c0a94b8d2e5f7a3c1d90",
"payload": [
{
"recipient": "ana.gomez@example.com",
"fields": {
"name": "Ana",
"invoice_number": "F-2026-00184"
},
"attachments": [
{
"content": "JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFI+Pg==",
"attachmentName": "invoice-F-2026-00184.pdf"
}
]
}
]
}'{
"overallStatus": "success",
"errors": null,
"recipients": [
{
"recipient": "ana.gomez@example.com",
"messageId": "6a7df0dd094c96339894be60",
"status": "queued",
"error": null
},
{
"recipient": "luis.perez@example.com",
"messageId": "6a7df0dd094c96339894be61",
"status": "queued",
"error": null
}
]
}