---
type: api
title: Bulk update monitors
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-put-synthetic-monitors-bulk-update
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-put-synthetic-monitors-bulk-update
products:
  - Kibana
---

# Bulk update monitors

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

## Paths

- `PUT` `/api/synthetics/monitors/_bulk_update`
- `PUT` `/s/{space_id}/api/synthetics/monitors/_bulk_update`

## Description

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

Partially update multiple monitors in a single request.

Each `updates` entry has its own `id` and `attributes` patch, so one request can apply a different change per monitor. Unspecified fields are left unchanged. Patches use the same merge, validate, and encrypt path as `PUT /api/synthetics/monitors/{id}`.

For private-location monitors, Fleet is synced once for the batch instead of once per monitor.

You must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

## Required authorization

- Privileges: `uptime-read` and `uptime-write`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `updates` (object[] · min items: 1 · max items: 1000) — required
  Monitors to update. Each `id` may appear at most once. `attributes` must contain at least one field.
  - `attributes` (map string to object · default: {}) — optional
    Attributes to update for the monitor. You can specify the same fields as in `PUT /api/synthetics/monitors/{id}`. An empty object is rejected.
  - `id` (string · min length: 1 · max length: 1024) — required
    The monitor config ID to update.

## Responses

#### `200`

A successful response. The `result` array is in request order. Per-id failures (not found, validation, Fleet sync) set `updated: false` and `error` without failing the whole batch. `errors` is present only when there are service-level sync errors.

`application/json`

- `errors` (object[])
  Optional service-level errors from the bulk sync.
- `result` (object[])
  - `error` (string)
    Present when `updated` is `false`.
  - `id` (string)
    The monitor config ID from the request.
  - `updated` (boolean)
    If `true`, the monitor was updated. If `false`, see `error`.
#### `400`

Bad request. Returned when `updates` is missing or empty, an `attributes` object is empty, or the same `id` appears more than once.

## Code examples

#### Console

```console
PUT kbn://api/synthetics/monitors/_bulk_update
{"updates":[{"id":"monitor1-id","attributes":{"enabled":false}},{"id":"monitor2-id","attributes":{"tags":["bulk-patched"]}},{"id":"monitor3-id","attributes":{"schedule":{"number":"15","unit":"m"}}}]}
```

#### curl

```curl
curl \
  -X PUT "${KIBANA_URL}/api/synthetics/monitors/_bulk_update" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{"updates":[{"id":"monitor1-id","attributes":{"enabled":false}},{"id":"monitor2-id","attributes":{"tags":["bulk-patched"]}},{"id":"monitor3-id","attributes":{"schedule":{"number":"15","unit":"m"}}}]}'
```

## Response examples

#### Bulk update response example1

A response from a bulk update with one failure.

```json
{
  "result": [
    {
      "id": "monitor1-id",
      "updated": true
    },
    {
      "error": "Monitor id missing-id not found!",
      "id": "missing-id",
      "updated": false
    },
    {
      "id": "monitor3-id",
      "updated": true
    }
  ]
}
```

