Skip to Content
Type of MessagesLocation request

Location request

Sends a WhatsApp location request message to a recipient.

A location request prompts the user to share their current location in WhatsApp with one tap. This is useful when you need a delivery address, on-site support location, or to route someone to the nearest store.

Common use cases:

  • Delivery / courier drop-off location
  • Field service and on-site appointments
  • Event check-in or venue guidance
  • Finding the nearest store or pickup point
  • Support cases where location matters (e.g. “I’m stuck here”)
WhatsApp location request example

URL

https://api.messagesmart.nl/api/v1/whatsapp/messages/location-request

Headers

See Authentication.


Request body

FieldTypeRequiredNotes
whatsAppBusinessPhoneNumberIdstringYesThe WhatsApp Business phone number ID sending the message
tostringYesRecipient phone number in E.164 format
bodystringNoOptional text shown above the location request

Note The exact request payload sent to WhatsApp is handled by MessageSmart. You typically only need to provide the recipient and the sending phone number ID.


Examples

{ "whatsAppBusinessPhoneNumberId": "399750423212934", "to": "+31612345678", "body": "Could you share your current location so we can help you faster?" }

Response

Success (200 OK)

{ "success": true, "data": { "messaging_product": "whatsapp", "contacts": [ { "input": "+31612345678", "wa_id": "31612345678" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA" } ] } }

Notes

  • The returned data.messages[0].id is the WhatsApp message ID.
  • The user’s shared location is delivered as a separate inbound WhatsApp message (it is not returned by this endpoint).

Validation error (400 Bad Request)

{ "success": false, "error": { "code": "validation_error", "message": "WhatsAppBusinessPhoneNumberId is required", "httpStatus": 400, "details": null } }

Common causes:

  • Missing whatsAppBusinessPhoneNumberId
  • Missing to

Provider error (502 Bad Gateway)

{ "success": false, "error": { "code": "WHATSAPP_SEND_FAILED", "message": "Failed to send WhatsApp location request message.", "httpStatus": 502, "details": { "provider": "meta", "raw": {} } } }

This error indicates that WhatsApp (Meta) rejected or failed to process the request.

Last updated on