Skip to content

Preview a status page

POST
/api/v1/status-pages/{pageId}/previews
curl --request POST \
--url https://app.monitorly.cloud/api/v1/status-pages/PAGE_ID/previews \
--header 'Content-Type: application/json' \
--cookie __Host-monitorly_session=<__Host-monitorly_session> \
--data '{ "accentColor": "example", "components": [ { "checkId": "CHECK_ID", "group": "example", "name": "example" } ], "theme": { "dark": { "background": "example", "border": "example", "muted": "example", "surface": "example", "text": "example" }, "font": "system", "layout": "list", "light": { "background": "example", "border": "example", "muted": "example", "surface": "example", "text": "example" }, "links": [ { "label": "example", "url": "example" } ], "mode": "auto", "radius": "none" }, "title": "example", "websiteUrl": "example" }'

A link to the page as it would look with unsaved edits, valid for 10 minutes. Nothing changes. The edits are checked by the same rules as saving them. Needs the editor role.

pageId
required
string format: uuid

The status page’s id.

Example

PAGE_ID
Media typeapplication/json

The page as it is being edited. A field left out is the stored one.

object
accentColor

As in PATCH /status-pages/{pageId} (contrast with white text at least 4.5:1); null is the product accent.

string | null
components

As in PUT /status-pages/{pageId}/components, in display order.

Array<object> | null
object
checkId
required
string format: uuid

Example

CHECK_ID
group

Group heading, 1–100 characters; missing or blank: ungrouped.

string | null
name

1–200 characters. Absent, null or the check’s own name: the component follows the check’s name.

string | null
theme
One of:

As in PATCH /status-pages/{pageId} (the whole theme); null is the product’s own look.

object
dark
One of:

The colours of the dark scheme; the product’s own when left out.

object
background
required

Behind the page.

string
border
required

Lines between rows and around panels.

string
muted
required

Secondary text and field edges: at least 3:1 on background and on surface.

string
surface
required

Panels, cards and the header.

string
text
required

Text: at least 4.5:1 on background and on surface.

string
font
One of:

The page’s text face. Every one but system is served by status-web itself (OFL fonts, no third-party requests); system uses the visitor’s own interface font.

string
Allowed values: system inter ibm-plex-sans geist jetbrains-mono space-grotesk source-serif
layout
One of:

list when left out.

string
Allowed values: list compact
light
One of:

The colours of the light scheme; the product’s own when left out.

object
background
required

Behind the page.

string
border
required

Lines between rows and around panels.

string
muted
required

Secondary text and field edges: at least 3:1 on background and on surface.

string
surface
required

Panels, cards and the header.

string
text
required

Text: at least 4.5:1 on background and on surface.

string
links

Up to 5 links in the page header, in this order.

Array<object>

A link in the page header, between the page name and the website link.

object
label
required

1–32 characters on one line.

string
url
required

An absolute http or https URL with a host, at most 2048 characters.

string
mode
One of:

auto when left out.

string
Allowed values: auto light dark
radius
One of:

medium when left out.

string
Allowed values: none small medium large
title
string | null
websiteUrl

As in PATCH /status-pages/{pageId}; null shows the page without the link.

string | null

The preview’s address and when it expires.

Media typeapplication/json
object
expiresAt
required
string
url
required

<MONITORLY_STATUS_PUBLIC_URL>/_preview/<token>: the page as edited, for an iframe of the dashboard.

string

Example generated

{
"expiresAt": "example",
"url": "example"
}

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.not_allowed: this operation needs a signed-in session; tokens cannot call it
  • request.origin_mismatch, request.header_required: a changing request with a session comes from another site or lacks X-Monitorly-Request: 1
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Not Found.

  • request.not_found: it does not exist, or you cannot see it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Payload Too Large.

  • request.too_large: the body is larger than 256 KiB
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.required, field.too_long, field.invalid: a field breaks a rule; errors points at it
  • status_page.check_not_in_project: component check is not from the page’s project
  • status_page.accent_contrast_low: contrast of white text on the accent color is less than 4.5:1 (params.ratio)
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Too Many Requests.

  • session.rate_limited: more than 5 changes a second from your sessions
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.

Service Unavailable.

  • server.unavailable: temporarily unavailable; retry later
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}