cURL
curl --request PUT \
--url https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"type": "BODY",
"text": "Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!"
}
]
}
'import requests
url = "https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}"
payload = { "components": [
{
"type": "BODY",
"text": "Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
components: [
{
type: 'BODY',
text: 'Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!'
}
]
})
};
fetch('https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}', 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.buildwithchirp.com/v1/whatsapp/templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'components' => [
[
'type' => 'BODY',
'text' => 'Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!'
]
]
]),
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.buildwithchirp.com/v1/whatsapp/templates/{templateId}"
payload := strings.NewReader("{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"whatsappBusinessProfileId": "<string>",
"metaTemplateId": "<string>",
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [
"<string>"
],
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
]
},
"buttons": [
{
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
]
}
]
}
],
"variableMapping": {},
"rejectionReason": "<string>",
"qualityScore": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}WhatsApp Templates
Update app template
Update an existing WhatsApp message template’s components. Only components can be updated - name, language, and category are immutable. After update, the template status resets to PENDING and requires Meta re-approval.
PUT
/
v1
/
whatsapp
/
templates
/
{templateId}
cURL
curl --request PUT \
--url https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"type": "BODY",
"text": "Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!"
}
]
}
'import requests
url = "https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}"
payload = { "components": [
{
"type": "BODY",
"text": "Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
components: [
{
type: 'BODY',
text: 'Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!'
}
]
})
};
fetch('https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}', 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.buildwithchirp.com/v1/whatsapp/templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'components' => [
[
'type' => 'BODY',
'text' => 'Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!'
]
]
]),
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.buildwithchirp.com/v1/whatsapp/templates/{templateId}"
payload := strings.NewReader("{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildwithchirp.com/v1/whatsapp/templates/{templateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"type\": \"BODY\",\n \"text\": \"Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"whatsappBusinessProfileId": "<string>",
"metaTemplateId": "<string>",
"name": "<string>",
"language": "<string>",
"components": [
{
"text": "<string>",
"example": {
"header_text": [
"<string>"
],
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
]
},
"buttons": [
{
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
]
}
]
}
],
"variableMapping": {},
"rejectionReason": "<string>",
"qualityScore": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}Authorizations
App API key (format: sk_live_app_* or sk_test_app_*) for app-level operations
Path Parameters
The template ID to update
Example:
"wht_abc123"
Body
application/json
Updated template components (must include at least a BODY). Only components can be updated - name, language, and category are immutable.
Minimum array length:
1Show child attributes
Show child attributes
Example:
[
{
"type": "BODY",
"text": "Hello {{customer_name}}, your order #{{order_id}} is ready for pickup!"
}
]
Response
Template updated successfully
Available options:
MARKETING, UTILITY, AUTHENTICATION Available options:
PENDING, APPROVED, REJECTED, PAUSED, DISABLED Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I