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

# Quickstart API

> Gunakan API Wator untuk membaca device dan mengirim pesan WhatsApp.

API Wator memakai header `X-API-Key`.

<Note>
  Coba request langsung di [API Playground](https://api.wator.id/v1/docs).
</Note>

## Base URL

Gunakan base URL API publik Wator.

```text theme={null}
https://api.wator.id/v1
```

Jika Anda memakai environment khusus, gunakan base URL yang diberikan oleh tim Wator.

## Buat API key

1. Buka dashboard.
2. Masuk ke **Developer -> API Keys**.
3. Klik buat API key.
4. Pilih izin yang dibutuhkan.
5. Simpan raw key di tempat aman.

## Cek device

```bash theme={null}
curl -X GET "https://api.wator.id/v1/devices" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Kirim pesan text

```bash theme={null}
curl -X POST "https://api.wator.id/v1/devices/123/messages" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "628123456789@s.whatsapp.net",
    "text": "Halo dari Wator API",
    "priority": "normal"
  }'
```

Response sukses memakai status `202 Accepted`. Status `pending` berarti pesan diterima Wator dan sedang diproses.

## Referensi API

Referensi API interaktif tersedia di [API Playground](https://api.wator.id/v1/docs).
