Skip to main content
POST

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 Integrations > API keys.

Path Parameters

business_account_id
string
required

WhatsApp Business Account ID

Query Parameters

hsm_id
string

Template ID to update.

  • Omit for template creation.
  • Required when updating an existing template.

Body

application/json

Request body for template creation or update.

  • For create requests, name, language, category, and components are required.
  • For update requests, include hsm_id in the query string and provide the fields you want to change.
name
string

Template name (lowercase, underscore-separated)

Example:

"order_confirmation"

language
string

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

Example:

"en_US"

category
enum<string>

Template category

Available options:
AUTHENTICATION,
MARKETING,
UTILITY
Example:

"UTILITY"

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"

components
object[]

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

Response

Template created or updated 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"