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

# Introduction

> Understand general concepts, response codes, and authentication strategies.

## Base URL

The Unosend API is built on **REST** principles. We enforce **HTTPS** in every request to improve data security, integrity, and privacy. The API does not support **HTTP**.

All requests contain the following base URL:

```
https://api.unosend.co
```

## Authentication

To authenticate you need to add an `Authorization` header with the contents of the header being `Bearer un_xxxxxxxxxx` where `un_xxxxxxxxxx` is your **API Key**.

```
Authorization: Bearer un_xxxxxxxxxx
```

<Warning>
  Keep your API key secure and never expose it in client-side code.
</Warning>

## Response codes

Unosend uses standard HTTP codes to indicate the success or failure of your requests.

In general, `2xx` HTTP codes correspond to success, `4xx` codes are for user-related failures, and `5xx` codes are for infrastructure issues.

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| `200`  | Successful request.                                   |
| `400`  | Check that the parameters were correct.               |
| `401`  | The API key used was missing or invalid.              |
| `403`  | The API key doesn't have permissions for the request. |
| `404`  | The requested resource was not found.                 |
| `422`  | Unprocessable entity. Check the request body.         |
| `429`  | The rate limit was exceeded.                          |
| `500`  | Internal server error.                                |

## Rate limit

The API has a rate limit of **100 requests per second**. If you exceed this limit, you'll receive a `429` response.

Rate limit headers are included in all responses:

| Header                  | Description                           |
| ----------------------- | ------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests per window           |
| `X-RateLimit-Remaining` | Requests remaining in current window  |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets |

## Pagination

List endpoints support pagination using `limit` and `offset` query parameters:

```bash theme={null}
GET /emails?limit=20&offset=40
```

| Parameter | Type    | Default | Description                        |
| --------- | ------- | ------- | ---------------------------------- |
| `limit`   | integer | 20      | Number of items per page (max 100) |
| `offset`  | integer | 0       | Number of items to skip            |

## FAQ

<AccordionGroup>
  <Accordion title="What's the difference between un_ and re_ API keys?">
    Unosend API keys start with `un_` prefix for easy identification.
  </Accordion>

  <Accordion title="Can I use the API from the browser?">
    No, API requests should only be made from your server to keep your API key secure. Never expose your API key in client-side code.
  </Accordion>

  <Accordion title="What's the maximum email size?">
    The maximum total email size (headers + body + inline images + attachments) is 15 MB.
  </Accordion>
</AccordionGroup>
