> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodostatus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Status Page

> Update status page configuration, branding, or visibility

## Path Parameters

<ParamField path="id" type="string" required>
  The status page ID
</ParamField>

## Body Parameters

All fields are optional. Only include the fields you want to change.

### General

<ParamField body="name" type="string">
  Display name
</ParamField>

<ParamField body="slug" type="string">
  URL slug (must be unique)
</ParamField>

<ParamField body="tagline" type="string">
  Subtitle shown below the page name
</ParamField>

<ParamField body="status_page_language" type="string">
  Language code (e.g. `en`, `ja`, `de`) or `auto` for browser detection
</ParamField>

### Branding

<ParamField body="logo_url" type="string">
  Logo image URL
</ParamField>

<ParamField body="favicon_url" type="string">
  Favicon URL
</ParamField>

<ParamField body="primary_color" type="string">
  Brand color hex code (e.g. `#22c55e`)
</ParamField>

<ParamField body="theme_mode" type="string">
  `light`, `dark`, or `system`
</ParamField>

<ParamField body="status_page_theme" type="string">
  Theme preset: `default`, `minimal`, `corporate`, `neon`, `ocean`, `sunset`
</ParamField>

<ParamField body="custom_css" type="string">
  Custom CSS to inject into the page
</ParamField>

<ParamField body="custom_header_html" type="string">
  Custom HTML for the page header
</ParamField>

<ParamField body="custom_footer_html" type="string">
  Custom HTML for the page footer
</ParamField>

<ParamField body="hide_branding" type="boolean">
  Hide the "Powered by kodo" footer (Pro+)
</ParamField>

### Advanced Design

<ParamField body="font_family" type="string">
  Font family id used by the status page theme.
</ParamField>

<ParamField body="secondary_color" type="string">
  Secondary brand color in `#RRGGBB` format.
</ParamField>

<ParamField body="show_subscribe_form" type="boolean">
  Toggle subscriber form section visibility.
</ParamField>

<ParamField body="show_incident_history" type="boolean">
  Toggle incident timeline section visibility.
</ParamField>

<ParamField body="show_uptime_graph" type="boolean">
  Toggle uptime chart section visibility.
</ParamField>

<ParamField body="header_style" type="string">
  Header layout style: `centered` or `left-aligned`.
</ParamField>

<ParamField body="border_radius" type="string">
  Border radius preset id from supported theme radius options.
</ParamField>

<ParamField body="custom_template" type="string | null">
  Full custom HTML template (Pro+), max `64KB`. Set `null` to clear.
</ParamField>

<Info>
  For versioned draft/validate/publish workflows, use the dedicated Design API: `GET/PUT/POST /status-pages/{id}/design...`.
</Info>

<Warning>
  When updating design-managed fields (`primary_color`, `secondary_color`, `font_family`, `logo_url`, `favicon_url`, `show_subscribe_form`, `show_incident_history`, `show_uptime_graph`, `custom_template`) while a published design version exists, the response includes a `warning` field suggesting to use the Design API instead. Direct updates still apply immediately but may be overwritten on the next design publish.
</Warning>

### Custom Domain

<ParamField body="custom_domain" type="string | null">
  Custom domain for the status page (e.g. `status.yourcompany.com`). Must be globally unique across all status pages. Set `null` to remove. Requires Pro plan or higher.
</ParamField>

### Visibility

<ParamField body="status_page_visibility" type="string">
  `public`, `private` (Pro+), or `internal` (Team+)
</ParamField>

<ParamField body="status_page_password_hint" type="string">
  Optional hint shown on the password entry page (private mode)
</ParamField>

### Announcements

<ParamField body="announcement_text" type="string">
  Announcement banner text
</ParamField>

<ParamField body="announcement_type" type="string">
  `info`, `warning`, or `success`
</ParamField>

<ParamField body="announcement_enabled" type="boolean">
  Show or hide the announcement banner
</ParamField>

## Response

Returns the updated status page object.

## Common Errors

| Status | Message                                                          | Description                                         |
| ------ | ---------------------------------------------------------------- | --------------------------------------------------- |
| 400    | `Slug must contain only lowercase letters, numbers, and hyphens` | Slug format validation failed                       |
| 400    | `Template contains unsafe HTML content`                          | XSS check failed on `custom_template`               |
| 400    | `Custom header HTML contains unsafe content`                     | XSS check failed on `custom_header_html`            |
| 400    | `Custom footer HTML contains unsafe content`                     | XSS check failed on `custom_footer_html`            |
| 400    | `Invalid primary color format (use #RRGGBB)`                     | Color must be a valid hex code                      |
| 400    | `Custom CSS exceeds maximum size of 64KB`                        | CSS payload too large                               |
| 400    | `No valid fields to update`                                      | Request body contained no recognized fields         |
| 403    | `Custom domains require a Pro plan or higher`                    | Plan upgrade needed for `custom_domain`             |
| 403    | `Custom HTML templates require a Pro plan or higher`             | Plan upgrade needed for `custom_template`           |
| 403    | `Private status pages require a Pro plan or higher`              | Plan upgrade needed for `private` visibility        |
| 403    | `Internal status pages require a Team plan or higher`            | Plan upgrade needed for `internal` visibility       |
| 404    | `Status page not found`                                          | The ID does not match a page in your organization   |
| 409    | `This slug is already taken`                                     | Another status page already uses this slug          |
| 409    | `This domain is already in use by another status page`           | Another status page already uses this custom domain |

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://kodostatus.com/api/v1/status-pages/sp_abc123" \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "primary_color": "#3b82f6",
      "announcement_text": "Scheduled maintenance tonight at 10pm UTC",
      "announcement_type": "warning",
      "announcement_enabled": true
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://kodostatus.com/api/v1/status-pages/sp_abc123',
    {
      method: 'PATCH',
      headers: {
        'X-API-Key': process.env.KODO_API_KEY,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        primary_color: '#3b82f6',
        announcement_text: 'Scheduled maintenance tonight at 10pm UTC',
        announcement_type: 'warning',
        announcement_enabled: true
      })
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "page": {
      "id": "uuid",
      "name": "Public Status",
      "slug": "acme",
      "primary_color": "#3b82f6",
      "announcement_text": "Scheduled maintenance tonight at 10pm UTC",
      "announcement_type": "warning",
      "announcement_enabled": true,
      "updated_at": "2024-06-15T14:00:00Z"
    }
  }
  ```
</ResponseExample>
