curl --request POST \
--url https://api.wppfy.com/send/location \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"latitude": -23.5616,
"longitude": -46.6562,
"name": "MASP",
"address": "Av. Paulista, 1578 - Bela Vista, São Paulo - SP",
"replyid": "3EB0538DA65A59F6D8A251",
"mentions": "5511999999999,5511888888888",
"readchat": true,
"readmessages": true,
"delay": 1000,
"forward": true,
"track_source": "chatwoot",
"track_id": "msg_123456789",
"async": false
}
'import requests
url = "https://api.wppfy.com/send/location"
payload = {
"number": "5511999999999",
"latitude": -23.5616,
"longitude": -46.6562,
"name": "MASP",
"address": "Av. Paulista, 1578 - Bela Vista, São Paulo - SP",
"replyid": "3EB0538DA65A59F6D8A251",
"mentions": "5511999999999,5511888888888",
"readchat": True,
"readmessages": True,
"delay": 1000,
"forward": True,
"track_source": "chatwoot",
"track_id": "msg_123456789",
"async": False
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
latitude: -23.5616,
longitude: -46.6562,
name: 'MASP',
address: 'Av. Paulista, 1578 - Bela Vista, São Paulo - SP',
replyid: '3EB0538DA65A59F6D8A251',
mentions: '5511999999999,5511888888888',
readchat: true,
readmessages: true,
delay: 1000,
forward: true,
track_source: 'chatwoot',
track_id: 'msg_123456789',
async: false
})
};
fetch('https://api.wppfy.com/send/location', 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.wppfy.com/send/location",
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([
'number' => '5511999999999',
'latitude' => -23.5616,
'longitude' => -46.6562,
'name' => 'MASP',
'address' => 'Av. Paulista, 1578 - Bela Vista, São Paulo - SP',
'replyid' => '3EB0538DA65A59F6D8A251',
'mentions' => '5511999999999,5511888888888',
'readchat' => true,
'readmessages' => true,
'delay' => 1000,
'forward' => true,
'track_source' => 'chatwoot',
'track_id' => 'msg_123456789',
'async' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.wppfy.com/send/location"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.wppfy.com/send/location")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/send/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messageid": "<string>",
"chatid": "<string>",
"sender": "<string>",
"senderName": "<string>",
"isGroup": false,
"fromMe": false,
"messageType": "<string>",
"source": "<string>",
"messageTimestamp": 0,
"status": "<string>",
"text": "",
"quoted": "",
"edited": "",
"reaction": "",
"vote": "",
"convertOptions": "",
"buttonOrListid": "",
"owner": "",
"error": "",
"content": {},
"wasSentByApi": true,
"pinned": true,
"sendFunction": "<string>",
"sendPayload": {},
"fileURL": "<string>",
"callPeer": {
"jid": "<string>",
"name": "<string>",
"imagePreviewUrl": "<string>"
},
"send_folder_id": "<string>",
"track_source": "<string>",
"track_id": "<string>",
"ai_metadata": {
"agent_id": "<string>",
"turn": "<string>",
"flow_id": "<string>",
"request": {
"messages": "<array>",
"tools": "<array>",
"options": {
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123
}
},
"response": {
"choices": "<array>",
"toolResults": "<array>",
"error": "<string>"
},
"outcome": {
"status": "sent",
"texts": 123,
"audio": true,
"menus": 123,
"files": 123,
"handoff": "<string>",
"lead": [
"<string>"
],
"detail": "<string>"
}
},
"sender_pn": "<string>",
"sender_lid": "<string>",
"sender_image_preview_url": "<string>",
"response": {
"status": "success",
"message": "Location sent successfully"
}
}{
"error": "Invalid coordinates or missing number"
}{
"error": "Invalid token"
}{
"error": "Rate limit exceeded"
}{
"error": "Failed to send location"
}Enviar localização geográfica
Envia uma localização geográfica para um contato ou grupo.
Recursos Específicos
- Coordenadas precisas (latitude e longitude obrigatórias)
- Nome do local para identificação
- Endereço completo para exibição detalhada
- Mapa interativo no WhatsApp para navegação
- Pin personalizado com nome do local
Campos Comuns
Este endpoint suporta todos os campos opcionais comuns documentados na tag “Enviar Mensagem”, incluindo:
delay, readchat, readmessages, replyid, mentions, forward, track_source, track_id, placeholders e envio para grupos.
Exemplo Básico
{
"number": "5511999999999",
"name": "Maracanã",
"address": "Av. Pres. Castelo Branco - Maracanã, Rio de Janeiro - RJ",
"latitude": -22.912982815767986,
"longitude": -43.23028153499254
}
curl --request POST \
--url https://api.wppfy.com/send/location \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"latitude": -23.5616,
"longitude": -46.6562,
"name": "MASP",
"address": "Av. Paulista, 1578 - Bela Vista, São Paulo - SP",
"replyid": "3EB0538DA65A59F6D8A251",
"mentions": "5511999999999,5511888888888",
"readchat": true,
"readmessages": true,
"delay": 1000,
"forward": true,
"track_source": "chatwoot",
"track_id": "msg_123456789",
"async": false
}
'import requests
url = "https://api.wppfy.com/send/location"
payload = {
"number": "5511999999999",
"latitude": -23.5616,
"longitude": -46.6562,
"name": "MASP",
"address": "Av. Paulista, 1578 - Bela Vista, São Paulo - SP",
"replyid": "3EB0538DA65A59F6D8A251",
"mentions": "5511999999999,5511888888888",
"readchat": True,
"readmessages": True,
"delay": 1000,
"forward": True,
"track_source": "chatwoot",
"track_id": "msg_123456789",
"async": False
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
latitude: -23.5616,
longitude: -46.6562,
name: 'MASP',
address: 'Av. Paulista, 1578 - Bela Vista, São Paulo - SP',
replyid: '3EB0538DA65A59F6D8A251',
mentions: '5511999999999,5511888888888',
readchat: true,
readmessages: true,
delay: 1000,
forward: true,
track_source: 'chatwoot',
track_id: 'msg_123456789',
async: false
})
};
fetch('https://api.wppfy.com/send/location', 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.wppfy.com/send/location",
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([
'number' => '5511999999999',
'latitude' => -23.5616,
'longitude' => -46.6562,
'name' => 'MASP',
'address' => 'Av. Paulista, 1578 - Bela Vista, São Paulo - SP',
'replyid' => '3EB0538DA65A59F6D8A251',
'mentions' => '5511999999999,5511888888888',
'readchat' => true,
'readmessages' => true,
'delay' => 1000,
'forward' => true,
'track_source' => 'chatwoot',
'track_id' => 'msg_123456789',
'async' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.wppfy.com/send/location"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.wppfy.com/send/location")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/send/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"latitude\": -23.5616,\n \"longitude\": -46.6562,\n \"name\": \"MASP\",\n \"address\": \"Av. Paulista, 1578 - Bela Vista, São Paulo - SP\",\n \"replyid\": \"3EB0538DA65A59F6D8A251\",\n \"mentions\": \"5511999999999,5511888888888\",\n \"readchat\": true,\n \"readmessages\": true,\n \"delay\": 1000,\n \"forward\": true,\n \"track_source\": \"chatwoot\",\n \"track_id\": \"msg_123456789\",\n \"async\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messageid": "<string>",
"chatid": "<string>",
"sender": "<string>",
"senderName": "<string>",
"isGroup": false,
"fromMe": false,
"messageType": "<string>",
"source": "<string>",
"messageTimestamp": 0,
"status": "<string>",
"text": "",
"quoted": "",
"edited": "",
"reaction": "",
"vote": "",
"convertOptions": "",
"buttonOrListid": "",
"owner": "",
"error": "",
"content": {},
"wasSentByApi": true,
"pinned": true,
"sendFunction": "<string>",
"sendPayload": {},
"fileURL": "<string>",
"callPeer": {
"jid": "<string>",
"name": "<string>",
"imagePreviewUrl": "<string>"
},
"send_folder_id": "<string>",
"track_source": "<string>",
"track_id": "<string>",
"ai_metadata": {
"agent_id": "<string>",
"turn": "<string>",
"flow_id": "<string>",
"request": {
"messages": "<array>",
"tools": "<array>",
"options": {
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123
}
},
"response": {
"choices": "<array>",
"toolResults": "<array>",
"error": "<string>"
},
"outcome": {
"status": "sent",
"texts": 123,
"audio": true,
"menus": 123,
"files": 123,
"handoff": "<string>",
"lead": [
"<string>"
],
"detail": "<string>"
}
},
"sender_pn": "<string>",
"sender_lid": "<string>",
"sender_image_preview_url": "<string>",
"response": {
"status": "success",
"message": "Location sent successfully"
}
}{
"error": "Invalid coordinates or missing number"
}{
"error": "Invalid token"
}{
"error": "Rate limit exceeded"
}{
"error": "Failed to send location"
}Autorizações
Corpo
ID do chat para o qual a mensagem será enviada. Pode ser um número de telefone em formato internacional, um ID de grupo (@g.us), um ID de usuário (com @s.whatsapp.net ou @lid).
"5511999999999"
Latitude (-90 a 90)
-23.5616
Longitude (-180 a 180)
-46.6562
Nome do local
"MASP"
Endereço do local
"Av. Paulista, 1578 - Bela Vista, São Paulo - SP"
ID da mensagem para responder
"3EB0538DA65A59F6D8A251"
Números para mencionar (separados por vírgula)
"5511999999999,5511888888888"
Marca conversa como lida após envio
true
Marca últimas mensagens recebidas como lidas
true
Atraso em milissegundos antes do envio, durante o atraso apacerá 'Digitando...'
1000
Marca a mensagem como encaminhada no WhatsApp
true
Origem do rastreamento da mensagem
"chatwoot"
ID para rastreamento da mensagem (aceita valores duplicados)
"msg_123456789"
Se true, envia a mensagem de forma assíncrona via fila interna
false
Resposta
Localização enviada com sucesso
Representa uma mensagem trocada no sistema
ID único interno da mensagem (formato r + 7 caracteres hex aleatórios)
ID original da mensagem no provedor
ID da conversa relacionada
ID do remetente da mensagem
Nome exibido do remetente
Indica se é uma mensagem de grupo
Indica se a mensagem foi enviada pelo usuário
Tipo de conteúdo da mensagem
Plataforma de origem da mensagem
Timestamp original da mensagem em milissegundos
Status do ciclo de vida da mensagem.
Exemplos comuns: Queued, Canceled, Failed, Sent, Delivered, Read.
Em mensagem de grupo, segue o participante mais adiantado: Delivered quando pelo menos um recebeu, Read quando pelo menos um leu e Played quando pelo menos um ouviu.
Texto original da mensagem
ID da mensagem citada/respondida
Histórico de edições da mensagem
ID da mensagem reagida
Dados de votação de enquete e listas
Conversão de opções da mensagem, lista, enquete e botões
ID do botão ou item de lista selecionado
Dono da mensagem
Mensagem de erro caso o envio tenha falhado
Conteúdo bruto da mensagem (JSON serializado ou texto)
Indica se a mensagem foi enviada via API
Mensagem fixada na conversa (fixar e desafixar chegam também em messages_update, tipos Pinned e Unpinned)
Função usada para enviar a mensagem (quando enviada via API)
Payload usado no envio quando disponível. Dados de mídia em base64 são omitidos.
URL ou referência de arquivo da mensagem
Contato conhecido associado a uma ligação, quando disponível em messageType: call.
Show child attributes
Show child attributes
Pasta associada ao envio (quando aplicável)
Origem de rastreamento
ID de rastreamento (pode repetir)
Registro de uma rodada da IA. O completo (pedido ao modelo, resposta e outcome) fica uma vez, na última mensagem do contato que a rodada respondeu, também quando nada saiu (erro, resposta descartada). Cada mensagem enviada pela IA leva só agent_id e turn (o id dessa mensagem do contato).
Show child attributes
Show child attributes
JID PN resolvido do remetente (quando disponível)
LID original do remetente (quando disponível)
URL temporária de preview do remetente, quando conhecida. A hidratação desta versão preenche mensagens recebidas em grupos; o campo pode ser omitido. Não provoca consulta de foto ao WhatsApp na listagem.
Show child attributes
Show child attributes
