Saltar al contenido principal
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"
  }'
{
  "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

x-api-key
string
requerido
Your API key for authentication.

Body

channel_id
string
requerido
UUID of the WABA channel to send from. Use List Channels to get available channel IDs.
contact_id
string
requerido
UUID of the contact to message.
latitude
number
requerido
Latitude coordinate of the location (e.g. 19.4326).
longitude
number
requerido
Longitude coordinate of the location (e.g. -99.1332).
name
string
Name of the location (e.g. ContactShip HQ). Displayed as the pin title.
address
string
Address of the location (e.g. Paseo de la Reforma 505, CDMX). Displayed below the pin title.
thread_id
string
UUID of an existing thread. If provided, channel_id and contact_id are inferred automatically.
save_message
boolean
predeterminado:"true"
Whether to save the message in the conversation thread.

Response

success
boolean
true if the location was sent successfully.
data
object

Error Codes

  • 400 Bad Request — Missing fields, invalid coordinates, or non-WABA channel
  • 401 Unauthorized — Invalid or missing API key
  • 403 Forbidden — Channel does not belong to your organization
  • 404 Not Found — Contact not found
  • 500 Internal Server Error — Meta API error

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"
  }'
{
  "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"
  }
}