> ## 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.

# Quickstart

> Send your first WhatsApp message in under 5 minutes.

# Quickstart

This guide walks you through creating an instance, connecting it, and sending your first message.

## Prerequisites

* A Wappfy account ([sign up](https://app.wappfy.io/register))
* A WhatsApp number to connect
* An API key or Supabase JWT token

## Step 1: Get your API key

```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>
  Save the returned `key` value — it is only shown once.
</Warning>

## Step 2: Create an 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"
  }'
```

Save the returned `id` — you'll use it in all subsequent requests.

## Step 3: Connect via QR code

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

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

Open WhatsApp on your phone, go to **Linked Devices**, and scan the QR code returned in the `qr` field (base64 image).

## Step 4: Send a message

Once the instance status is `connected`, you can send your first message:

<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>

## Response

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

## Next steps

<CardGroup cols={2}>
  <Card title="Send all message types" icon="paper-plane" href="/guides/sending-messages">
    Images, videos, polls, contacts, and more
  </Card>

  <Card title="Set up webhooks" icon="webhook" href="/guides/webhooks">
    Receive incoming messages and delivery status
  </Card>
</CardGroup>
