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

# API Reference

The Happy Uptime REST API lets you manage monitors, incidents, status pages, alerts, and analytics. All endpoints return JSON.

# API Reference

The Happy Uptime REST API lets you programmatically manage monitors, incidents, status pages, alerts, and analytics. All endpoints return JSON.

## Quick start

**Create an API key**

Go to **Dashboard → Settings → API Keys** and create a key. Full keys are only shown once — copy it immediately.
  **Set the authorization header**

Send `Authorization: Bearer hu_xxx` on every request.
  **Call the API**

All endpoints live under `https://happyuptime.com/api/v1`.

```bash cURL
curl -H "Authorization: Bearer hu_yourkey..." \
  https://happyuptime.com/api/v1/monitors
```

```javascript JavaScript
const res = await fetch("https://happyuptime.com/api/v1/monitors", {
  headers: { Authorization: "Bearer hu_yourkey..." }
});
const { data, meta } = await res.json();
console.log(`${meta.total} monitors found`);
```

```python Python
import requests

res = requests.get(
    "https://happyuptime.com/api/v1/monitors",
    headers={"Authorization": "Bearer hu_yourkey..."}
)
data = res.json()["data"]
```

## Base URL

```
https://happyuptime.com/api/v1
```

All paths in this reference are relative to the base URL. For example, `/monitors` means `https://happyuptime.com/api/v1/monitors`.

## Response format

All responses wrap data in a `data` key. Paginated endpoints also include a `meta` object.

```json Single resource
{
  "data": {
    "id": "abc123",
    "name": "My API",
    "status": "up"
  }
}
```

```json Paginated list
{
  "data": [ ... ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 42,
    "total_pages": 2
  }
}
```

Pagination defaults: `page=1`, `per_page=25`. Maximum `per_page` is `100` on all list endpoints.