Enviar mensagem
curl --request POST \
--url https://api.liderhub.com.br/v1/send/message \
--header 'Content-Type: application/json' \
--header 'x-company-key: <api-key>' \
--data '
{
"contact": "aaaaaaaa-bbbb-cccc-dddd-111111111111",
"content": "Mensagem de exemplo",
"messageType": "conversation",
"url": "https://example.com/storage/bucket/example-file.jpg",
"scheduledAt": "2026-03-25T14:30:00Z",
"note": false
}
'import requests
url = "https://api.liderhub.com.br/v1/send/message"
payload = {
"contact": "aaaaaaaa-bbbb-cccc-dddd-111111111111",
"content": "Mensagem de exemplo",
"messageType": "conversation",
"url": "https://example.com/storage/bucket/example-file.jpg",
"scheduledAt": "2026-03-25T14:30:00Z",
"note": False
}
headers = {
"x-company-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-company-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact: 'aaaaaaaa-bbbb-cccc-dddd-111111111111',
content: 'Mensagem de exemplo',
messageType: 'conversation',
url: 'https://example.com/storage/bucket/example-file.jpg',
scheduledAt: '2026-03-25T14:30:00Z',
note: false
})
};
fetch('https://api.liderhub.com.br/v1/send/message', 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://api.liderhub.com.br/v1/send/message",
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([
'contact' => 'aaaaaaaa-bbbb-cccc-dddd-111111111111',
'content' => 'Mensagem de exemplo',
'messageType' => 'conversation',
'url' => 'https://example.com/storage/bucket/example-file.jpg',
'scheduledAt' => '2026-03-25T14:30:00Z',
'note' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-company-key: <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://api.liderhub.com.br/v1/send/message"
payload := strings.NewReader("{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-company-key", "<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://api.liderhub.com.br/v1/send/message")
.header("x-company-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liderhub.com.br/v1/send/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-company-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}"
response = http.request(request)
puts response.read_body{
"response": "Success",
"id": "aaaaaaaa-bbbb-cccc-dddd-111111111111"
}Message
Enviar mensagem
Envia uma mensagem para um contato existente.
POST
/
v1
/
send
/
message
Enviar mensagem
curl --request POST \
--url https://api.liderhub.com.br/v1/send/message \
--header 'Content-Type: application/json' \
--header 'x-company-key: <api-key>' \
--data '
{
"contact": "aaaaaaaa-bbbb-cccc-dddd-111111111111",
"content": "Mensagem de exemplo",
"messageType": "conversation",
"url": "https://example.com/storage/bucket/example-file.jpg",
"scheduledAt": "2026-03-25T14:30:00Z",
"note": false
}
'import requests
url = "https://api.liderhub.com.br/v1/send/message"
payload = {
"contact": "aaaaaaaa-bbbb-cccc-dddd-111111111111",
"content": "Mensagem de exemplo",
"messageType": "conversation",
"url": "https://example.com/storage/bucket/example-file.jpg",
"scheduledAt": "2026-03-25T14:30:00Z",
"note": False
}
headers = {
"x-company-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-company-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact: 'aaaaaaaa-bbbb-cccc-dddd-111111111111',
content: 'Mensagem de exemplo',
messageType: 'conversation',
url: 'https://example.com/storage/bucket/example-file.jpg',
scheduledAt: '2026-03-25T14:30:00Z',
note: false
})
};
fetch('https://api.liderhub.com.br/v1/send/message', 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://api.liderhub.com.br/v1/send/message",
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([
'contact' => 'aaaaaaaa-bbbb-cccc-dddd-111111111111',
'content' => 'Mensagem de exemplo',
'messageType' => 'conversation',
'url' => 'https://example.com/storage/bucket/example-file.jpg',
'scheduledAt' => '2026-03-25T14:30:00Z',
'note' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-company-key: <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://api.liderhub.com.br/v1/send/message"
payload := strings.NewReader("{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-company-key", "<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://api.liderhub.com.br/v1/send/message")
.header("x-company-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liderhub.com.br/v1/send/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-company-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact\": \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n \"content\": \"Mensagem de exemplo\",\n \"messageType\": \"conversation\",\n \"url\": \"https://example.com/storage/bucket/example-file.jpg\",\n \"scheduledAt\": \"2026-03-25T14:30:00Z\",\n \"note\": false\n}"
response = http.request(request)
puts response.read_body{
"response": "Success",
"id": "aaaaaaaa-bbbb-cccc-dddd-111111111111"
}Autorizações
Chave de autenticação do workspace (gerada na plataforma Liderhub)
Corpo
application/json
Chat/contact ID
Exemplo:
"aaaaaaaa-bbbb-cccc-dddd-111111111111"
Message content. Required for conversation; optional for media types.
Exemplo:
"Mensagem de exemplo"
Message type
Opções disponíveis:
conversation, image, video, audio, document Exemplo:
"conversation"
URL for media messages (required for image, video, audio and document; ignored for conversation).
Exemplo:
"https://example.com/storage/bucket/example-file.jpg"
Timestamp ISO para agendamento. Se vazio, disparo imediato.
Exemplo:
"2026-03-25T14:30:00Z"
Se true, grava como nota interna (type: NOTES, não dispara envio como mensagem de API). Se false ou omitido, mensagem de API como hoje.
Exemplo:
false
Última modificação em 19 de agosto de 2026
Esta página foi útil?
⌘I