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": "welcome_message",
"language_code": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Welcome to our service! We'\''re excited to have you on board."
}
]
}
}'
{
"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": [
{
"type": "HEADER",
"format": "TEXT",
"text": "<string>",
"example": {},
"buttons": [
{}
]
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Creates a new draft template that can be later submitted to WhatsApp for approval
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": "welcome_message",
"language_code": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Welcome to our service! We'\''re excited to have you on board."
}
]
}
}'
{
"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": [
{
"type": "HEADER",
"format": "TEXT",
"text": "<string>",
"example": {},
"buttons": [
{}
]
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
API key required for all endpoints
Template created successfully
The response is of type object
.
Was this page helpful?