Template events (template.*)
Message templates used by the collection rule steps. In entity events, data is the full template (no relations).
channel values: email · sms · whatsapp · voice · manual. category values: reminder · overdue · negotiation · negativation_warning · protest_warning · payment_confirmation. tone values: friendly · neutral · firm · urgent.
template.created
Fires on creation and also on duplication (POST /templates/{id}/duplicate — the copy arrives with a new name and activatedAt: null).
{
"event": "template.created",
"timestamp": "2026-07-23T12:00:00.000Z",
"organizationId": "0f7a3c1e-2b4d-4e6f-8a9b-1c2d3e4f5a6b",
"data": {
"id": "7a9c1e3f-5b2d-4c6e-8f0a-9d1b3f5a7c9f",
"publicId": "c9d0e1f2-a3b4-4c5d-6e7f-809102132435",
"organizationId": "0f7a3c1e-2b4d-4e6f-8a9b-1c2d3e4f5a6b",
"workspaceId": null,
"companyId": null,
"businessUnitId": null,
"name": "Lembrete amigável D-3",
"channel": "email",
"category": "reminder",
"tone": "friendly",
"subject": "Sua fatura vence em {{dias_para_vencimento}} dias",
"body": "Olá {{nome}}, sua fatura de {{valor}} vence em {{data_vencimento}}. Pague pelo link: {{link_pagamento}}",
"variables": ["nome", "valor", "data_vencimento", "dias_para_vencimento", "link_pagamento"],
"activatedAt": "2026-07-23T12:00:00.000Z",
"externalId": null,
"customData": null,
"tags": [],
"deletedAt": null,
"metadata": {},
"createdAt": "2026-07-23T12:00:00.000Z",
"updatedAt": "2026-07-23T12:00:00.000Z"
}
}
template.updated
Fires when the template is changed. Same shape as template.created.
template.deleted
Fires on (logical) deletion; blocked if the template is referenced by any collection rule step — in that case the event does not occur.
{
"event": "template.deleted",
"timestamp": "2026-07-23T12:00:00.000Z",
"organizationId": "0f7a3c1e-2b4d-4e6f-8a9b-1c2d3e4f5a6b",
"data": { "id": "7a9c1e3f-5b2d-4c6e-8f0a-9d1b3f5a7c9f" }
}