---
title: "Update a component"
method: PATCH
path: "/status-pages/{statusPage}/components/{component}"
tags: ["Status page components"]
---

# Update a component

`PATCH /status-pages/{statusPage}/components/{component}`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/status-pages/{statusPage}/components/{component}`
- Auth: HTTP bearer

Changes only the fields you send. Its status can't be set: post an incident or schedule
maintenance instead. `monitor_id: null` unlinks the monitor. If you change `group` without
a `position`, the component goes last in its new section, as when you add a component.

## Path parameters

- `statusPage` string, uuid, required
- `component` string, uuid, required

## Request body

- UpdateStatusPageComponent: Changes to a component; fields left out keep their value. Its status follows incidents and maintenance and can't be set.
  - `name` string: Name shown on the page
  - `description` string, nullable: Text shown with the name; `null` for none
  - `group` string, nullable: Group to show the component in; `null` for no group
  - `position` integer: Order on the whole page, lowest first, from 0 to 32767. New components go last in their section when left out
  - `monitor_id` string, uuid, nullable: A monitor of the team whose uptime history and response times the component shows, and whose downtime opens an incident when monitor automation is on; `null` for none
  - `show_latency_chart` boolean: Show the monitor's response time chart under the component

## Response `200`

The updated component.

- StatusPageComponent: A component of a status page: a part of your service visitors see the status of, optionally following a monitor.
  - `id` string, uuid, required: Component ID
  - `name` string, required: Name shown on the page
  - `description` string, nullable, required: Text shown with the name; `null` for none
  - `group` string, nullable, required: Group the component is shown in; `null` for no group
  - `position` integer, required: Order on the whole page, lowest first. A named group shows once, where its first component falls
  - `status` 'operational' | 'degraded_performance' | 'partial_outage' | 'major_outage' | 'under_maintenance', required: A status page component's status, derived from incidents and maintenance. | | |---| | `operational` <br/> Working normally. | | `degraded_performance` <br/> Slower or less reliable than usual. | | `partial_outage` <br/> Down for some visitors or some functions. | | `major_outage` <br/> Down. | | `under_maintenance` <br/> In planned maintenance. |
  - `monitor` MonitorReference, required: A monitor something follows.
    - `id` string, uuid, required: Monitor ID
    - `label` string, required: Monitor name
  - `show_latency_chart` boolean, required: Whether the page shows the monitor's response time chart under the component
  - `created_at` string, date-time, required: When the component was created

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `404`: `RESOURCE_NOT_FOUND`: there is no such resource in this team.
- `422`: `VALIDATION_FAILED`: the request is invalid; `details.errors` lists the fields.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
