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

# GET List instances

> List all active WhatsApp instances for your account.

## Endpoint

```txt theme={null}
GET /api/v1/instances
```

## Authentication

`x-api-key: <api_key>`

## Parameters

No path, query, or body parameters.

## Request example

```bash theme={null}
curl https://srv.msgflash.com/api/v1/instances \
  -H "x-api-key: msgf_live_your_api_key_here"
```

## Success response `200`

```json theme={null}
{
  "data": [
    {
      "id": "inst_uuid",
      "name": "boutique-principale",
      "waNumber": "+33612345678",
      "status": "connected",
      "webhook": null,
      "meta": null,
      "deletedAt": null,
      "createdAt": "2026-04-01T09:00:00.000Z",
      "updatedAt": "2026-04-01T09:10:00.000Z"
    }
  ]
}
```

## How to get the correct `instanceId`

For all MsgFlash sending endpoints, you must provide `instanceId`.

Field differences:

| Field      | Usage                                                    |
| ---------- | -------------------------------------------------------- |
| `id`       | Technical identifier to send as `instanceId` in the API  |
| `name`     | Human-readable name for UI usage                         |
| `waNumber` | Connected WhatsApp number, useful for display and checks |

Recommended flow:

1. Call `GET /api/v1/instances`.
2. Choose an instance with `status = "connected"`.
3. Copy `data[n].id`.
4. Use this value as `instanceId` in:
   * `POST /api/v1/messages/send`
   * `POST /api/v1/messages/schedule`
   * `POST /api/v1/campaigns`

## Common errors

| HTTP  | Code                      | When                         |
| ----- | ------------------------- | ---------------------------- |
| `401` | `UNAUTHORIZED`            | API key missing or invalid   |
| `429` | `API_RATE_LIMIT_EXCEEDED` | Too many requests per second |
