Skip to main content

Register a message template

POST 

https://platform.docana.com/api/v1/applications/:id/message-templates/

Accepts a generic text definition { type: "text", name, language: { code: "pt_BR" }, text: "{{report}}" } with unrestricted channel any, or an existing WhatsApp send payload/bare template with channel whatsapp. Generic text supports simple variables and if/unless blocks and renders values literally. A definition that could only ever produce nothing is refused; at send time an empty render publishes nothing and a render past the 256 KiB output cap is truncated. The serialized definition is limited to 65536 bytes. name and language come from the definition. Re-registering the same application/channel/name replaces and re-enables it. Enabled names duplicated across channels fail explicitly when sent. Requires write access to the application.

Request​

Responses​

The registered message template