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": "Ubicación enviada correctamente"
}
}{
"error": "Coordenadas inválidas o número faltante"
}{
"error": "Token inválido"
}{
"error": "Límite de solicitudes excedido"
}{
"error": "Error al enviar la ubicación"
}Enviar ubicación geográfica
Envía una ubicación geográfica a un contacto o grupo.
Recursos específicos
- Coordenadas precisas (latitud y longitud obligatorias)
- Nombre del lugar para su identificación
- Dirección completa para una visualización detallada
- Mapa interactivo en WhatsApp para la navegación
- Pin personalizado con el nombre del lugar
Campos comunes
Este endpoint admite todos los campos opcionales comunes documentados en la tag “Enviar Mensaje”, incluidos:
delay, readchat, readmessages, replyid, mentions, forward, track_source, track_id, placeholders y envío a grupos.
Ejemplo 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": "Ubicación enviada correctamente"
}
}{
"error": "Coordenadas inválidas o número faltante"
}{
"error": "Token inválido"
}{
"error": "Límite de solicitudes excedido"
}{
"error": "Error al enviar la ubicación"
}Autorizaciones
Cuerpo
ID del chat al que se enviará el mensaje. Puede ser un número de teléfono en formato internacional, un ID de grupo (@g.us), un ID de usuario (con @s.whatsapp.net o @lid).
"5511999999999"
Latitud (-90 a 90)
-23.5616
Longitud (-180 a 180)
-46.6562
Nombre del lugar
"MASP"
Dirección del lugar
"Av. Paulista, 1578 - Bela Vista, São Paulo - SP"
ID del mensaje al que se responderá
"3EB0538DA65A59F6D8A251"
Números a mencionar (separados por coma)
"5511999999999,5511888888888"
Marca la conversación como leída después del envío
true
Marca los últimos mensajes recibidos como leídos
true
Retraso en milisegundos antes del envío; durante el retraso aparecerá 'Escribiendo...'
1000
Marca el mensaje como reenviado en WhatsApp
true
Origen de rastreo del mensaje
"chatwoot"
ID para el seguimiento del mensaje (acepta valores duplicados)
"msg_123456789"
Si es true, envía el mensaje de forma asíncrona mediante la cola interna
false
Respuesta
Ubicación enviada correctamente
Representa un mensaje intercambiado en el sistema
ID único interno del mensaje (formato r + 7 caracteres hex aleatorios)
ID original del mensaje en el proveedor
ID de la conversación relacionada
ID del remitente del mensaje
Nombre visible del remitente
Indica si es un mensaje de grupo
Indica si el mensaje fue enviado por el usuario
Tipo de contenido del mensaje
Plataforma de origen del mensaje
Timestamp original del mensaje en milisegundos
Estado del ciclo de vida del mensaje.
Ejemplos comunes: Queued, Canceled, Failed, Sent, Delivered, Read.
En mensajes de grupo, sigue al participante más avanzado: Delivered cuando al menos uno lo recibió, Read cuando al menos uno lo leyó y Played cuando al menos uno lo escuchó.
Texto original del mensaje
ID del mensaje citado/respondido
Historial de ediciones del mensaje
ID del mensaje al que se reaccionó
Datos de votación de encuestas y listas
Conversión de opciones del mensaje, lista, encuesta y botones
ID del botón o elemento de lista seleccionado
Propietario del mensaje
Mensaje de error en caso de que el envío haya fallado
Contenido bruto del mensaje (JSON serializado o texto)
Indica si el mensaje fue enviado vía API
Mensaje fijado en la conversación (fijar y desfijar también llegan en messages_update, tipos Pinned y Unpinned)
Función usada para enviar el mensaje (cuando se envía vía API)
Payload utilizado en el envío cuando está disponible. Los datos de medios en base64 se omiten.
URL o referencia de archivo del mensaje
Contacto conocido asociado a una llamada, cuando está disponible en messageType: call.
Show child attributes
Show child attributes
Carpeta asociada al envío (cuando corresponda)
Origen de rastreo
ID de seguimiento (puede repetirse)
Registro de una ronda de la IA. El completo (solicitud al modelo, respuesta y outcome) queda una sola vez, en el último mensaje del contacto al que respondió la ronda, incluso cuando no salió nada (error, respuesta descartada). Cada mensaje enviado por la IA lleva solo agent_id y turn (el id de ese mensaje del contacto).
Show child attributes
Show child attributes
JID PN resuelto del remitente (cuando esté disponible)
LID original del remitente (cuando esté disponible)
URL temporal de vista previa del remitente, cuando se conoce. La hidratación de esta versión completa los mensajes recibidos en grupos; el campo puede omitirse. No provoca consulta de foto a WhatsApp en el listado.
Show child attributes
Show child attributes
