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

# Panduan Cepat

> Kirim pesan WhatsApp pertama Anda dalam waktu kurang dari 5 menit.

# Panduan Cepat

Panduan ini memandu Anda membuat instance, menghubungkannya, dan mengirim pesan pertama Anda.

## Prasyarat

* Akun Wappfy ([daftar](https://app.wappfy.io/register))
* Nomor WhatsApp untuk dihubungkan
* API key atau token JWT Supabase

## Langkah 1: Dapatkan API key Anda

```bash theme={null}
curl -X POST https://api.wappfy.io/api/api-keys \
  -H "Authorization: Bearer YOUR_SUPABASE_JWT" \
  -H "Content-Type: application/json" \
  -d '{ "name": "My First Key" }'
```

<Warning>
  Simpan nilai `key` yang dikembalikan — nilai ini hanya ditampilkan sekali.
</Warning>

## Langkah 2: Buat instance

```bash theme={null}
curl -X POST https://api.wappfy.io/api/instances \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production WhatsApp",
    "instance_type": "waha"
  }'
```

Simpan `id` yang dikembalikan — Anda akan menggunakannya di semua permintaan selanjutnya.

## Langkah 3: Hubungkan melalui kode QR

```bash theme={null}
# Mulai koneksi
curl -X POST https://api.wappfy.io/api/instances/INSTANCE_ID/connect \
  -H "X-Api-Key: YOUR_API_KEY"

# Dapatkan kode QR
curl https://api.wappfy.io/api/instances/INSTANCE_ID/qr \
  -H "X-Api-Key: YOUR_API_KEY"
```

Buka WhatsApp di ponsel Anda, buka **Perangkat Tertaut**, dan pindai kode QR yang ada di field `qr` (gambar base64).

## Langkah 4: Kirim pesan

Setelah status instance menjadi `connected`, Anda dapat mengirim pesan pertama:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.wappfy.io/api/instances/INSTANCE_ID/messages/send \
    -H "X-Api-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "5511999999999",
      "type": "text",
      "body": "Hello from Wappfy!"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    `https://api.wappfy.io/api/instances/${instanceId}/messages/send`,
    {
      method: 'POST',
      headers: {
        'X-Api-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        to: '5511999999999',
        type: 'text',
        body: 'Hello from Wappfy!',
      }),
    }
  );
  const data = await response.json();
  console.log(data.data.jobId);
  ```

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

  response = requests.post(
      f"https://api.wappfy.io/api/instances/{instance_id}/messages/send",
      headers={"X-Api-Key": "YOUR_API_KEY"},
      json={
          "to": "5511999999999",
          "type": "text",
          "body": "Hello from Wappfy!",
      },
  )
  print(response.json()["data"]["jobId"])
  ```
</CodeGroup>

## Respons

```json theme={null}
{
  "success": true,
  "data": {
    "message": "Message queued for delivery",
    "jobId": "12345"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2026-02-10T12:00:00.000Z"
  }
}
```

## Langkah selanjutnya

<CardGroup cols={2}>
  <Card title="Kirim semua jenis pesan" icon="paper-plane" href="/id/guides/sending-messages">
    Gambar, video, polling, kontak, dan lainnya
  </Card>

  <Card title="Atur webhook" icon="webhook" href="/id/guides/webhooks">
    Terima pesan masuk dan status pengiriman
  </Card>
</CardGroup>
