---
type: api
title: Create a saved object
description: WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
url: https://www.elastic.co/docs/api/doc/kibana/operation/operation-post-saved-objects-type-id
resource: https://www.elastic.co/docs/api/doc/kibana/operation/operation-post-saved-objects-type-id
products:
  - Kibana
---

# Create a saved object

deprecated

Authentication: required

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

## Paths

- `POST` `/api/saved_objects/{type}/{id}`
- `POST` `/api/saved_objects/{type}`
- `POST` `/s/{space_id}/api/saved_objects/{type}/{id}`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `type` (string · max length: 256) — required
  The saved object type.
- `id` (string · max length: 512) — optional, leave it out to use `/api/saved_objects/{type}`
  The saved object identifier.

## Description

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

Creates a Kibana saved object; if an ID is provided it is used, otherwise Kibana generates one.

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

## Query string parameters

- `overwrite` (boolean · default: false) — optional
  Overwrite an existing saved object.

## Header parameters

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

## Request body

`application/json`

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

## Responses

#### `200`

A successful create response.

`application/json`

#### `409`

A conflict error.

`application/json`

## Code examples

#### Console

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

#### curl

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

## Response examples

#### A created saved object

`application/json`

```json
{
  "attributes": {
    "title": "Example dashboard"
  },
  "id": "example-dashboard-id",
  "managed": false,
  "namespaces": [
    "default"
  ],
  "references": [],
  "type": "dashboard",
  "updated_at": "2026-04-17T12:00:00.000Z",
  "version": "WzEsMV0="
}
```

#### A conflict error

`application/json`

```json
{
  "error": "Conflict",
  "message": "Saved object [dashboard/example-dashboard-id] conflict",
  "statusCode": 409
}
```

