---
title: "Reorder components"
method: PUT
path: "/status-pages/{statusPage}/components/order"
tags: ["Status page components"]
---

# Reorder components

`PUT /status-pages/{statusPage}/components/order`

## Request

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

Saves the order and the groups of all the page's components in one atomic change. The list
must hold every component of the page exactly once (`422` otherwise), up to 1000. A
component's index in the list becomes its `position`. The call is idempotent.

The page builds its sections from this order. A named group shows once, where its first
component falls. Components with `group: null` that follow each other show as one section
without a heading, so a named group between them makes two sections.

## Path parameters

- `statusPage` string, uuid, required

## Request body

- ReorderStatusPageComponents: A new order for all the components of a status page.
  - `components` StatusPageComponentOrderItem[], required: Every component of the page exactly once, in the new order
    - `id` string, uuid, required: Component ID
    - `group` string, nullable, required: Group to show the component in; `null` for no group

## Response `204`

No content

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