Send a message
Queues a message to a phone number through one of the workspace channels. Official WhatsApp channels (with waba_id) require a template for contacts outside the 24h window. Use the returned id with GET /v1/messages/queue/ to track delivery.
curl --request POST \
--url https://platform.kinbox.com.br/v1/messages/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channelId": 103,
"to": "5585988887777",
"message": "mensagem de teste",
"hidden": true,
"isMedia": false,
"callOptions": {
"setGroupId": 10,
"execAutoAttributionId": 8,
"execBotId": 123,
"contact": {
"name": "Fulano",
"email": "fulano@gmail.com"
},
"doInternationalValidation": true
},
"template": {
"id": "712287883441111",
"name": "disparo_cnc",
"language": "pt_BR",
"components": [
{}
],
"bodyFields": [
"Fulano",
"10/10/2026"
]
},
"executeAt": "2020-01-01T15:04:41.004Z",
"externalId": "<string>"
}
'import requests
url = "https://platform.kinbox.com.br/v1/messages/send"
payload = {
"channelId": 103,
"to": "5585988887777",
"message": "mensagem de teste",
"hidden": True,
"isMedia": False,
"callOptions": {
"setGroupId": 10,
"execAutoAttributionId": 8,
"execBotId": 123,
"contact": {
"name": "Fulano",
"email": "fulano@gmail.com"
},
"doInternationalValidation": True
},
"template": {
"id": "712287883441111",
"name": "disparo_cnc",
"language": "pt_BR",
"components": [{}],
"bodyFields": ["Fulano", "10/10/2026"]
},
"executeAt": "2020-01-01T15:04:41.004Z",
"externalId": "<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({
channelId: 103,
to: '5585988887777',
message: 'mensagem de teste',
hidden: true,
isMedia: false,
callOptions: {
setGroupId: 10,
execAutoAttributionId: 8,
execBotId: 123,
contact: {name: 'Fulano', email: 'fulano@gmail.com'},
doInternationalValidation: true
},
template: {
id: '712287883441111',
name: 'disparo_cnc',
language: 'pt_BR',
components: [{}],
bodyFields: ['Fulano', '10/10/2026']
},
executeAt: '2020-01-01T15:04:41.004Z',
externalId: '<string>'
})
};
fetch('https://platform.kinbox.com.br/v1/messages/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://platform.kinbox.com.br/v1/messages/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([
'channelId' => 103,
'to' => '5585988887777',
'message' => 'mensagem de teste',
'hidden' => true,
'isMedia' => false,
'callOptions' => [
'setGroupId' => 10,
'execAutoAttributionId' => 8,
'execBotId' => 123,
'contact' => [
'name' => 'Fulano',
'email' => 'fulano@gmail.com'
],
'doInternationalValidation' => true
],
'template' => [
'id' => '712287883441111',
'name' => 'disparo_cnc',
'language' => 'pt_BR',
'components' => [
[
]
],
'bodyFields' => [
'Fulano',
'10/10/2026'
]
],
'executeAt' => '2020-01-01T15:04:41.004Z',
'externalId' => '<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://platform.kinbox.com.br/v1/messages/send"
payload := strings.NewReader("{\n \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\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://platform.kinbox.com.br/v1/messages/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.kinbox.com.br/v1/messages/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 \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123456,
"queued": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Id do canal de envio
103
Telefone no formato DDI+DDD+NUMERO (apenas dígitos). Caracteres não numéricos são removidos.
"5585988887777"
Texto da mensagem. Obrigatório quando não há template nem callOptions.
"mensagem de teste"
Quando true, a conversa não é aberta para os atendentes (fica oculta/resolvida).
Quando true, message é tratada como URL de mídia.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Agenda o envio para a data informada (ISO 8601).
"2020-01-01T15:04:41.004Z"
Identificador externo idempotente. Uma segunda chamada com o mesmo valor retorna 409.
curl --request POST \
--url https://platform.kinbox.com.br/v1/messages/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channelId": 103,
"to": "5585988887777",
"message": "mensagem de teste",
"hidden": true,
"isMedia": false,
"callOptions": {
"setGroupId": 10,
"execAutoAttributionId": 8,
"execBotId": 123,
"contact": {
"name": "Fulano",
"email": "fulano@gmail.com"
},
"doInternationalValidation": true
},
"template": {
"id": "712287883441111",
"name": "disparo_cnc",
"language": "pt_BR",
"components": [
{}
],
"bodyFields": [
"Fulano",
"10/10/2026"
]
},
"executeAt": "2020-01-01T15:04:41.004Z",
"externalId": "<string>"
}
'import requests
url = "https://platform.kinbox.com.br/v1/messages/send"
payload = {
"channelId": 103,
"to": "5585988887777",
"message": "mensagem de teste",
"hidden": True,
"isMedia": False,
"callOptions": {
"setGroupId": 10,
"execAutoAttributionId": 8,
"execBotId": 123,
"contact": {
"name": "Fulano",
"email": "fulano@gmail.com"
},
"doInternationalValidation": True
},
"template": {
"id": "712287883441111",
"name": "disparo_cnc",
"language": "pt_BR",
"components": [{}],
"bodyFields": ["Fulano", "10/10/2026"]
},
"executeAt": "2020-01-01T15:04:41.004Z",
"externalId": "<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({
channelId: 103,
to: '5585988887777',
message: 'mensagem de teste',
hidden: true,
isMedia: false,
callOptions: {
setGroupId: 10,
execAutoAttributionId: 8,
execBotId: 123,
contact: {name: 'Fulano', email: 'fulano@gmail.com'},
doInternationalValidation: true
},
template: {
id: '712287883441111',
name: 'disparo_cnc',
language: 'pt_BR',
components: [{}],
bodyFields: ['Fulano', '10/10/2026']
},
executeAt: '2020-01-01T15:04:41.004Z',
externalId: '<string>'
})
};
fetch('https://platform.kinbox.com.br/v1/messages/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://platform.kinbox.com.br/v1/messages/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([
'channelId' => 103,
'to' => '5585988887777',
'message' => 'mensagem de teste',
'hidden' => true,
'isMedia' => false,
'callOptions' => [
'setGroupId' => 10,
'execAutoAttributionId' => 8,
'execBotId' => 123,
'contact' => [
'name' => 'Fulano',
'email' => 'fulano@gmail.com'
],
'doInternationalValidation' => true
],
'template' => [
'id' => '712287883441111',
'name' => 'disparo_cnc',
'language' => 'pt_BR',
'components' => [
[
]
],
'bodyFields' => [
'Fulano',
'10/10/2026'
]
],
'executeAt' => '2020-01-01T15:04:41.004Z',
'externalId' => '<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://platform.kinbox.com.br/v1/messages/send"
payload := strings.NewReader("{\n \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\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://platform.kinbox.com.br/v1/messages/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.kinbox.com.br/v1/messages/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 \"channelId\": 103,\n \"to\": \"5585988887777\",\n \"message\": \"mensagem de teste\",\n \"hidden\": true,\n \"isMedia\": false,\n \"callOptions\": {\n \"setGroupId\": 10,\n \"execAutoAttributionId\": 8,\n \"execBotId\": 123,\n \"contact\": {\n \"name\": \"Fulano\",\n \"email\": \"fulano@gmail.com\"\n },\n \"doInternationalValidation\": true\n },\n \"template\": {\n \"id\": \"712287883441111\",\n \"name\": \"disparo_cnc\",\n \"language\": \"pt_BR\",\n \"components\": [\n {}\n ],\n \"bodyFields\": [\n \"Fulano\",\n \"10/10/2026\"\n ]\n },\n \"executeAt\": \"2020-01-01T15:04:41.004Z\",\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123456,
"queued": true
}