Enviar Mensagem Ativa
curl --request POST \
--url https://app.converza.io/api/openapi/v1/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"device_id": "880e8400-e29b-41d4-a716-446655440003",
"message": "Olá! Como posso ajudá-lo hoje?",
"destination_number": "5511999999999",
"send_as_audio": false,
"ai_generates_message": false,
"image_url": "https://example.com/image.jpg",
"image_mime_type": "image/jpeg"
}
'import requests
url = "https://app.converza.io/api/openapi/v1/send"
payload = {
"device_id": "880e8400-e29b-41d4-a716-446655440003",
"message": "Olá! Como posso ajudá-lo hoje?",
"destination_number": "5511999999999",
"send_as_audio": False,
"ai_generates_message": False,
"image_url": "https://example.com/image.jpg",
"image_mime_type": "image/jpeg"
}
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({
device_id: '880e8400-e29b-41d4-a716-446655440003',
message: 'Olá! Como posso ajudá-lo hoje?',
destination_number: '5511999999999',
send_as_audio: false,
ai_generates_message: false,
image_url: 'https://example.com/image.jpg',
image_mime_type: 'image/jpeg'
})
};
fetch('https://app.converza.io/api/openapi/v1/send', 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.converza.io/api/openapi/v1/send",
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([
'device_id' => '880e8400-e29b-41d4-a716-446655440003',
'message' => 'Olá! Como posso ajudá-lo hoje?',
'destination_number' => '5511999999999',
'send_as_audio' => false,
'ai_generates_message' => false,
'image_url' => 'https://example.com/image.jpg',
'image_mime_type' => 'image/jpeg'
]),
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://app.converza.io/api/openapi/v1/send"
payload := strings.NewReader("{\n \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\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://app.converza.io/api/openapi/v1/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.converza.io/api/openapi/v1/send")
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 \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Dispositivo de Suporte 01",
"destinationNumber": "5511999999999",
"sendAsAudio": false,
"aiGeneratesMessage": false,
"imageUrl": "<string>",
"imageMimeType": "<string>"
}
}{
"success": false,
"error": "Corpo da requisição inválido",
"code": "BAD_REQUEST"
}{
"success": false,
"error": "Permissões insuficientes",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Recurso não encontrado",
"code": "NOT_FOUND"
}{
"success": false,
"error": "Erro interno do servidor",
"code": "INTERNAL_ERROR"
}Dispositivos
Enviar Mensagem Ativa
Envia uma mensagem para um número de WhatsApp através de um dispositivo conectado. O dispositivo deve estar iniciado e conectado para enviar mensagens.
POST
/
api
/
openapi
/
v1
/
send
Enviar Mensagem Ativa
curl --request POST \
--url https://app.converza.io/api/openapi/v1/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"device_id": "880e8400-e29b-41d4-a716-446655440003",
"message": "Olá! Como posso ajudá-lo hoje?",
"destination_number": "5511999999999",
"send_as_audio": false,
"ai_generates_message": false,
"image_url": "https://example.com/image.jpg",
"image_mime_type": "image/jpeg"
}
'import requests
url = "https://app.converza.io/api/openapi/v1/send"
payload = {
"device_id": "880e8400-e29b-41d4-a716-446655440003",
"message": "Olá! Como posso ajudá-lo hoje?",
"destination_number": "5511999999999",
"send_as_audio": False,
"ai_generates_message": False,
"image_url": "https://example.com/image.jpg",
"image_mime_type": "image/jpeg"
}
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({
device_id: '880e8400-e29b-41d4-a716-446655440003',
message: 'Olá! Como posso ajudá-lo hoje?',
destination_number: '5511999999999',
send_as_audio: false,
ai_generates_message: false,
image_url: 'https://example.com/image.jpg',
image_mime_type: 'image/jpeg'
})
};
fetch('https://app.converza.io/api/openapi/v1/send', 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.converza.io/api/openapi/v1/send",
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([
'device_id' => '880e8400-e29b-41d4-a716-446655440003',
'message' => 'Olá! Como posso ajudá-lo hoje?',
'destination_number' => '5511999999999',
'send_as_audio' => false,
'ai_generates_message' => false,
'image_url' => 'https://example.com/image.jpg',
'image_mime_type' => 'image/jpeg'
]),
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://app.converza.io/api/openapi/v1/send"
payload := strings.NewReader("{\n \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\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://app.converza.io/api/openapi/v1/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.converza.io/api/openapi/v1/send")
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 \"device_id\": \"880e8400-e29b-41d4-a716-446655440003\",\n \"message\": \"Olá! Como posso ajudá-lo hoje?\",\n \"destination_number\": \"5511999999999\",\n \"send_as_audio\": false,\n \"ai_generates_message\": false,\n \"image_url\": \"https://example.com/image.jpg\",\n \"image_mime_type\": \"image/jpeg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Dispositivo de Suporte 01",
"destinationNumber": "5511999999999",
"sendAsAudio": false,
"aiGeneratesMessage": false,
"imageUrl": "<string>",
"imageMimeType": "<string>"
}
}{
"success": false,
"error": "Corpo da requisição inválido",
"code": "BAD_REQUEST"
}{
"success": false,
"error": "Permissões insuficientes",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Recurso não encontrado",
"code": "NOT_FOUND"
}{
"success": false,
"error": "Erro interno do servidor",
"code": "INTERNAL_ERROR"
}Authorizations
Token JWT obtido do endpoint /api/openapi/auth/token
Body
application/json
ID do dispositivo que enviará a mensagem
Example:
"880e8400-e29b-41d4-a716-446655440003"
Mensagem de texto a ser enviada
Example:
"Olá! Como posso ajudá-lo hoje?"
Número de telefone de destino (formato internacional)
Example:
"5511999999999"
Se true, converte a mensagem de texto em áudio antes de enviar
Example:
false
Se true, permite que a IA gere uma resposta personalizada
Example:
false
URL de uma imagem para enviar junto com a mensagem
Example:
"https://example.com/image.jpg"
Tipo MIME da imagem (ex. image/jpeg, image/png)
Example:
"image/jpeg"
Was this page helpful?
⌘I