> ## 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.

# Create page

` POST /status-pages `

Create page

## Servers

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

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` bearerAuth `: ` http `

  - HTTP scheme: ` bearer ` (hu_api_key)

  - API key with `hu_` prefix. Send exactly `Authorization: Bearer hu_...`. `X-API-Key` is not supported. Create keys in Dashboard → Settings → API Keys.

## Request body (required)

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` name `, ` slug `, ` template `, ` brand_color `

  - ` name `: type ` string `

    - minLength: ` 1 `

    - maxLength: ` 100 `

  - ` slug `: type ` string `

    - minLength: ` 1 `

    - maxLength: ` 50 `

    - pattern: ` "^[a-z0-9-]+$" `

  - ` template `: type ` string `

    - enum: ` ["minimal","brand","terminal","modern","clean","developer"] `

    - default: ` "minimal" `

  - ` brand_color `: type ` string `

    - default: ` "#2563eb" `

    - pattern: ` "^#[0-9a-fA-F]{6}$" `

## Responses

### ` 201 ` — Status page created

### ` 409 ` — Slug conflict

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` code `, ` message `, ` status `

    - ` code `: type ` string `

      - example: ` "not_found" `

    - ` message `: type ` string `

      - example: ` "Monitor not found" `

    - ` status `: type ` integer `

      - example: ` 404 `

## Request examples

### cURL

```curl
curl -X POST 'https://happyuptime.com/api/v1/status-pages' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "slug": "string",
  "template": "minimal",
  "brand_color": "#2563eb"
}'
```

### JavaScript

```javascript
const response = await fetch('https://happyuptime.com/api/v1/status-pages', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "string",
    "slug": "string",
    "template": "minimal",
    "brand_color": "#2563eb"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://happyuptime.com/api/v1/status-pages', headers=headers, json={
  "name": "string",
  "slug": "string",
  "template": "minimal",
  "brand_color": "#2563eb"
})
print(response.json())
```