---
type: api
title: Update uptime settings
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-uptime-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-uptime-settings
products:
  - Kibana
---

# Update uptime settings

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/uptime/settings`
- `PUT` `/s/{space_id}/api/uptime/settings`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Update uptime setting attributes like `heartbeatIndices`, `certExpirationThreshold`, `certAgeThreshold`, `defaultConnectors`, or `defaultEmail`. You must have `all` privileges for the uptime feature in the Observability section of the Kibana feature privileges. A partial update is supported, provided settings keys will be merged with existing settings.

## Request Body

`application/json`

- `certAgeThreshold` (number · default: 730) — optional
  The number of days after a certificate is created to trigger an alert.
- `certExpirationThreshold` (number · default: 30) — optional
  The number of days before a certificate expires to trigger an alert.
- `defaultConnectors` ([] string · default: []) — optional
  A list of connector IDs to be used as default connectors for new alerts.
- `defaultEmail` (object) — optional
  The default email configuration for new alerts.
  - `bcc` ([] string · default: []) — optional
  - `cc` ([] string · default: []) — optional
  - `to` ([] string · default: []) — optional
- `heartbeatIndices` (string · default: heartbeat-*) — optional
  An index pattern string to be used within the Uptime app and alerts to query Heartbeat data.

## Response

Indicates a successful call

`application/json`

Type: `object`

## Code Examples

#### Console

```console
PUT /api/uptime/settings
{
    "heartbeatIndices": "heartbeat-8*",
    "certExpirationThreshold": 30,
    "certAgeThreshold": 730,
    "defaultConnectors": [
        "08990f40-09c5-11ee-97ae-912b222b13d4",
        "db25f830-2318-11ee-9391-6b0c030836d6"
    ],
    "defaultEmail": {
        "to": [],
        "cc": [],
        "bcc": []
    }
}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/uptime/settings" \
  -H "Content-Type: application/json" \
  -d '{
    "heartbeatIndices": "heartbeat-8*",
    "certExpirationThreshold": 30,
    "certAgeThreshold": 730,
    "defaultConnectors": [
        "08990f40-09c5-11ee-97ae-912b222b13d4",
        "db25f830-2318-11ee-9391-6b0c030836d6"
    ],
    "defaultEmail": {
        "to": [],
        "cc": [],
        "bcc": []
    }
}'
```

## Response Examples

#### Put uptime settings response example1

A successful response from `PUT api/uptime/settings`.

```json
{
    "heartbeatIndices": "heartbeat-8*",
    "certExpirationThreshold": 30,
    "certAgeThreshold": 730,
    "defaultConnectors": [
        "08990f40-09c5-11ee-97ae-912b222b13d4",
        "db25f830-2318-11ee-9391-6b0c030836d6"
    ],
    "defaultEmail": {
        "to": [],
        "cc": [],
        "bcc": []
    }
}
```

