POST
/
messages
/
interactive
/
location-request

Sends a message asking the user to share their current location. When the user taps the button, a location sharing screen appears. This is supported on WhatsApp only.

Authentication: Requires a valid API key or session. Pass as Authorization: Bearer <api_key>.

Request Body

Required Parameters

  • agentId: The ID of the agent.
  • conversationId: The ID of the conversation.
  • body_text: Text explaining why the location is needed (max 1024 chars). Supports URLs.

Example

{
  "agentId": "agent-123",
  "conversationId": "conv-456",
  "body_text": "Please share your location so we can find the nearest store."
}

Error Responses

HTTP StatusMeaning
400Invalid request body
401Invalid or missing API key
403Agent does not belong to your organization
404Conversation or agent not found
500WhatsApp API error

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
agentId
string
required

The ID of the agent.

conversationId
string
required

The ID of the conversation.

body_text
string
required

Text explaining why the location is needed.