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

# API Reference Introduction

> MailDiver Email Service APIs

MailDiver email service APIs allow you to send transactional emails, manage domains, and handle audience and contacts programmatically.

The APIs for the managed and self-hosted versions are the same. The only difference is the base URL, which is where you use your own domain for the self-hosted version.

## Getting Started

To start using the email service APIs:

1. Create an API key from the dashboard
2. Use your API key in the Authorization header for all requests:

```
Authorization: Bearer <your-api-key>
```

## Base URL

All API endpoints are prefixed with `api.` subdomain:

<Tabs>
  <Tab title="Managed">
    The base URL is `https://api.maildiver.com`
  </Tab>

  <Tab title="Self-Hosted">
    The base URL is `https://api.<your-domain>`
  </Tab>
</Tabs>

## API Versioning

The current version of the API is `v1`. All endpoints are prefixed with `/v1/`:

```
https://api.maildiver.com/v1/emails
```

## Error Handling

The API uses standard HTTP status codes and returns error messages in a consistent format:

```json theme={null}
{
  "message": "Error description",
  "code": "error_code" // Only included for authentication errors
}
```

Common status codes:

* `200`: Success
* `201`: Created
* `204`: No Content
* `400`: Bad Request
* `403`: Forbidden
* `404`: Not Found
* `429`: Too Many Requests

## Support

Need help? We're here for you:

* Email: [support@maildiver.com](mailto:support@maildiver.com)
* Documentation: [docs.maildiver.com](https://maildiver.com/docs)
* Help: [maildiver.com/help](https://maildiver.com/help)
