Skip to main content
POST
/
{business_account_id}
/
message_templates
curl --request POST \
  --url https://api.kapso.ai/meta/whatsapp/v24.0/{business_account_id}/message_templates \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "order_confirmation_simple",
  "language": "en_US",
  "category": "UTILITY",
  "parameter_format": "NAMED",
  "components": [
    {
      "type": "BODY",
      "text": "Thank you, {{customer_name}}! Your order number is {{order_number}}.",
      "example": {
        "body_text_named_params": [
          {
            "param_name": "customer_name",
            "example": "Pablo"
          },
          {
            "param_name": "order_number",
            "example": "860198-230332"
          }
        ]
      }
    }
  ]
}
'
{
  "id": "1627019861106475",
  "status": "PENDING",
  "category": "UTILITY"
}

Authorizations

X-API-Key
string
header
required

Project API key for authentication. This is the recommended authentication method.

Get your API key from the Kapso dashboard under Project Settings > API Keys.

Path Parameters

business_account_id
string
required

WhatsApp Business Account ID

Body

application/json
name
string
required

Template name (lowercase, underscore-separated)

Example:

"order_confirmation"

language
string
required

Language code (e.g., en, en_US)

Example:

"en_US"

category
enum<string>
required

Template category

Available options:
AUTHENTICATION,
MARKETING,
UTILITY
Example:

"UTILITY"

components
object[]
required

Template components. Supported types:

HEADER - Optional component at top. Formats: TEXT (1 param), IMAGE, VIDEO, DOCUMENT, LOCATION

BODY - Required text component. Supports multiple parameters (positional or named)

FOOTER - Optional text-only component. No parameters supported

BUTTONS - Optional interactive components. Types: QUICK_REPLY (10 max), PHONE_NUMBER (1 max), URL (2 max), COPY_CODE (1 max), OTP, CATALOG, MPM, FLOW

parameter_format
enum<string>

Format for template parameters (defaults to POSITIONAL if omitted).

NAMED: Parameters use unique names wrapped in double curly brackets (e.g., {{first_name}}, {{order_number}}). Values can appear in any order in send payloads.

POSITIONAL: Parameters use ordered array indices starting from 1 (e.g., {{1}}, {{2}}). Values must appear in order in send payloads.

Available options:
NAMED,
POSITIONAL
Example:

"NAMED"

Response

Template created successfully

id
string

Template ID

Example:

"1627019861106475"

status
enum<string>

Template status

Available options:
PENDING,
APPROVED,
REJECTED
Example:

"PENDING"

category
string

Template category

Example:

"UTILITY"