Saltar al contenido principal
POST
Sends a location message (map pin) to a contact through a WABA channel. The contact will receive an interactive map pin in WhatsApp.
A location is a free-form message: WhatsApp only delivers it within the 24-hour window that opens when the contact writes to you. To start a conversation, use Send WhatsApp Template.

Headers

string
requerido
Your API key for authentication.

Body

Send channel_id + contact_id, or thread_id.
string
ID of the WABA channel to send from. Required unless you send thread_id. Use List Channels to get available channel IDs.
string
UUID of the contact to message. Required unless you send thread_id.
number
requerido
Latitude of the location, between -90 and 90 (e.g. 19.4326).
number
requerido
Longitude of the location, between -180 and 180 (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

The response is { "statusCode": number, "data": object }. The fields below describe data.
boolean
true if the location was sent successfully.
string
Human-readable result.
object

Error Codes

  • 400 Bad Request — Missing fields (latitude, longitude, or channel_id + contact_id without thread_id), coordinates out of range, unknown body fields, or a non-WABA channel; or Meta rejected the request (message carries the reason Meta gave, for example an expired channel token or a closed 24-hour window)
  • 401 Unauthorized — Invalid or missing API key
  • 403 Forbidden — Channel does not belong to your organization
  • 404 Not Found — Contact not found
  • 429 Too Many Requests — Rate limit; retry after a pause
  • 500 Internal Server Error — Server-side error
  • 502 Bad Gateway — Meta API unavailable; safe to retry

Code Examples