---
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/v9/operation/operation-post-saved-objects-bulk-create
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v9/operation/operation-post-saved-objects-bulk-create
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.

WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.

Creates multiple Kibana saved objects in a single request.

For transferring or backing up saved objects, prefer the import and export APIs (`POST /api/saved_objects/_import` and `POST /api/saved_objects/_export`).

## 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 · default: false) — optional
  Overwrite existing saved objects that match the same type and ID.

## Header parameters

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

## Request body

`application/json`

Type: `object[] · max items: 10000`

An array; each item has these fields:

- `attributes` (map string to object) — required
- `coreMigrationVersion` (string) — optional
- `id` (string) — optional
- `initialNamespaces` (string[] · min items: 1 · max items: 100) — optional
- `migrationVersion` (map string to string) — optional
- `references` (object[] · max items: 1000) — optional
  - `id` (string) — required
  - `name` (string) — required
  - `type` (string) — required
- `type` (string) — required
- `typeMigrationVersion` (string) — optional
- `version` (string) — optional

## Responses

#### `200`

A bulk create response.

`application/json`

#### `400`

A bad request.

`application/json`

## Code examples

#### Console

```console
POST kbn://api/saved_objects/_bulk_create?overwrite=false
[{"type":"dashboard","id":"example-dashboard-1","attributes":{"title":"Example dashboard 1"},"references":[]},{"type":"dashboard","id":"example-dashboard-2","attributes":{"title":"Example dashboard 2"},"references":[]}]
```

#### curl

```curl
curl \
  -X POST "${KIBANA_URL}/api/saved_objects/_bulk_create?overwrite=false" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '[{"type":"dashboard","id":"example-dashboard-1","attributes":{"title":"Example dashboard 1"},"references":[]},{"type":"dashboard","id":"example-dashboard-2","attributes":{"title":"Example dashboard 2"},"references":[]}]'
```

## Response examples

#### A bulk create response with one conflict

```json
{
  "saved_objects": [
    {
      "attributes": {
        "title": "Example dashboard 1"
      },
      "id": "example-dashboard-1",
      "managed": false,
      "namespaces": [
        "default"
      ],
      "references": [],
      "type": "dashboard",
      "updated_at": "2026-04-17T12:00:00.000Z",
      "version": "WzEsMV0="
    },
    {
      "error": {
        "error": "Conflict",
        "message": "Saved object [dashboard/example-dashboard-2] conflict",
        "statusCode": 409
      },
      "id": "example-dashboard-2",
      "type": "dashboard"
    }
  ]
}
```

#### A bad request error

```json
{
  "error": "Bad Request",
  "message": "Unsupported saved object type(s): unknownType",
  "statusCode": 400
}
```

