Send Location Message
Send a location message with latitude, longitude, and optional name and address to WhatsApp contacts or groups. The location will be displayed as a map pin in the chat.Endpoint
Path Parameters
string
required
The name of your WhatsApp instance that you created
Request Body
string
required
The recipient’s WhatsApp number in international format (without + symbol)Example:
5511999999999 for a Brazilian numbernumber
required
The latitude coordinate of the locationExample:
-23.550520 (São Paulo, Brazil)number
required
The longitude coordinate of the locationExample:
-46.633308 (São Paulo, Brazil)string
required
The name of the location or placeExample:
Paulista Avenuestring
required
The full address of the locationExample:
Av. Paulista, 1578 - Bela Vista, São Paulo - SP, Brazilinteger
Delay before sending the message in millisecondsExample:
1000 for 1 second delayobject
Quote a previous message by providing its key and message object
boolean
Mention all participants in a groupDefault:
falsearray
Array of phone numbers to mention. Each number should be a numeric string.Example:
["5511999999999", "5511888888888"]Response
object
Message key information
object
The sent message object containing the location data
string
Unix timestamp when the message was sent
string
Message status (e.g., “PENDING”, “SENT”)
Code Examples
Advanced Examples
Send location of a restaurant
Send location of a restaurant
Send location with mentions
Send location with mentions
Send location as reply
Send location as reply
Location Coordinates Guide
Latitude and longitude values must be valid geographic coordinates:
- Latitude: -90 to +90 (negative for South, positive for North)
- Longitude: -180 to +180 (negative for West, positive for East)
How to Get Coordinates
-
Google Maps:
- Right-click on a location
- Click on the coordinates to copy them
- Format: latitude, longitude
-
GPS Devices:
- Most GPS devices provide latitude and longitude
- Ensure they’re in decimal format (not degrees/minutes/seconds)
-
Geolocation API:
Coordinate Format Examples
Location Display in WhatsApp
When you send a location message:- Recipients see a map preview with a pin
- The location name appears as a title
- The address appears as a subtitle
- Tapping the message opens the location in their default maps app
- Recipients can get directions to the location
Error Responses
number
HTTP status code
string
Error description
Common Errors
Latitude and longitude should be sent as numbers, not strings. Ensure your JSON payload uses numeric types for these values.