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

# API Reference

> Build with the Dugble API for email and SMS.

The Dugble API lets you send, schedule, inspect, update, and cancel email and SMS messages from your applications.

## Base URL

```text theme={null}
https://api.dugble.com
```

## Authentication

Authenticate API requests with a Dugble team token using Bearer authentication.

```http theme={null}
Authorization: Bearer dgb_team_...
```

See [Authentication](/docs/api-reference/authentication) for token behavior and permissions.

## Request format

Send JSON payloads with:

```http theme={null}
Content-Type: application/json
Accept: application/json
```

Mutation requests can include an `Idempotency-Key` header so retries do not create duplicate operations.

```http theme={null}
Idempotency-Key: welcome-user-42
```

See [Idempotency](/docs/api-reference/idempotency) for details.

## Response envelope

Successful JSON responses use the standard Dugble envelope:

```json theme={null}
{
  "success": true,
  "data": {}
}
```

Errors use:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "Public error message"
  }
}
```

See [Errors](/docs/api-reference/errors) for the public error codes returned by the API.

## API sections

The current public reference covers:

* **Email** — send, batch send, list, retrieve, reschedule, and cancel messages.
* **SMS** — send, batch send, list, retrieve, reschedule, cancel, and synchronize message status.

The endpoint pages in this section are generated from Dugble's OpenAPI specification.
