Skip to main content
POST
https://backend.conversales.in
/
api
/
v1
/
createTemplate
curl -X POST "https://backend.conversales.in/api/v1/createTemplate" \
  -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order_confirmation",
    "category": "UTILITY",
    "language": "en",
    "components": [
      {
        "type": "HEADER",
        "format": "TEXT",
        "text": "Order #{{1}} confirmed",
        "example": {
          "header_text_named_params": [
            { "param_name": "order_id", "example": "#12345" }
          ]
        }
      },
      {
        "type": "BODY",
        "text": "Hi {{1}}, your order for {{2}} has been confirmed and will arrive by {{3}}.",
        "example": {
          "body_text_named_params": [
            { "param_name": "customer_name", "example": "Jane" },
            { "param_name": "product_name", "example": "Wireless earbuds" },
            { "param_name": "delivery_date", "example": "2025-11-05" }
          ]
        }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "text": "View Order", "type": "URL", "url": "https://shop.example.com/orders/12345" },
          { "text": "Contact Support", "type": "PHONE_NUMBER", "phone_number": "+15551234567" }
        ]
      }
    ]
  }'
{
  "statusCode": 200,
  "message": "Template created successfully",
  "data": {
    "templateId": "template_123456",
    "name": "welcome_message",
    "status": "PENDING",
    "category": "MARKETING"
  }
}

Authentication

X-API-Key
string
required
Your API key for authentication

Request Body

name
string
required
Template name (lowercase, underscore separated)
category
string
required
Template category: MARKETING, UTILITY, or AUTHENTICATION
language
string
required
Language code (e.g., en, en_US)
components
array
required
Array of template components (header, body, footer, buttons)
curl -X POST "https://backend.conversales.in/api/v1/createTemplate" \
  -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order_confirmation",
    "category": "UTILITY",
    "language": "en",
    "components": [
      {
        "type": "HEADER",
        "format": "TEXT",
        "text": "Order #{{1}} confirmed",
        "example": {
          "header_text_named_params": [
            { "param_name": "order_id", "example": "#12345" }
          ]
        }
      },
      {
        "type": "BODY",
        "text": "Hi {{1}}, your order for {{2}} has been confirmed and will arrive by {{3}}.",
        "example": {
          "body_text_named_params": [
            { "param_name": "customer_name", "example": "Jane" },
            { "param_name": "product_name", "example": "Wireless earbuds" },
            { "param_name": "delivery_date", "example": "2025-11-05" }
          ]
        }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "text": "View Order", "type": "URL", "url": "https://shop.example.com/orders/12345" },
          { "text": "Contact Support", "type": "PHONE_NUMBER", "phone_number": "+15551234567" }
        ]
      }
    ]
  }'
{
  "statusCode": 200,
  "message": "Template created successfully",
  "data": {
    "templateId": "template_123456",
    "name": "welcome_message",
    "status": "PENDING",
    "category": "MARKETING"
  }
}
Templates must be approved by WhatsApp before use. Approval typically takes 24-48 hours.