Skip to main content

Documentation Index

Fetch the complete documentation index at: https://automatebusiness.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Sending template messages is the core functionality of our API. We offer two integration methods to suit different needs: Simple Method (for no-code tools) and Precise Method (for custom integrations).

Integration Methods

Use a flat variables array. The system automatically maps these values in order: Header → Body → Buttons.
{
  "templateId": "template-uuid",
  "recipientPhoneNumber": "918467857644",
  "variables": ["https://example.com/image.jpg", "John Doe"]
}
Use variableMapping to specify exactly where each value goes. This is required for complex templates like Carousels or LTOs.
{
  "templateId": "your-template-uuid",
  "recipientPhoneNumber": "918467857644",
  "variableMapping": {
    "header": { "1": "https://example.com/image.jpg" },
    "body": { "1": "John Doe" },
    "buttons": [
      {
        "type": "copy_code",
        "coupon_code": "SAVE50"
      }
    ]
  }
}

Specialized Templates

Carousel templates allow you to send up to 10 cards in a single message. Use the card_index to map variables to specific cards.
Precise Mapping
"variableMapping": {
  "carousel": [
    {
      "card_index": 0,
      "header": { "1": "https://example.com/product1.jpg" },
      "body": { "1": "Product 1 Description" }
    },
    {
      "card_index": 1,
      "header": { "1": "https://example.com/product2.jpg" },
      "body": { "1": "Product 2 Description" }
    }
  ]
}

Limited Time Offer (LTO)

For templates with a “Copy Code” button, the first variable in the buttons array is automatically applied to the button.
Simple Method
"variables": ["COUPON2024", "Customer Name"]

Parameter Details

ParameterTypeRequiredDescription
templateIdstringYesThe unique UUID of the WhatsApp template.
recipientPhoneNumberstringYesRecipient’s phone number with country code (e.g., 918467857644).
variablesarrayNo*Simple flat array of values.
variableMappingobjectNo*Precise mapping for header/body/button values.
countryCodestringNoOverride the default country code.
*You must use either variables OR variableMapping.