curl --request POST \
--url https://app.escrybe.com.br/api/whatsapp/v1/post \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"sender_name": "<string>",
"sender_document": "<string>",
"recipient_name": "<string>",
"recipient_phone": "<string>",
"recipient_document": "<string>",
"template_id": 123,
"team_member_id": 123,
"body": "<string>",
"template_variables": {},
"media_url": "<string>",
"media_filename": "<string>",
"media_file": "<string>",
"media_base64": "<string>",
"sender_choice": "system",
"sender_id": 123
}
'import requests
url = "https://app.escrybe.com.br/api/whatsapp/v1/post"
payload = {
"sender_name": "<string>",
"sender_document": "<string>",
"recipient_name": "<string>",
"recipient_phone": "<string>",
"recipient_document": "<string>",
"template_id": 123,
"team_member_id": 123,
"body": "<string>",
"template_variables": {},
"media_url": "<string>",
"media_filename": "<string>",
"media_file": "<string>",
"media_base64": "<string>",
"sender_choice": "system",
"sender_id": 123
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sender_name: '<string>',
sender_document: '<string>',
recipient_name: '<string>',
recipient_phone: '<string>',
recipient_document: '<string>',
template_id: 123,
team_member_id: 123,
body: JSON.stringify('<string>'),
template_variables: {},
media_url: '<string>',
media_filename: '<string>',
media_file: '<string>',
media_base64: '<string>',
sender_choice: 'system',
sender_id: 123
})
};
fetch('https://app.escrybe.com.br/api/whatsapp/v1/post', 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://app.escrybe.com.br/api/whatsapp/v1/post",
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([
'sender_name' => '<string>',
'sender_document' => '<string>',
'recipient_name' => '<string>',
'recipient_phone' => '<string>',
'recipient_document' => '<string>',
'template_id' => 123,
'team_member_id' => 123,
'body' => '<string>',
'template_variables' => [
],
'media_url' => '<string>',
'media_filename' => '<string>',
'media_file' => '<string>',
'media_base64' => '<string>',
'sender_choice' => 'system',
'sender_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.escrybe.com.br/api/whatsapp/v1/post"
payload := strings.NewReader("{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.escrybe.com.br/api/whatsapp/v1/post")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/whatsapp/v1/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "<string>",
"data": {
"message_id": 123,
"visual_id": "<string>",
"status": "processing",
"paymentMethod": "<string>",
"stored_payment_method": "<string>",
"team_member_id": 123,
"template_id": 123,
"template_name": "<string>",
"sender_id": 123
}
}{
"status": 400,
"status_message": "Campos obrigatórios não preenchidos",
"data": null
}{
"status": 401,
"status_message": "Unauthorized - invalid credentials",
"data": null
}{
"status": 200,
"status_message": "<string>",
"data": {}
}{
"status": 200,
"status_message": "<string>",
"data": {}
}Send a WhatsApp message
The recipient’s phone is normalized to E.164 and verified to be a WhatsApp number — requests for numbers not on WhatsApp are rejected with 400.
curl --request POST \
--url https://app.escrybe.com.br/api/whatsapp/v1/post \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"sender_name": "<string>",
"sender_document": "<string>",
"recipient_name": "<string>",
"recipient_phone": "<string>",
"recipient_document": "<string>",
"template_id": 123,
"team_member_id": 123,
"body": "<string>",
"template_variables": {},
"media_url": "<string>",
"media_filename": "<string>",
"media_file": "<string>",
"media_base64": "<string>",
"sender_choice": "system",
"sender_id": 123
}
'import requests
url = "https://app.escrybe.com.br/api/whatsapp/v1/post"
payload = {
"sender_name": "<string>",
"sender_document": "<string>",
"recipient_name": "<string>",
"recipient_phone": "<string>",
"recipient_document": "<string>",
"template_id": 123,
"team_member_id": 123,
"body": "<string>",
"template_variables": {},
"media_url": "<string>",
"media_filename": "<string>",
"media_file": "<string>",
"media_base64": "<string>",
"sender_choice": "system",
"sender_id": 123
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sender_name: '<string>',
sender_document: '<string>',
recipient_name: '<string>',
recipient_phone: '<string>',
recipient_document: '<string>',
template_id: 123,
team_member_id: 123,
body: JSON.stringify('<string>'),
template_variables: {},
media_url: '<string>',
media_filename: '<string>',
media_file: '<string>',
media_base64: '<string>',
sender_choice: 'system',
sender_id: 123
})
};
fetch('https://app.escrybe.com.br/api/whatsapp/v1/post', 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://app.escrybe.com.br/api/whatsapp/v1/post",
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([
'sender_name' => '<string>',
'sender_document' => '<string>',
'recipient_name' => '<string>',
'recipient_phone' => '<string>',
'recipient_document' => '<string>',
'template_id' => 123,
'team_member_id' => 123,
'body' => '<string>',
'template_variables' => [
],
'media_url' => '<string>',
'media_filename' => '<string>',
'media_file' => '<string>',
'media_base64' => '<string>',
'sender_choice' => 'system',
'sender_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.escrybe.com.br/api/whatsapp/v1/post"
payload := strings.NewReader("{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.escrybe.com.br/api/whatsapp/v1/post")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/whatsapp/v1/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender_name\": \"<string>\",\n \"sender_document\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_phone\": \"<string>\",\n \"recipient_document\": \"<string>\",\n \"template_id\": 123,\n \"team_member_id\": 123,\n \"body\": \"<string>\",\n \"template_variables\": {},\n \"media_url\": \"<string>\",\n \"media_filename\": \"<string>\",\n \"media_file\": \"<string>\",\n \"media_base64\": \"<string>\",\n \"sender_choice\": \"system\",\n \"sender_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "<string>",
"data": {
"message_id": 123,
"visual_id": "<string>",
"status": "processing",
"paymentMethod": "<string>",
"stored_payment_method": "<string>",
"team_member_id": 123,
"template_id": 123,
"template_name": "<string>",
"sender_id": 123
}
}{
"status": 400,
"status_message": "Campos obrigatórios não preenchidos",
"data": null
}{
"status": 401,
"status_message": "Unauthorized - invalid credentials",
"data": null
}{
"status": 200,
"status_message": "<string>",
"data": {}
}{
"status": 200,
"status_message": "<string>",
"data": {}
}Authorizations
HTTP Basic where username is your account e-mail and password is your security token.
Body
Sender CPF/CNPJ.
Normalized to E.164.
Must be an approved template belonging to the selected sender. With system senders, the template must have been created by you (or your team owner) or be shared.
escrybe_credits, invoice, team Required when paymentMethod=team.
4096Map of template variable substitutions. Must cover at least the template's variable count.
One of media_url/media_file/media_base64 is required when the template header format is IMAGE or DOCUMENT.
IMAGE JPEG/PNG ≤5MB; DOCUMENT PDF ≤100MB. Password-protected PDFs are rejected.
system or explicit sender.
Specific sender to use.