# Enviar localização

`POST /send/location`

Pasta: **Enviar Mensagem**

## Autenticação

```http
token: {{token}}
```

## Descrição

# Enviar localização

Envia um pin de localização geográfica (latitude/longitude) com nome e endereço opcionais.

## Endpoint

```http
POST {{baseUrl}}/send/location
```

## Autenticação

Envie o token da instância no header:

```http
token: {{token}}
```

## Corpo da requisição

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| number | string | Sim* | Destinatário |
| chatid | string | Sim* | Alternativa a number |
| latitude | number | Sim | Latitude (ex.: -23.5505) |
| longitude | number | Sim | Longitude (ex.: -46.6333) |
| name | string | Não | Nome do local |
| address | string | Não | Endereço textual |

## Exemplo de Requisição

```bash
curl -X POST "{{baseUrl}}/send/location" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{"number": "{{remoteJid}}", "latitude": -23.5505, "longitude": -46.6333, "name": "Av. Paulista", "address": "Av. Paulista, São Paulo - SP"}'
```

## Resposta de Sucesso

```json
{
  "success": true,
  "message": {
    "id": "3EB0A1B2C3D4E5F6",
    "timestamp": "2026-07-17T12:34:56Z",
    "sender": "5511888888888@s.whatsapp.net"
  }
}
```

## Erros comuns

- Coordenadas inválidas
- Destinatário ausente
- Instância desconectada

## Corpo (exemplo)

```json
{
  "number": "{{remoteJid}}",
  "latitude": -23.5505,
  "longitude": -46.6333,
  "name": "Av. Paulista",
  "address": "Av. Paulista, São Paulo - SP"
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/send/location" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "number": "{{remoteJid}}",
  "latitude": -23.5505,
  "longitude": -46.6333,
  "name": "Av. Paulista",
  "address": "Av. Paulista, São Paulo - SP"
}'
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=enviar-mensagem/enviar-localizacao)
