POST
/
whatsapp_templates
Create a new WhatsApp template
curl --request POST \
  --url https://app.kapso.ai/api/v1/whatsapp_templates \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "template": {
    "name": "appointment_reminder",
    "language_code": "en_US",
    "category": "UTILITY",
    "components": {
      "type": "BODY",
      "text": "Hello {{name}}, your appointment is confirmed for {{date}}."
    }
  },
  "whatsapp_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "data": {
    "id": "template-123abc",
    "name": "appointment_reminder",
    "language_code": "en_US",
    "category": "UTILITY",
    "status": "approved",
    "content": "Hello {{1}}, your appointment is confirmed for {{2}}.",
    "parameter_count": 2,
    "components": {},
    "metadata": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key required for all endpoints

Body

application/json

Response

201
application/json

Template created successfully

The response is of type object.