Dynamic workflow
Follow these two steps to send any template message (including text, media, buttons, and carousels):Step 1: Fetch the payload skeleton
Send a request to the Fetch Payload Skeleton endpoint to get the exact JSON structure needed for your template:Sample response
Depending on the template type, the endpoint returns the corresponding payload structure. For example, a marketing template with header media, body text, and a discount button returns:Step 2: Copy, customize, and send
- Copy the
dataobject from the response above. - Replace the placeholders (e.g. phone number, image URLs, custom names) with your actual recipient details and variables.
- Paste and send the payload to the Send Template Message endpoint (
POST /api/templates/external/message/send).
