---
title: "Bulk create monitors"
method: POST
path: "/api/synthetics/monitors/_bulk_create"
tags: ["synthetics"]
---

# Bulk create monitors

`POST /api/synthetics/monitors/_bulk_create`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/synthetics/monitors/_bulk_create`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/synthetics/monitors/_bulk_create</span></div>

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

Create up to 1000 monitors in one request. Every monitor is validated before any monitor is persisted. The API creates the Saved Objects and synchronizes Fleet once for the batch.

You must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges. If a monitor is shared to additional spaces, you must also have create privileges in each of those spaces.<br/><br/>[Required authorization] Route required privileges: uptime-read AND uptime-write.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `monitors` KibanaHTTPAPIsCreateMonitorRequest[], required
    - union: Create a synthetics monitor. Required and default fields vary by type (HTTP, TCP, ICMP, browser, or API).
      - KibanaHTTPAPIsHttpMonitorFields
        - `alert` object: The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.
          - `status` object
            - `enabled` boolean, required
            - `groupBy` string
          - `tls` object
            - `enabled` boolean, required
            - `groupBy` string
        - `check` unknown
        - `check.request.body` unknown
        - `check.request.headers` unknown
        - `check.request.method` unknown
        - `check.response.body.negative` unknown
        - `check.response.body.positive` unknown
        - `check.response.headers` unknown
        - `check.response.json` unknown
        - `check.response.status` unknown
        - `enabled` boolean: Specify whether the monitor is enabled. Defaults to `true`.
        - `id` unknown
        - `ipv4` boolean: If `true`, ping using the ipv4 protocol. Defaults to `true`.
        - `ipv6` boolean: If `true`, ping using the ipv6 protocol. Defaults to `true`.
        - `kerberos` unknown
        - `labels` object: Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
        - `locations` union[]: The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Management* and click *Create monitor*. You can provide `locations` or `private_locations` or both. At least one is required.
          - union
            - string
            - object
              - …
        - `maintenance_windows` string[]: The IDs of the maintenance windows to apply to the monitor.
        - `max_redirects` union: The maximum number of redirects to follow. Defaults to `0`.
          - string
          - number
        - `mode` 'any' | 'all': The mode of the monitor. If it is `all`, the monitor pings all resolvable IPs for a hostname. If it is `any`, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, use `all`. Defaults to `any`.
        - `name` string: The monitor name.
        - `namespace` string: The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\`, `/`, `?`, `"`, `<`, `>`, `|`, whitespace, `,`, `#`, `:`, or `-`. Defaults to `default`.
        - `ntlm` unknown
        - `params` union: The monitor parameters, as a JSON string or an object.
          - string
          - object
        - `password` unknown
        - `private_locations` union[]: The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas `locations` are hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Settings* and click *Private locations*.
          - union
            - string
            - object
              - …
        - `proxy_headers` unknown
        - `proxy_url` unknown
        - `response` unknown
        - `response.include_body` unknown
        - `response.include_body_max_bytes` unknown
        - `response.include_headers` unknown
        - `retest_on_failure` boolean: Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using `retest_on_failure` can reduce noise related to transient problems.
        - `schedule` union: The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors, and `10` minutes for browser monitors.
          - number
          - object
            - `number` union, required
              - …
            - `unit` 'm' | 's', required
        - `service.name` unknown
        - `spaces` string[]: The IDs of additional spaces to make the monitor available in, besides the current space.
        - `ssl` unknown
        - `ssl.certificate` unknown
        - `ssl.certificate_authorities` unknown
        - `ssl.key` unknown
        - `ssl.key_passphrase` unknown
        - `ssl.supported_protocols` unknown
        - `ssl.verification_mode` unknown
        - `tags` union: An array of tags.
          - string
          - string[]
        - `timeout` union: The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to `16`. For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
          - string
          - number
        - `type` 'http', required: The monitor type.
        - `url` string: The URL to monitor.
        - `username` unknown
      - KibanaHTTPAPIsTcpMonitorFields
        - `alert` object: The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.
          - `status` object
            - `enabled` boolean, required
            - `groupBy` string
          - `tls` object
            - `enabled` boolean, required
            - `groupBy` string
        - `check` unknown
        - `check.receive` unknown
        - `check.send` unknown
        - `enabled` boolean: Specify whether the monitor is enabled. Defaults to `true`.
        - `host` string: The host to monitor; it can be an IP address or a hostname. The host can include the port using a colon, for example "example.com:9200".
        - `id` unknown
        - `ipv4` boolean: If `true`, ping using the ipv4 protocol. Defaults to `true`.
        - `ipv6` boolean: If `true`, ping using the ipv6 protocol. Defaults to `true`.
        - `labels` object: Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
        - `locations` union[]: The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Management* and click *Create monitor*. You can provide `locations` or `private_locations` or both. At least one is required.
          - union
            - string
            - object
              - …
        - `maintenance_windows` string[]: The IDs of the maintenance windows to apply to the monitor.
        - `mode` 'any' | 'all': The mode of the monitor. If it is `all`, the monitor pings all resolvable IPs for a hostname. If it is `any`, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, use `all`. Defaults to `any`.
        - `name` string: The monitor name.
        - `namespace` string: The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\`, `/`, `?`, `"`, `<`, `>`, `|`, whitespace, `,`, `#`, `:`, or `-`. Defaults to `default`.
        - `params` union: The monitor parameters, as a JSON string or an object.
          - string
          - object
        - `private_locations` union[]: The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas `locations` are hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Settings* and click *Private locations*.
          - union
            - string
            - object
              - …
        - `proxy_url` unknown
        - `proxy_use_local_resolver` unknown
        - `retest_on_failure` boolean: Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using `retest_on_failure` can reduce noise related to transient problems.
        - `schedule` union: The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors, and `10` minutes for browser monitors.
          - number
          - object
            - `number` union, required
              - …
            - `unit` 'm' | 's', required
        - `service.name` unknown
        - `spaces` string[]: The IDs of additional spaces to make the monitor available in, besides the current space.
        - `ssl` unknown
        - `ssl.certificate` unknown
        - `ssl.certificate_authorities` unknown
        - `ssl.key` unknown
        - `ssl.key_passphrase` unknown
        - `ssl.supported_protocols` unknown
        - `ssl.verification_mode` unknown
        - `tags` union: An array of tags.
          - string
          - string[]
        - `timeout` union: The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to `16`. For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
          - string
          - number
        - `type` 'tcp', required: The monitor type.
      - KibanaHTTPAPIsIcmpMonitorFields
        - `alert` object: The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.
          - `status` object
            - `enabled` boolean, required
            - `groupBy` string
          - `tls` object
            - `enabled` boolean, required
            - `groupBy` string
        - `enabled` boolean: Specify whether the monitor is enabled. Defaults to `true`.
        - `host` string: The host to ping.
        - `id` unknown
        - `ipv4` boolean: If `true`, ping using the ipv4 protocol. Defaults to `true`.
        - `ipv6` boolean: If `true`, ping using the ipv6 protocol. Defaults to `true`.
        - `labels` object: Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
        - `locations` union[]: The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Management* and click *Create monitor*. You can provide `locations` or `private_locations` or both. At least one is required.
          - union
            - string
            - object
              - …
        - `maintenance_windows` string[]: The IDs of the maintenance windows to apply to the monitor.
        - `mode` 'any' | 'all': The mode of the monitor. If it is `all`, the monitor pings all resolvable IPs for a hostname. If it is `any`, the monitor pings only one IP address for a hostname. If you're using a DNS-load balancer and want to ping every IP address for the specified hostname, use `all`. Defaults to `any`.
        - `name` string: The monitor name.
        - `namespace` string: The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\`, `/`, `?`, `"`, `<`, `>`, `|`, whitespace, `,`, `#`, `:`, or `-`. Defaults to `default`.
        - `params` union: The monitor parameters, as a JSON string or an object.
          - string
          - object
        - `private_locations` union[]: The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas `locations` are hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Settings* and click *Private locations*.
          - union
            - string
            - object
              - …
        - `retest_on_failure` boolean: Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using `retest_on_failure` can reduce noise related to transient problems.
        - `schedule` union: The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors, and `10` minutes for browser monitors.
          - number
          - object
            - `number` union, required
              - …
            - `unit` 'm' | 's', required
        - `service.name` unknown
        - `spaces` string[]: The IDs of additional spaces to make the monitor available in, besides the current space.
        - `tags` union: An array of tags.
          - string
          - string[]
        - `timeout` union: The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to `16`. For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
          - string
          - number
        - `type` 'icmp', required: The monitor type.
        - `wait` unknown
      - KibanaHTTPAPIsBrowserMonitorFields
        - `alert` object: The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.
          - `status` object
            - `enabled` boolean, required
            - `groupBy` string
          - `tls` object
            - `enabled` boolean, required
            - `groupBy` string
        - `certificate_error_spki_allowlist` unknown
        - `enabled` boolean: Specify whether the monitor is enabled. Defaults to `true`.
        - `filter_journeys` unknown
        - `filter_journeys.match` unknown
        - `filter_journeys.tags` unknown
        - `id` unknown
        - `ignore_https_errors` unknown
        - `inline_script` string: The inline script.
        - `labels` object: Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
        - `locations` union[]: The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Management* and click *Create monitor*. You can provide `locations` or `private_locations` or both. At least one is required.
          - union
            - string
            - object
              - …
        - `maintenance_windows` string[]: The IDs of the maintenance windows to apply to the monitor.
        - `name` string: The monitor name.
        - `namespace` string: The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\`, `/`, `?`, `"`, `<`, `>`, `|`, whitespace, `,`, `#`, `:`, or `-`. Defaults to `default`.
        - `params` union: The monitor parameters, as a JSON string or an object.
          - string
          - object
        - `playwright_options` unknown
        - `playwright_text_assertion` unknown
        - `private_locations` union[]: The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas `locations` are hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Settings* and click *Private locations*.
          - union
            - string
            - object
              - …
        - `retest_on_failure` boolean: Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using `retest_on_failure` can reduce noise related to transient problems.
        - `schedule` union: The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors, and `10` minutes for browser monitors.
          - number
          - object
            - `number` union, required
              - …
            - `unit` 'm' | 's', required
        - `screenshots` unknown
        - `service.name` unknown
        - `source` unknown
        - `source.inline` unknown
        - `source.inline.script` unknown
        - `source.project.content` unknown
        - `spaces` string[]: The IDs of additional spaces to make the monitor available in, besides the current space.
        - `ssl` unknown
        - `ssl.certificate` unknown
        - `ssl.certificate_authorities` unknown
        - `ssl.key` unknown
        - `ssl.key_passphrase` unknown
        - `ssl.supported_protocols` unknown
        - `ssl.verification_mode` unknown
        - `synthetics_args` unknown
        - `tags` union: An array of tags.
          - string
          - string[]
        - `throttling` unknown
        - `timeout` union: The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to `16`. For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
          - string
          - number
        - `type` 'browser', required: The monitor type.
      - KibanaHTTPAPIsApiMonitorFields
        - `alert` object: The alert configuration. The default is `{ status: { enabled: true }, tls: { enabled: true } }`.
          - `status` object
            - `enabled` boolean, required
            - `groupBy` string
          - `tls` object
            - `enabled` boolean, required
            - `groupBy` string
        - `certificate_error_spki_allowlist` unknown
        - `enabled` boolean: Specify whether the monitor is enabled. Defaults to `true`.
        - `filter_journeys` unknown
        - `filter_journeys.match` unknown
        - `filter_journeys.tags` unknown
        - `id` unknown
        - `ignore_https_errors` unknown
        - `inline_script` string: The inline script.
        - `labels` object: Key-value pairs of labels to associate with the monitor. Labels can be used for filtering and grouping monitors.
        - `locations` union[]: The Elastic-managed locations to deploy the monitor to. Monitors can be deployed in multiple locations so that you can detect differences in availability and response times across those locations. To list available locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Management* and click *Create monitor*. You can provide `locations` or `private_locations` or both. At least one is required.
          - union
            - string
            - object
              - …
        - `maintenance_windows` string[]: The IDs of the maintenance windows to apply to the monitor.
        - `name` string: The monitor name.
        - `namespace` string: The namespace field should be lowercase and not contain spaces. The namespace must not include any of the following characters: `*`, `\`, `/`, `?`, `"`, `<`, `>`, `|`, whitespace, `,`, `#`, `:`, or `-`. Defaults to `default`.
        - `params` union: The monitor parameters, as a JSON string or an object.
          - string
          - object
        - `playwright_options` unknown
        - `playwright_text_assertion` unknown
        - `private_locations` union[]: The private locations to deploy the monitor to. These locations are hosted and managed by you, whereas `locations` are hosted by Elastic. You can specify a private location using the location's name. To list available private locations, run the `elastic-synthetics locations` command with the deployment's Kibana URL, or go to *Synthetics > Settings* and click *Private locations*.
          - union
            - string
            - object
              - …
        - `retest_on_failure` boolean: Turn retesting for when a monitor fails on or off. By default, monitors are automatically retested if the monitor goes from "up" to "down". If the result of the retest is also "down", an error is created and, if configured, an alert is sent. Using `retest_on_failure` can reduce noise related to transient problems.
        - `schedule` union: The monitor's schedule in minutes. Supported values are `1`, `3`, `5`, `10`, `15`, `30`, `60`, `120`, and `240`. The default value is `3` minutes for HTTP, TCP, and ICMP monitors, and `10` minutes for browser monitors.
          - number
          - object
            - `number` union, required
              - …
            - `unit` 'm' | 's', required
        - `service.name` unknown
        - `source` unknown
        - `source.inline` unknown
        - `source.inline.script` unknown
        - `source.project.content` unknown
        - `spaces` string[]: The IDs of additional spaces to make the monitor available in, besides the current space.
        - `ssl` unknown
        - `ssl.certificate` unknown
        - `ssl.certificate_authorities` unknown
        - `ssl.key` unknown
        - `ssl.key_passphrase` unknown
        - `ssl.supported_protocols` unknown
        - `ssl.verification_mode` unknown
        - `synthetics_args` unknown
        - `tags` union: An array of tags.
          - string
          - string[]
        - `timeout` union: The monitor timeout in seconds. The monitor fails if it doesn't complete within this time. Defaults to `16`. For browser monitors, the minimum timeout is 30 seconds. Browser monitor timeouts only apply on private locations; on public locations the timeout has no effect and the response includes a warning.
          - string
          - number
        - `type` 'api', required: The monitor type.

## Response `200`

A successful response. `created: false` indicates an individual Saved Object creation or Fleet synchronization failure; see `error`. Batch-level Fleet synchronization errors are returned in `errors`.

- object
  - `errors` unknown[]: Optional service-level errors from the bulk sync.
    - unknown
  - `result` object[], required
    - `created` boolean, required: Whether the monitor Saved Object was created.
    - `error` string: Present when `created` is `false`.
    - `id` string, required: The config ID of the created monitor.

## Other responses

- `400`: Bad request. Returned when the batch is empty or too large, a monitor configuration is invalid, or two monitors use the same name.

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
