Skip to main content
PATCH
/
v1
/
templates
/
{id}
Editar un template existente
curl --request PATCH \
  --url https://api.keebai.com/v1/templates/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_id": "<string>",
  "name": "<string>",
  "language": "<string>",
  "components": [
    {
      "text": "<string>",
      "buttons": [
        {
          "text": "<string>",
          "url": "<string>",
          "phone_number": "<string>",
          "example": [
            "<string>"
          ],
          "flow_id": "<string>",
          "coupon_code": "<string>",
          "autofill_text": "<string>",
          "package_name": "<string>",
          "signature_hash": "<string>"
        }
      ],
      "example": {
        "header_text": [
          "<string>"
        ],
        "header_text_named_params": [
          {
            "param_name": "nombre",
            "example": "Lucio"
          }
        ],
        "header_handle": [
          "<string>"
        ],
        "body_text": [
          "<string>"
        ],
        "body_text_named_params": [
          {
            "param_name": "nombre",
            "example": "Lucio"
          }
        ]
      },
      "add_security_recommendation": true,
      "code_expiration_minutes": 123
    }
  ],
  "metadata": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "language": "<string>",
  "status": "<string>",
  "category": "<string>",
  "variables": [
    "<string>"
  ],
  "parameter_format": "<string>"
}

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

ObjectId del template

Body

application/json
channel_id
string
required

ObjectId del canal WhatsApp dueño del template (requerido por upstream).

name
string
Maximum string length: 512
language
string
Maximum string length: 10
category
enum<string>
Available options:
MARKETING,
UTILITY,
AUTHENTICATION
parameter_format
enum<string>
Available options:
NAMED,
POSITIONAL
components
object[]
status
enum<string>
Available options:
PENDING,
IN_REVIEW,
REJECTED,
APPROVED,
PAUSED,
DISABLED,
IN_APPEAL
metadata
object

Response

200 - application/json
id
string
required
name
string
required
language
string
required
status
string
required
category
string
required
variables
string[]
required
parameter_format
string