Skip to content

Send a location message

Sends a map pin the recipient can open in their maps app. Needs an open 24-hour window.

Terminal window
curl -X POST "$HELLO_API_URL/v1/<your-phone-number-id>/messages" \
-H "Authorization: Bearer $HELLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919999999999",
"type": "location",
"location": {
"latitude": 12.9716,
"longitude": 77.5946,
"name": "Indiranagar store",
"address": "100 Feet Rd, Indiranagar, Bengaluru 560038"
}
}'

202 Accepted (queued), or 200 with ?sync=true once WhatsApp accepts it. See Send a message.

Field Type Required Description
location.latitude number Yes Latitude in decimal degrees
location.longitude number Yes Longitude in decimal degrees
location.name string No Place name shown above the address
location.address string No Address shown under the name

In a location message latitude and longitude are numbers. In a template’s location header they are strings.

To ask the customer to share their location instead, use an interactive location request.

Status code Cause
403 OUTSIDE_24H_WINDOW The recipient’s 24-hour window is closed
400 VALIDATION_ERROR location is missing or the wrong shape
422 SEND_FAILED (?sync=true only) WhatsApp rejected the send