Register a message template
POSThttps://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
- 201
- 400
- 401
- 403
- 404
- 422
- 500
The registered message template
The request body, query, or path failed validation. See validationErrors.
The API key or session is missing, expired, or malformed.
No write access to the application
A resource referenced by the path does not exist or is not visible to the caller.
Invalid text or WhatsApp template definition, unsupported text syntax, or size limit exceeded
Unexpected server error.