curl --request POST \
--url https://crm.wachat.net/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_name": "<string>",
"category": "<string>",
"header": "<string>",
"template_body": "<string>",
"footer": "<string>",
"language": "<string>",
"buttons": "<string>",
"quick_replies": "<string>",
"carousel_data": "<string>",
"latitude": 0,
"longitude": 0,
"location_name": "<string>",
"location_address": "<string>"
}
'import requests
url = "https://crm.wachat.net/api/v1/templates"
payload = {
"template_name": "<string>",
"category": "<string>",
"header": "<string>",
"template_body": "<string>",
"footer": "<string>",
"language": "<string>",
"buttons": "<string>",
"quick_replies": "<string>",
"carousel_data": "<string>",
"latitude": 0,
"longitude": 0,
"location_name": "<string>",
"location_address": "<string>"
}
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({
template_name: '<string>',
category: '<string>',
header: '<string>',
template_body: '<string>',
footer: '<string>',
language: '<string>',
buttons: '<string>',
quick_replies: '<string>',
carousel_data: '<string>',
latitude: 0,
longitude: 0,
location_name: '<string>',
location_address: '<string>'
})
};
fetch('https://crm.wachat.net/api/v1/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://crm.wachat.net/api/v1/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([
'template_name' => '<string>',
'category' => '<string>',
'header' => '<string>',
'template_body' => '<string>',
'footer' => '<string>',
'language' => '<string>',
'buttons' => '<string>',
'quick_replies' => '<string>',
'carousel_data' => '<string>',
'latitude' => 0,
'longitude' => 0,
'location_name' => '<string>',
'location_address' => '<string>'
]),
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://crm.wachat.net/api/v1/templates"
payload := strings.NewReader("{\n \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\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://crm.wachat.net/api/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/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 \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"message": "<string>",
"errors": {}
}Create templates
Creates a WhatsApp template submission with its body, variables, category, and optional header or buttons. Use it when you need a reusable message that can be submitted for Meta approval.
curl --request POST \
--url https://crm.wachat.net/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_name": "<string>",
"category": "<string>",
"header": "<string>",
"template_body": "<string>",
"footer": "<string>",
"language": "<string>",
"buttons": "<string>",
"quick_replies": "<string>",
"carousel_data": "<string>",
"latitude": 0,
"longitude": 0,
"location_name": "<string>",
"location_address": "<string>"
}
'import requests
url = "https://crm.wachat.net/api/v1/templates"
payload = {
"template_name": "<string>",
"category": "<string>",
"header": "<string>",
"template_body": "<string>",
"footer": "<string>",
"language": "<string>",
"buttons": "<string>",
"quick_replies": "<string>",
"carousel_data": "<string>",
"latitude": 0,
"longitude": 0,
"location_name": "<string>",
"location_address": "<string>"
}
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({
template_name: '<string>',
category: '<string>',
header: '<string>',
template_body: '<string>',
footer: '<string>',
language: '<string>',
buttons: '<string>',
quick_replies: '<string>',
carousel_data: '<string>',
latitude: 0,
longitude: 0,
location_name: '<string>',
location_address: '<string>'
})
};
fetch('https://crm.wachat.net/api/v1/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://crm.wachat.net/api/v1/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([
'template_name' => '<string>',
'category' => '<string>',
'header' => '<string>',
'template_body' => '<string>',
'footer' => '<string>',
'language' => '<string>',
'buttons' => '<string>',
'quick_replies' => '<string>',
'carousel_data' => '<string>',
'latitude' => 0,
'longitude' => 0,
'location_name' => '<string>',
'location_address' => '<string>'
]),
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://crm.wachat.net/api/v1/templates"
payload := strings.NewReader("{\n \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\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://crm.wachat.net/api/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crm.wachat.net/api/v1/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 \"template_name\": \"<string>\",\n \"category\": \"<string>\",\n \"header\": \"<string>\",\n \"template_body\": \"<string>\",\n \"footer\": \"<string>\",\n \"language\": \"<string>\",\n \"buttons\": \"<string>\",\n \"quick_replies\": \"<string>\",\n \"carousel_data\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"location_name\": \"<string>\",\n \"location_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Create a WhatsApp message template. Scramble reads these rules to document the request body. Mirrors the existing TemplateController::store validation.
Template name. Required.
191Category — Meta numeric id (1/2/3), meta slug, or industry bucket. Required.
Template type. Defaults to "standard".
standard, carousel, media, auth Optional header text (max 255 chars).
255Body text (required for standard templates, max 4096 chars).
4096Optional footer text (max 255 chars).
255Language code (e.g. en_US). Defaults to en_US.
16Buttons — CTA / quick-reply array (or parallel-array form).
Quick-reply buttons (folded into buttons[]).
Carousel cards payload (for carousel templates).
LOCATION header — send a map pin. Provide latitude + longitude (both required together) with an optional name + address.
-90 <= x <= 90-180 <= x <= 180191255