Skip to content

Request user location

Ask a customer to share their location.

Ask the customer to share their live location — useful for delivery routing, dispatch, or field service scheduling.

At a glance

Item Detail
type location_request
Channel support Official and unofficial
Body content.body or content.text

Request body

Field Required Description
channel_id Yes Sender channel ID
to Yes Recipient phone number
type Yes location_request
content.body Yes Prompt text shown to the user

Example

curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "location_request",
    "content": {
      "body": "Boleh share lokasi kamu sekarang?"
    }
  }'
import { WazapinClient } from "@wazapin/sdk";

const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });

await wazapin.messages.send({
  channel_id: "wzp_abc123",
  to: "6281234567890",
  type: "location_request",
  content: { body: "Boleh share lokasi kamu sekarang?" },
});
import requests

requests.post(
    "https://api.wazapin.com/v1/messages",
    headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
        "channel_id": "wzp_abc123",
        "to": "6281234567890",
        "type": "location_request",
        "content": {"body": "Boleh share lokasi kamu sekarang?"},
    },
    timeout=30,
).raise_for_status()

Endpoint

POST https://api.wazapin.com/v1/messages

Authenticate with X-Api-Key. See Authentication.

Response

On success, the API returns 201 Created with a message record (status often starts as queued).

{
  "data": {
    "id": "9f1fd66d-c37a-4b50-a8c2-b4dca523f9c8",
    "channel_id": "wzp_abc123",
    "to_phone": "6281234567890",
    "type": "text",
    "status": "queued",
    "created_at": "2026-03-04T06:20:10Z",
    "updated_at": "2026-03-04T06:20:10Z"
  }
}

Track delivery with Webhooks or GET /v1/messages/{messageID}.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close