Enviar mensagem numa conversa existente
curl --request POST \
--url https://{instance}/wapi/v1/conversations/{ticketId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"quotedMsgId": "<string>",
"templateData": {
"templateName": "<string>",
"templateLanguage": "pt_BR",
"templateParameters": [
"<string>"
]
}
}
'import requests
url = "https://{instance}/wapi/v1/conversations/{ticketId}/messages"
payload = {
"body": "<string>",
"quotedMsgId": "<string>",
"templateData": {
"templateName": "<string>",
"templateLanguage": "pt_BR",
"templateParameters": ["<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({
body: JSON.stringify('<string>'),
quotedMsgId: '<string>',
templateData: {
templateName: '<string>',
templateLanguage: 'pt_BR',
templateParameters: ['<string>']
}
})
};
fetch('https://{instance}/wapi/v1/conversations/{ticketId}/messages', 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://{instance}/wapi/v1/conversations/{ticketId}/messages",
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([
'body' => '<string>',
'quotedMsgId' => '<string>',
'templateData' => [
'templateName' => '<string>',
'templateLanguage' => 'pt_BR',
'templateParameters' => [
'<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://{instance}/wapi/v1/conversations/{ticketId}/messages"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\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://{instance}/wapi/v1/conversations/{ticketId}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}/wapi/v1/conversations/{ticketId}/messages")
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 \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"requestId": "req_77a1c9",
"ticketId": 4821,
"messages": [
{
"id": "wamid.HBgN...",
"status": "queued",
"ack": 0,
"createdAt": "2026-09-23T09:15:02.000Z"
}
]
}{
"error": "Informe texto, mídia ou template para envio",
"code": "ERR_MISSING_CONTENT"
}{
"error": "Token não fornecido",
"code": "ERR_TOKEN_MISSING"
}{
"error": "Token sem permissão para esta ação",
"code": "ERR_SCOPE_MISSING"
}{
"error": "ERR_NO_TICKET_FOUND",
"code": "ERR_NO_TICKET_FOUND"
}{
"error": "Limite de requisições excedido",
"code": "ERR_RATE_LIMITED"
}Mensagens
Enviar mensagem numa conversa existente
Responde numa conversa (ticket) já aberta, usando a mesma conexão do ticket. Envie pelo menos um entre body (texto), medias (multipart, um ou mais arquivos) ou templateData (template aprovado, obrigatório fora da janela de 24h do WABA — depois que o contato responde, a janela reabre por mais 24h; sem isso, apenas templates aprovados são entregues). Use quotedMsgId pra responder citando uma mensagem anterior daquela conversa. Nenhum conteúdo enviado devolve 400 ERR_MISSING_CONTENT; ticketId inexistente ou de outra conta devolve 404 ERR_NO_TICKET_FOUND. Requer escopo messages:send.
POST
/
v1
/
conversations
/
{ticketId}
/
messages
Enviar mensagem numa conversa existente
curl --request POST \
--url https://{instance}/wapi/v1/conversations/{ticketId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"quotedMsgId": "<string>",
"templateData": {
"templateName": "<string>",
"templateLanguage": "pt_BR",
"templateParameters": [
"<string>"
]
}
}
'import requests
url = "https://{instance}/wapi/v1/conversations/{ticketId}/messages"
payload = {
"body": "<string>",
"quotedMsgId": "<string>",
"templateData": {
"templateName": "<string>",
"templateLanguage": "pt_BR",
"templateParameters": ["<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({
body: JSON.stringify('<string>'),
quotedMsgId: '<string>',
templateData: {
templateName: '<string>',
templateLanguage: 'pt_BR',
templateParameters: ['<string>']
}
})
};
fetch('https://{instance}/wapi/v1/conversations/{ticketId}/messages', 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://{instance}/wapi/v1/conversations/{ticketId}/messages",
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([
'body' => '<string>',
'quotedMsgId' => '<string>',
'templateData' => [
'templateName' => '<string>',
'templateLanguage' => 'pt_BR',
'templateParameters' => [
'<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://{instance}/wapi/v1/conversations/{ticketId}/messages"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\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://{instance}/wapi/v1/conversations/{ticketId}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}/wapi/v1/conversations/{ticketId}/messages")
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 \"body\": \"<string>\",\n \"quotedMsgId\": \"<string>\",\n \"templateData\": {\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"pt_BR\",\n \"templateParameters\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"requestId": "req_77a1c9",
"ticketId": 4821,
"messages": [
{
"id": "wamid.HBgN...",
"status": "queued",
"ack": 0,
"createdAt": "2026-09-23T09:15:02.000Z"
}
]
}{
"error": "Informe texto, mídia ou template para envio",
"code": "ERR_MISSING_CONTENT"
}{
"error": "Token não fornecido",
"code": "ERR_TOKEN_MISSING"
}{
"error": "Token sem permissão para esta ação",
"code": "ERR_SCOPE_MISSING"
}{
"error": "ERR_NO_TICKET_FOUND",
"code": "ERR_NO_TICKET_FOUND"
}{
"error": "Limite de requisições excedido",
"code": "ERR_RATE_LIMITED"
}Authorizations
Token criado em API → Tokens no painel. Prefixo wtx_live_ (ou wtx_test_).
Path Parameters
Body
application/jsonmultipart/form-data
Pelo menos um entre body, medias (multipart) e templateData é obrigatório.