Skip to Content
Templates

Create a template

POST
/v1/numbers/{phone_number}/templates

Create a template in WhatsApp's format (name, language, category, components). It starts as PENDING.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

phone_number*string

Your WhatsApp number, digits only, e.g. 393401234567.

Request Body

application/json
  1. body
name*string

Lowercase letters, digits and underscores.

language*string

Language code, e.g. it or en_US.

category*TemplateCategory
Value in"UTILITY""AUTHENTICATION""MARKETING"
components*array<>

HEADER, BODY, FOOTER and BUTTONS, in WhatsApp's template format.

[key: string]?any

Response Body

Created

application/json
  1. response

WhatsApp's response, passed through unchanged.

[key: string]?any
Example Request
curl -X POST 'https://api.wapiu.ai/v1/numbers/393401234567/templates' \  -H 'Content-Type: application/json' \  -d '{  "name": "order_shipped",  "language": "it",  "category": "UTILITY",  "components": [    {      "type": "BODY",      "text": "Ciao {{1}}, il tuo ordine {{2}} è in viaggio.",      "example": {        "body_text": [          [            "Mario",            "A1234"          ]        ]      }    }  ]}'
Example Response
{}