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

# Update a saved object

deprecated

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

## Paths

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

#### Path parameters

- `id` (string) — required
  An identifier for the saved object.
- `type` (string) — required
  Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`.

## Description

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

Update the attributes for Kibana saved objects.

## 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>`

## 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`

#### `404`

Indicates the object was not found.

`application/json`

Type: `object`

#### `409`

Indicates a conflict error.

`application/json`

Type: `object`

## Code examples

#### Console

```console
PUT kbn:/api/saved_objects/TYPE/ID
{}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/saved_objects/${TYPE}/${ID}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}'
```

