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

# Send Location

> Send a location message via WhatsApp

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your API key for authentication
</ParamField>

## Request Body

<ParamField body="messageTo" type="string" required>
  Recipient phone number
</ParamField>

<ParamField body="location" type="object" required>
  Location details object

  <Expandable title="properties">
    <ParamField body="latitude" type="number" required>
      Latitude coordinate
    </ParamField>

    <ParamField body="longitude" type="number" required>
      Longitude coordinate
    </ParamField>

    <ParamField body="name" type="string">
      Location name (optional)
    </ParamField>

    <ParamField body="address" type="string">
      Location address (optional)
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://backend.conversales.in/api/v1/sendLocation" \
    -H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
    -H "Content-Type: application/json" \
    -d '{
      "messageTo": "1234567890",
      "location": {
        "latitude": 37.7749,
        "longitude": -122.4194,
        "name": "San Francisco",
        "address": "San Francisco, CA, USA"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://backend.conversales.in/api/v1/sendLocation",
    {
      method: "POST",
      headers: {
        "X-API-Key": "3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        messageTo: "1234567890",
        location: {
          latitude: 37.7749,
          longitude: -122.4194,
          name: "San Francisco",
          address: "San Francisco, CA, USA",
        },
      }),
    }
  );
  ```

  ```python Python theme={null}
  import requests

  url = "https://backend.conversales.in/api/v1/sendLocation"
  headers = {"X-API-Key": "3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI"}
  payload = {
      "messageTo": "1234567890",
      "location": {
          "latitude": 37.7749,
          "longitude": -122.4194,
          "name": "San Francisco",
          "address": "San Francisco, CA, USA"
      }
  }

  response = requests.post(url, json=payload, headers=headers)
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "statusCode": 200,
    "message": "Location sent successfully",
    "data": {
      "messageId": "wamid.HBgNMTIzNDU2Nzg5MA==",
      "status": "sent",
      "to": "1234567890"
    }
  }
  ```
</ResponseExample>
