Skip to main content

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 number
number
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 Avenue
string
required
The full address of the locationExample: Av. Paulista, 1578 - Bela Vista, São Paulo - SP, Brazil
integer
Delay before sending the message in millisecondsExample: 1000 for 1 second delay
object
Quote a previous message by providing its key and message object
boolean
Mention all participants in a groupDefault: false
array
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

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

  1. Google Maps:
    • Right-click on a location
    • Click on the coordinates to copy them
    • Format: latitude, longitude
  2. GPS Devices:
    • Most GPS devices provide latitude and longitude
    • Ensure they’re in decimal format (not degrees/minutes/seconds)
  3. Geolocation API:

Coordinate Format Examples

Location Display in WhatsApp

When you send a location message:
  1. Recipients see a map preview with a pin
  2. The location name appears as a title
  3. The address appears as a subtitle
  4. Tapping the message opens the location in their default maps app
  5. Recipients can get directions to the location
All four parameters (latitude, longitude, name, and address) are required. If any are missing, the API will return a 400 Bad Request error.

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.