curl -X POST "https://integrations.contactship.ai/api/integrations/waba/send-location" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_y0xspd9p1v7vla6wkwc2z01u",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"latitude": 19.4326,
"longitude": -99.1332,
"name": "ContactShip HQ",
"address": "Paseo de la Reforma 505, CDMX"
}'
const response = await fetch(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_y0xspd9p1v7vla6wkwc2z01u',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
latitude: 19.4326,
longitude: -99.1332,
name: 'ContactShip HQ',
address: 'Paseo de la Reforma 505, CDMX',
}),
}
);
const result = await response.json();
console.log(result.data.thread_id);
import requests
response = requests.post(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_y0xspd9p1v7vla6wkwc2z01u',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'latitude': 19.4326,
'longitude': -99.1332,
'name': 'ContactShip HQ',
'address': 'Paseo de la Reforma 505, CDMX',
},
)
print(response.json())
{
"success": true,
"message": "Location enviada y guardada",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
WhatsApp (WABA)
Send WhatsApp Location
Send a location pin to a contact via WhatsApp Business API
POST
/
api
/
integrations
/
waba
/
send-location
curl -X POST "https://integrations.contactship.ai/api/integrations/waba/send-location" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_y0xspd9p1v7vla6wkwc2z01u",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"latitude": 19.4326,
"longitude": -99.1332,
"name": "ContactShip HQ",
"address": "Paseo de la Reforma 505, CDMX"
}'
const response = await fetch(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_y0xspd9p1v7vla6wkwc2z01u',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
latitude: 19.4326,
longitude: -99.1332,
name: 'ContactShip HQ',
address: 'Paseo de la Reforma 505, CDMX',
}),
}
);
const result = await response.json();
console.log(result.data.thread_id);
import requests
response = requests.post(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_y0xspd9p1v7vla6wkwc2z01u',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'latitude': 19.4326,
'longitude': -99.1332,
'name': 'ContactShip HQ',
'address': 'Paseo de la Reforma 505, CDMX',
},
)
print(response.json())
{
"success": true,
"message": "Location enviada y guardada",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
Sends a location message (map pin) to a contact through a WABA channel. The contact will receive an interactive map pin in WhatsApp.
Headers
string
requerido
Your API key for authentication.
Body
string
requerido
UUID of the WABA channel to send from. Use List Channels to get available channel IDs.
string
requerido
UUID of the contact to message.
number
requerido
Latitude coordinate of the location (e.g.
19.4326).number
requerido
Longitude coordinate of the location (e.g.
-99.1332).string
Name of the location (e.g.
ContactShip HQ). Displayed as the pin title.string
Address of the location (e.g.
Paseo de la Reforma 505, CDMX). Displayed below the pin title.string
UUID of an existing thread. If provided,
channel_id and contact_id are inferred automatically.boolean
predeterminado:"true"
Whether to save the message in the conversation thread.
Response
boolean
true if the location was sent successfully.object
Error Codes
400 Bad Request— Missing fields, invalid coordinates, or non-WABA channel, or Meta rejected the request (messagecarries the reason Meta gave, for example an expired channel token or a re-engagement window that closed)401 Unauthorized— Invalid or missing API key403 Forbidden— Channel does not belong to your organization404 Not Found— Contact not found429 Too Many Requests— Meta rate limit; retry after a pause500 Internal Server Error— Server-side error502 Bad Gateway— Meta API unavailable; safe to retry
Code Examples
curl -X POST "https://integrations.contactship.ai/api/integrations/waba/send-location" \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chn_y0xspd9p1v7vla6wkwc2z01u",
"contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
"latitude": 19.4326,
"longitude": -99.1332,
"name": "ContactShip HQ",
"address": "Paseo de la Reforma 505, CDMX"
}'
const response = await fetch(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
{
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel_id: 'chn_y0xspd9p1v7vla6wkwc2z01u',
contact_id: 'c1d2e3f4-a5b6-7890-cdef-123456789012',
latitude: 19.4326,
longitude: -99.1332,
name: 'ContactShip HQ',
address: 'Paseo de la Reforma 505, CDMX',
}),
}
);
const result = await response.json();
console.log(result.data.thread_id);
import requests
response = requests.post(
'https://integrations.contactship.ai/api/integrations/waba/send-location',
headers={'x-api-key': 'your-api-key'},
json={
'channel_id': 'chn_y0xspd9p1v7vla6wkwc2z01u',
'contact_id': 'c1d2e3f4-a5b6-7890-cdef-123456789012',
'latitude': 19.4326,
'longitude': -99.1332,
'name': 'ContactShip HQ',
'address': 'Paseo de la Reforma 505, CDMX',
},
)
print(response.json())
{
"success": true,
"message": "Location enviada y guardada",
"data": {
"message_id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider_id": "wamid.HBgNMTIxMjM0NTY3ODkwFQIAERgSM...",
"thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "sent"
}
}
