# Status pages

> Status pages endpoints of the StatusTick REST API: list status pages, create a status page, get a status page, change a status page's settings.

## List status pages

`GET /v1/status-pages`

Each page with its groups and components; use the component `id` to set its status.

## Create a status page

`POST /v1/status-pages`

Needs a `READ_WRITE` key from an owner or admin. The page starts without components; set them with `PUT /v1/status-pages/{pageId}/layout`.

## Get a status page

`GET /v1/status-pages/{pageId}`

The published page; unpublished changes made in the editor are in `draft`.

## Change a status page's settings

`PATCH /v1/status-pages/{pageId}`

Needs a `READ_WRITE` key from an owner or admin. Applies at once. Leave out the fields you do not change.

## Delete a status page

`DELETE /v1/status-pages/{pageId}`

Needs a `READ_WRITE` key from an owner or admin.

## Set a status page's groups and components

`PUT /v1/status-pages/{pageId}/layout`

Needs a `READ_WRITE` key from an owner or admin. Replaces every group and component of the published page at once. Keep a component's `id` to keep its status history; a component without an `id` is new, and one left out is removed. A component shows at most 20 monitors.

## Get a page's views and unique visitors

`GET /v1/status-pages/{pageId}/views`

Views counted from the page's beacon, on its StatusTick address and its custom domain; bots are left out. A visitor counts once per page per UTC day, without cookies and without their IP being kept. Hourly points count a visitor in the hour of their first view that day.

## List the status of every component

`GET /v1/status-pages/{pageId}/component-statuses`

## Set the status of a component

`PUT /v1/status-pages/{pageId}/components/{componentId}/status`

Needs a `READ_WRITE` key. Only for components without monitors; a component with monitors answers `422` (`status_page.component.monitored.unprocessable`). The message is shown under the component on the public page; an empty message clears it.

## List a component's status changes

`GET /v1/status-pages/{pageId}/components/{componentId}/status-changes`

## Show a monitor on components

`PUT /v1/status-pages/monitors/{monitorId}/components`

Needs a `READ_WRITE` key. The monitor shows on exactly these components (ids from `GET /v1/status-pages`) and is taken off every other component of your pages; an empty list takes it off all of them. Applies at once, outside any unpublished draft of a page.
