curl --request POST \
--url https://apis.vectalk.com.br/api/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"to": "5511999999999",
"type": "document",
"document": {
"link": "https://example.com/relatorio.pdf",
"filename": "relatorio.pdf",
"caption": "Relatório mensal"
}
}'
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "5511999999999", "wa_id": "5511999999999" }],
"messages": [{ "id": "wamid.HBgLNTUxMTk5OTk5OTk5..." }]
}
Mensagens
Documento
Envie um arquivo PDF, planilha, apresentação ou qualquer documento
POST
/
messages
curl --request POST \
--url https://apis.vectalk.com.br/api/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"to": "5511999999999",
"type": "document",
"document": {
"link": "https://example.com/relatorio.pdf",
"filename": "relatorio.pdf",
"caption": "Relatório mensal"
}
}'
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "5511999999999", "wa_id": "5511999999999" }],
"messages": [{ "id": "wamid.HBgLNTUxMTk5OTk5OTk5..." }]
}
string
default:"whatsapp"
required
string
required
Número do destinatário no formato E.164 sem o
+.string
default:"individual"
string
default:"document"
required
object
Para responder uma mensagem. Inclua
message_id da mensagem original.object
required
Hide campos
Hide campos
string
URL pública do arquivo. Use
link ou id, não os dois.string
ID de mídia retornado pelo Upload de Mídia.
string
Nome do arquivo exibido no WhatsApp.
string
Legenda opcional.
curl --request POST \
--url https://apis.vectalk.com.br/api/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"to": "5511999999999",
"type": "document",
"document": {
"link": "https://example.com/relatorio.pdf",
"filename": "relatorio.pdf",
"caption": "Relatório mensal"
}
}'
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "5511999999999", "wa_id": "5511999999999" }],
"messages": [{ "id": "wamid.HBgLNTUxMTk5OTk5OTk5..." }]
}