Skip to Content
My App
Api

Template

Create, list and manage your approved WhatsApp templates, and send a template to one number with your own header, body variables and button values. Use this for utility / marketing sends that need a pre-approved template — including one with a PDF / document header (pass the file's public URL as the header, e.g. from the Media endpoint).

GET
/templates

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*array<array<unknown>>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/templates'
Example Response
{  "data": [    [      null    ]  ],  "meta": {    "count": 0  }}
POST
/templates

Authorization

http
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Create a WhatsApp message template. Scramble reads these rules to document the request body. Mirrors the existing TemplateController::store validation.

template_name*string

Template name. Required.

Lengthlength <= 191
template_type?|

Template type. Defaults to "standard".

Value in"standard""carousel""media""auth"
category*string

Category — Meta numeric id (1/2/3), meta slug, or industry bucket. Required.

header?|

Optional header text (max 255 chars).

Lengthlength <= 255
template_body?|

Body text (required for standard templates, max 4096 chars).

Lengthlength <= 4096
footer?|

Optional footer text (max 255 chars).

Lengthlength <= 255
language?|

Language code (e.g. en_US). Defaults to en_US.

Lengthlength <= 16
buttons?|

Buttons — CTA / quick-reply array (or parallel-array form).

quick_replies?|

Quick-reply buttons (folded into buttons[]).

carousel_data?|

Carousel cards payload (for carousel templates).

latitude?|

LOCATION header — send a map pin. Provide latitude + longitude (both required together) with an optional name + address.

Range-90 <= value <= 90
longitude?|
Range-180 <= value <= 180
location_name?|
Lengthlength <= 191
location_address?|
Lengthlength <= 255

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X POST 'https://aexrux.com/api/v1/templates' \  -H 'Content-Type: application/json' \  -d '{  "template_name": "string",  "category": "string"}'
Example Response
{  "data": [    null  ],  "meta": "string"}
GET
/templates/categories

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*string|array<string>
meta*string
Example Request
curl -X GET 'https://aexrux.com/api/v1/templates/categories'
Example Response200
{  "data": "string",  "meta": "string"}
POST
/templates/{id}/send

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Request Body

multipart/form-data
  1. body
to*string

Recipient phone in international format — digits or +E.164 (e.g. 919812345678). Required.

Lengthlength <= 32
header_text?|

Value for a {{1}} in a TEXT header. Only for text-header templates.

Lengthlength <= 1024
header_media_url?|

Public https URL for an IMAGE / VIDEO / DOCUMENT header. Only for media-header templates.

Formaturi
Lengthlength <= 2048
header_media?|

OR attach the header file (PDF / image / video) directly in ONE multipart/form-data request — field name header_media, up to 16 MB. We host it and use it as the header, so you don't need a separate upload call. Takes precedence over header_media_url.

Formatbinary
Lengthlength <= 16384
header_filename?|

Display filename the recipient sees for a DOCUMENT header (e.g. "Invoice-2045.pdf"). Optional — when you attach header_media we default it to the uploaded file's own name.

Lengthlength <= 255
body?array<|>|

BODY variables, positional -> {{1}}, {{2}}, ... Send a list ["John","12345"] or a 1-indexed map {"1":"John","2":"12345"}. Omit if the body has no variables.

buttons?array<>|

Dynamic button parameters, one object per variable button, e.g. [{"index":0,"sub_type":"url","value":"ORDER123"}].

Response Body

application/json
  1. response
data*
meta*string
Example Request
curl -X POST 'https://aexrux.com/api/v1/templates/0/send' \  -F 'to=string'
Example Response
{  "data": {    "wamid": "string",    "status": "sent",    "template_id": 0,    "template_name": "string",    "to": null  },  "meta": "string"}
GET
/templates/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X GET 'https://aexrux.com/api/v1/templates/0'
Example Response
{  "data": [    null  ],  "meta": "string"}
DELETE
/templates/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*
meta*string
Example Request
curl -X DELETE 'https://aexrux.com/api/v1/templates/0'
Example Response
{  "data": {    "deleted": true,    "message": "string"  },  "meta": "string"}
PUT
/templates/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Request Body

application/json
  1. body

Update a WhatsApp message template. Scramble reads these rules to document the request body. Mirrors the existing TemplateController::update validation.

template_name*string

Template name. Required.

Lengthlength <= 191
template_type?|

Template type. Defaults to the existing value.

Value in"standard""carousel""media""auth"
category*string

Category — Meta numeric id (1/2/3), meta slug, or industry bucket. Required.

header?|

Optional header text (max 255 chars).

Lengthlength <= 255
template_body*string

Body text. Required (max 4096 chars).

Lengthlength <= 4096
footer?|

Optional footer text (max 255 chars).

Lengthlength <= 255
language?|

Language code (e.g. en_US). Defaults to the existing value.

Lengthlength <= 16
buttons?|

Buttons — CTA / quick-reply array (or parallel-array form).

quick_replies?|

Quick-reply buttons (folded into buttons[]).

carousel_data?|

Carousel cards payload (for carousel templates).

latitude?|

LOCATION header — send a map pin. Provide latitude + longitude (both required together) with an optional name + address.

Range-90 <= value <= 90
longitude?|
Range-180 <= value <= 180
location_name?|
Lengthlength <= 191
location_address?|
Lengthlength <= 255

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X PUT 'https://aexrux.com/api/v1/templates/0' \  -H 'Content-Type: application/json' \  -d '{  "template_name": "string",  "category": "string",  "template_body": "string"}'
Example Response
{  "data": [    null  ],  "meta": "string"}