# Update status page

Update an existing status page. Send only the parameters you wish to change (e.g. `company_url`)

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/status-pages/{status_page_id}"
method = "PATCH"

[[path_param]]
name = "status_page_id"
description = "The ID of the status page you want to update"
required = false
type = "string"

[[body_param]]
name = "history"
description = "Number of days to display on the status page. Between `7` and `365` days."
required = false
type = "integer"

[[body_param]]
name = "company_name"
description = "Name of your company"
required = false
type = "string"

[[body_param]]
name = "company_url"
description = "URL of your company's website"
required = false
type = "string"

[[body_param]]
name = "contact_url"
description = "URL that should be used for contacting you in case of an emergency"
required = false
type = "string"

[[body_param]]
name = "logo_url"
description = "A direct link to your company's logo. The image should be under 20MB in size"
required = false
type = "string"

[[body_param]]
name = "dark_logo_url"
description = "A direct link to a dark version of your company's logo. The image should be under 20MB in size"
required = false
type = "string"

[[body_param]]
name = "whitelabeled"
required = false
type = "boolean"
description = """
Whether the 'Powered by Better Stack' footer should be removed. This is a [billable feature](https://betterstack.com/pricing#status-pages ";_blank").
"""

[[body_param]]
name = "timezone"
description = "What timezone should we display your status page in? The accepted values can be found in the Rails TimeZone documentation. https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html"
required = false
type = "string"

[[body_param]]
name = "subdomain"
description = "What subdomain should we use for your status page? This needs to be unique across our entire application, so choose carefully"
required = false
type = "string"

[[body_param]]
name = "custom_domain"
description = "Do you want a custom domain on your status page? Add a CNAME record that points your domain to status.betteruptime.com Example: CNAME status.walmine.com statuspage.betteruptime.com"
required = false
type = "string"

[[body_param]]
name = "min_incident_length"
description = "If you don't want to display short incidents on your status page, this attribute is for you. In seconds."
required = false
type = "integer"

[[body_param]]
name = "subscribable"
description = "Do you want to allow users to subscribe to your status page changes?"
required = false
type = "boolean"

[[body_param]]
name = "hide_from_search_engines"
description = "Hide your status page from search engines"
required = false
type = "boolean"

[[body_param]]
name = "custom_css"
description = "Unleash your inner designer and tweak our status page design to fit your branding"
required = false
type = "string"

[[body_param]]
name = "custom_javascript"
description = "Level up your status page by adding analytics, interactive features, or any other functionality you need"
required = false
type = "string"

[[body_param]]
name = "design"
description = "Choose between classic and modern status page design. Possible values: `v1`, `v2`."
required = false
type = "string"

[[body_param]]
name = "navigation_links"
description = """
Adjust the navigation links on your status page. Accepts array of objects containing keys `text` and `href`:

• `text` is the navigation link label.

• `href` is the link. Use full URL for external links. Use `/`, `/maintenance` and `/incidents` for built-in links.

Only the first 4 links are considered. This only applies when the design is set to `v2`.
"""
required = false
type = "array of objects"

[[body_param]]
name = "theme"
description = "Select a color theme of your status page. Possible values: `light`, `dark`, `system`. This only applies when the design is set to `v2`."
required = false
type = "string"

[[body_param]]
name = "layout"
description = "Pick your status page header layout. Possible values: `vertical`, `horizontal`. This only applies when the design is set to `v2`."
required = false
type = "string"

[[body_param]]
name = "google_analytics_id"
description = "Specify your own Google Analytics ID if you want to receive hits on your status page"
required = false
type = "string"

[[body_param]]
name = "announcement"
description = "Add an announcement to your status page"
required = false
type = "string"

[[body_param]]
name = "announcement_embed_visible"
description = "Toggle this field if you want to show an announcement in your embed You can embed the announcement using this snippet: !SNIPPET MISSING (quotes in the snippet break markdown/toml syntax)! "
required = false
type = "boolean"

[[body_param]]
name = "announcement_embed_link"
description = "Point your embedded announcement to a specified URL"
required = false
type = "string"

[[body_param]]
name = "announcement_embed_custom_css"
description = "Modify the design of the announcement embed"
required = false
type = "string"

[[body_param]]
name = "automatic_reports"
description = "Automatically create status page updates for new incidents?"
required = false
type = "boolean"

[[body_param]]
name = "password_enabled"
description = "Do you want to enable password protection on your status page?"
required = false
type = "boolean"

[[body_param]]
name = "password"
description = "Set a password of your status page (we won't store it as plaintext, promise) Required when `password_enabled: true`. We will set `password_enabled: false` automatically when you send us an empty password."
required = false
type = "string"

[[body_param]]
name = "ip_allowlist"
description = """
Restrict access to your status page by IP address. Only visitors from specified IP addresses or CIDR ranges can view the status page. This is a [billable feature](https://betterstack.com/pricing#status-pages ";_blank").
"""
required = false
type = "array of strings"

[[body_param]]
name = "status_page_group_id"
description = "The ID of the status page group to which this status page will belong. Can be `null`."
required = false
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content_Type"
description = "application/json"
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = ''''''
body = '''{
  "id": "123456789",
  "type": "status_page",
  "attributes": {
    "company_name": "Best company - Tokyo branch",
    "company_url": "https://best-company.com",
    "contact_url": null,
    "logo_url": null,
    "dark_logo_url": null,
    "whitelabeled": false,
    "timezone": "Tokyo",
    "subdomain": "best-company-tokyo",
    "custom_domain": null,
    "custom_css": null,
    "custom_javascript": "",
    "google_analytics_id": null,
    "min_incident_length": 400,
    "announcement": null,
    "announcement_embed_visible": false,
    "announcement_embed_css": null,
    "announcement_embed_link": null,
    "automatic_reports": false,
    "status_page_group_id": null,
    "subscribable": false,
    "hide_from_search_engines": false,
    "password_enabled": false,
    "ip_allowlist": [],
    "history": 90,
    "aggregate_state": "operational",
    "design": "v1",
    "navigation_links": [],
    "theme": "light",
    "layout": "vertical",
    "created_at": "2020-08-10T07:34:38.848Z",
    "updated_at": "2020-12-08T14:12:31.680Z"
  }
}'''

[[response]]
status = 422
description = ''''''
body = '''{
  "errors": "Sorry, you misspelled some attributes",
  "invalid_attributes": [
    "company_urlll"
  ]
}'''
[/responses]

#### Example cURL 

[code-tabs]
```shell
[label Change company name]
curl --request PATCH \
  --url https://uptime.betterstack.com/api/v2/status-pages/123456789 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "company_name": "Best company: Tokyo"
}'
```
```shell
[label Set up IP allowlisting]
curl --request PATCH \
  --url https://uptime.betterstack.com/api/v2/status-pages/123456789 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "ip_allowlist": [
      "# Tokyo Office",
      "192.168.1.0/24",
      "# Production servers",
      "172.16.0.0/16"
    ]
}'
```
[/code-tabs]

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all status pages API parameters](https://betterstack.com/docs/uptime/api/status-pages-api-response-params/)
[/info]
