Create a WhatsApp template
curl --request POST \
--url https://api.wavix.com/v1/whatsapp/senders/{number}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [
{}
]
}
]
}
'import requests
url = "https://api.wavix.com/v1/whatsapp/senders/{number}/templates"
payload = {
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [{}]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'order_shipped',
language: 'en_US',
category: 'utility',
components: [
{
type: 'BODY',
format: 'TEXT',
text: 'Your order {{1}} has shipped.',
example: {},
buttons: [{}]
}
]
})
};
fetch('https://api.wavix.com/v1/whatsapp/senders/{number}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wavix.com/v1/whatsapp/senders/{number}/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'order_shipped',
'language' => 'en_US',
'category' => 'utility',
'components' => [
[
'type' => 'BODY',
'format' => 'TEXT',
'text' => 'Your order {{1}} has shipped.',
'example' => [
],
'buttons' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wavix.com/v1/whatsapp/senders/{number}/templates"
payload := strings.NewReader("{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wavix.com/v1/whatsapp/senders/{number}/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/whatsapp/senders/{number}/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"template": {
"uuid": "3a525ca2-6909-4c72-9399-905adf7f3a74",
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"status": "approved",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [
{}
]
}
],
"created_at": "2026-01-10T09:00:00Z",
"quality_rating": "high",
"submitted_at": "2026-01-15T10:30:00Z"
}
}WhatsApp
Create a WhatsApp template
Creates a WhatsApp template for the sender identified by number and submits it for provider review.
POST
/
v1
/
whatsapp
/
senders
/
{number}
/
templates
Create a WhatsApp template
curl --request POST \
--url https://api.wavix.com/v1/whatsapp/senders/{number}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [
{}
]
}
]
}
'import requests
url = "https://api.wavix.com/v1/whatsapp/senders/{number}/templates"
payload = {
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [{}]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'order_shipped',
language: 'en_US',
category: 'utility',
components: [
{
type: 'BODY',
format: 'TEXT',
text: 'Your order {{1}} has shipped.',
example: {},
buttons: [{}]
}
]
})
};
fetch('https://api.wavix.com/v1/whatsapp/senders/{number}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wavix.com/v1/whatsapp/senders/{number}/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'order_shipped',
'language' => 'en_US',
'category' => 'utility',
'components' => [
[
'type' => 'BODY',
'format' => 'TEXT',
'text' => 'Your order {{1}} has shipped.',
'example' => [
],
'buttons' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wavix.com/v1/whatsapp/senders/{number}/templates"
payload := strings.NewReader("{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wavix.com/v1/whatsapp/senders/{number}/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wavix.com/v1/whatsapp/senders/{number}/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"order_shipped\",\n \"language\": \"en_US\",\n \"category\": \"utility\",\n \"components\": [\n {\n \"type\": \"BODY\",\n \"format\": \"TEXT\",\n \"text\": \"Your order {{1}} has shipped.\",\n \"example\": {},\n \"buttons\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"template": {
"uuid": "3a525ca2-6909-4c72-9399-905adf7f3a74",
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"status": "approved",
"components": [
{
"type": "BODY",
"format": "TEXT",
"text": "Your order {{1}} has shipped.",
"example": {},
"buttons": [
{}
]
}
],
"created_at": "2026-01-10T09:00:00Z",
"quality_rating": "high",
"submitted_at": "2026-01-15T10:30:00Z"
}
}Authorizations
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Path Parameters
Sender's phone number, digits only.
Example:
"14155550100"
Body
application/json
Attributes for the new template.
Template name.
Example:
"order_shipped"
Template language code.
Example:
"en_US"
Template category.
Available options:
marketing, authentication, utility Example:
"utility"
Structural components of the template. Must include a BODY component.
Show child attributes
Show child attributes
Response
The newly created WhatsApp template.
Show child attributes
Show child attributes
Was this page helpful?