---
type: api
title: Create saved objects
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-bulkcreatesavedobjects
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-bulkcreatesavedobjects
products:
  - Kibana
---

# Create saved objects

deprecated

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

## Paths

- `POST` `/api/saved_objects/_bulk_create`
- `POST` `/s/{space_id}/api/saved_objects/_bulk_create`

## Description

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

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Query string parameters

- `overwrite` (boolean) — optional
  When true, overwrites the document with the same identifier.

## Header parameters

- `kbn-xsrf` (string) — required
  Cross-site request forgery protection

## Request body

`application/json`

Type: `object[]`


## Responses

#### `200`

Indicates a successful call.

`application/json`

Type: `object`

#### `400`

Bad request

`application/json`

- `error` (enum)
  Values: `Bad Request`
- `message` (string)
- `statusCode` (enum)
  Values: `400`
## Code examples

#### Console

```console
POST kbn:/api/saved_objects/_bulk_create
[
  {}
]
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/saved_objects/_bulk_create" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '[
    {}
  ]'
```

