> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Location Message

> Share a pinned location with coordinates and optional location details.

Send a WhatsApp message containing a pinned location, with latitude and longitude and optional name and address.

## Endpoint

```http id="p4w8vn" theme={null}
POST /api/whatsapp/{Sender Hash}/messages
```

**Sandbox base URL:** `https://testqa.cpaas.globeteleservices.com`

## Headers

```http id="x3mk2q" theme={null}
Accept: application/json
Content-Type: application/json
Authorization: Bearer <token>
```

Generate the Bearer token from the **API** tab in the CPaaS+ Portal. Replace `{Sender Hash}` with the registered sender hash available under **Numbers** in the WhatsApp channel.

Pass the recipient's WhatsApp number in international format without the leading `+` sign.

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `messaging_product` | Yes | Fixed value: `"whatsapp"`. |
| `to` | Yes | Recipient's WhatsApp number without a leading `+` sign. |
| `type` | Yes | Fixed value: `"location"`. |
| `location.latitude` | Yes | Latitude coordinate in decimal format. |
| `location.longitude` | Yes | Longitude coordinate in decimal format. |
| `location.name` | Optional | Name or label displayed with the location. |
| `location.address` | Optional | Address displayed with the location. |

## Request Example

```json id="b1jx9a" theme={null}
{
  "messaging_product": "whatsapp",
  "to": "919373084880",
  "type": "location",
  "location": {
    "latitude": 19.076090,
    "longitude": 72.877426,
    "name": "Mumbai",
    "address": "Maharashtra, Mumbai"
  }
}
```

Replace the example recipient number and location details with the values for your integration.

## Responses and Errors

Refer to [Common HTTP Status Codes](/docs/status-codes.md) for status code meanings and possible causes.

A successful response indicates that the request was accepted for processing; it does not guarantee delivery to the recipient.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.