Send template
Sends an approved WhatsApp template message to a recipient.
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"name": "order_confirmation",
"language": "pt_BR",
"number": "5511999999999",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ismael"
}
]
}
],
"webhookUrl": "https://example.com/webhooks/template"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}"
payload = {
"name": "order_confirmation",
"language": "pt_BR",
"number": "5511999999999",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ismael"
}
]
}
],
"webhookUrl": "https://example.com/webhooks/template"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'order_confirmation',
language: 'pt_BR',
number: '5511999999999',
components: [{type: 'body', parameters: [{type: 'text', text: 'Ismael'}]}],
webhookUrl: 'https://example.com/webhooks/template'
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}",
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_confirmation',
'language' => 'pt_BR',
'number' => '5511999999999',
'components' => [
[
'type' => 'body',
'parameters' => [
[
'type' => 'text',
'text' => 'Ismael'
]
]
]
],
'webhookUrl' => 'https://example.com/webhooks/template'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}"
payload := strings.NewReader("{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}"
response = http.request(request)
puts response.read_body{
"key": {
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": true,
"id": "wamid.HBgLNTUxMTk5OTk5OTk5FQIAERgSN0EyN0M4N0E4RjBBQkNEMTIzAA=="
},
"message": {
"conversation": "▶️order_confirmation◀️"
},
"messageType": "conversation",
"messageTimestamp": 1720483200,
"instanceId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"webhookUrl": null,
"status": "PENDING",
"source": "unknown"
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Authorizations
Your Pilot Status API key (ps_...). Evolution GO also accepts Authorization: Bearer <key>.
Path Parameters
The number's display name in the Pilot Status dashboard.
Body
Approved template name.
"order_confirmation"
Template language/locale code (e.g. pt_BR).
"pt_BR"
Recipient phone in E.164 without +, or a JID.
"5511999999999"
Template components (header/body/button parameters).
[
{
"type": "body",
"parameters": [{ "type": "text", "text": "Ismael" }]
}
]
Optional per-message webhook URL for status callbacks.
"https://example.com/webhooks/template"
Response
Success — provider-native response body.
Sent template message. Served by the Cloud API (Meta) channel; returns the persisted messageRaw envelope with the template rendered as a conversation preview.
Message key identifying the sent template message.
Show child attributes
Show child attributes
Rendered message content. Templates are stored as a conversation preview marked with the template name.
Show child attributes
Show child attributes
Content type; templates render as 'conversation'.
Unix timestamp (seconds) when the message was accepted.
Instance UUID that sent the message.
Webhook URL configured for this instance (may be null).
Delivery status.
ERROR, PENDING, SERVER_ACK, DELIVERY_ACK, READ, PLAYED Origin device; 'unknown' for Cloud API sends.
Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"name": "order_confirmation",
"language": "pt_BR",
"number": "5511999999999",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ismael"
}
]
}
],
"webhookUrl": "https://example.com/webhooks/template"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}"
payload = {
"name": "order_confirmation",
"language": "pt_BR",
"number": "5511999999999",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ismael"
}
]
}
],
"webhookUrl": "https://example.com/webhooks/template"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'order_confirmation',
language: 'pt_BR',
number: '5511999999999',
components: [{type: 'body', parameters: [{type: 'text', text: 'Ismael'}]}],
webhookUrl: 'https://example.com/webhooks/template'
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}', 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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}",
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_confirmation',
'language' => 'pt_BR',
'number' => '5511999999999',
'components' => [
[
'type' => 'body',
'parameters' => [
[
'type' => 'text',
'text' => 'Ismael'
]
]
]
],
'webhookUrl' => 'https://example.com/webhooks/template'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}"
payload := strings.NewReader("{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendTemplate/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"order_confirmation\",\n \"language\": \"pt_BR\",\n \"number\": \"5511999999999\",\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Ismael\"\n }\n ]\n }\n ],\n \"webhookUrl\": \"https://example.com/webhooks/template\"\n}"
response = http.request(request)
puts response.read_body{
"key": {
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": true,
"id": "wamid.HBgLNTUxMTk5OTk5OTk5FQIAERgSN0EyN0M4N0E4RjBBQkNEMTIzAA=="
},
"message": {
"conversation": "▶️order_confirmation◀️"
},
"messageType": "conversation",
"messageTimestamp": 1720483200,
"instanceId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"webhookUrl": null,
"status": "PENDING",
"source": "unknown"
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}