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

# Introduction

> Base URL, authentication, errors and limits of the D-API REST API.

The D-API REST API lets you send messages, manage WhatsApp sessions,
groups, contacts, media and much more. This reference is generated from the
official OpenAPI specification and kept in sync with the production API.

## Base URL

All endpoints use the base URL:

```
https://api.d-api.cloud
```

## Authentication

The API uses **API Key** authentication sent in the `Authorization` header. Generate
your key in the [Dashboard](https://app.d-api.cloud).

```bash theme={null}
curl https://api.d-api.cloud/api/v1/sessions \
  -H "Authorization: YOUR_API_KEY"
```

> [!WARNING]
>
> Never expose your API Key in the front end or in public repositories. Treat it
> like a password.

## Error format

Error responses follow a consistent JSON envelope, with the HTTP status
indicating the category (`4xx` for client errors, `5xx` for server
errors).

```json theme={null}
{
  "success": false,
  "error": "Mensagem descritiva do erro",
  "statusCode": 400
}
```

## Identifiers

Most operations require a `sessionId` — the identifier of your WhatsApp
session. Recipients (`to`) use the number in international format without `+`
(e.g. `5511999999999`).

## Limits

The API is highly available (99.9% uptime) with latency under 30ms.
Usage limits per plan are available at the
`GET /api/v1/limits/{sessionId}` endpoint and in the [Dashboard](https://app.d-api.cloud).

## Next steps

> [card] [Quickstart](https://docs.d-api.cloud/en/api-reference/quickstart.md)
>
> From zero to your first message in a few minutes.

> [card] [Connect via QR](https://docs.d-api.cloud/en/api-reference/endpoints/conectar-qr.md)
>
> Connect a session by scanning the QR code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.