Skip to main content
Sending template messages is the core functionality of our API. To make integration simple and avoid manual structure building, you do not need to manually design variable mapping objects or lists. Instead, you can dynamically fetch a ready-to-use sample payload skeleton for any template and use it directly.

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

  1. Copy the data object from the response above.
  2. Replace the placeholders (e.g. phone number, image URLs, custom names) with your actual recipient details and variables.
  3. Paste and send the payload to the Send Template Message endpoint (POST /api/templates/external/message/send).

Parameter details

Here are the primary parameters included in the payload skeleton: