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

# Delete saved objects

deprecated

Authentication: required

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

## Paths

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

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

## Description

WARNING: When you delete a saved object, it cannot be recovered.

## Query string parameters

- `force` (boolean) — optional
  When true, force delete objects that exist in multiple namespaces. Note that the option applies to the whole request. Use the delete object API to specify per-object deletion behavior. TIP: Use this if you attempted to delete objects and received an HTTP 400 error with the following message: "Unable to delete saved object that exists in multiple namespaces, use the force option to delete it anyway". WARNING: When you bulk delete objects that exist in multiple namespaces, the API also deletes legacy url aliases that reference the object. These requests are batched to minimise the impact but they can place a heavy load on Kibana. Make sure you limit the number of objects that exist in multiple namespaces in a single bulk delete operation.

## Header parameters

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

## Request body

`application/json`

Type: `object[]`


## Responses

#### `200`

Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body.

`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_delete
[
  {}
]
```

#### curl

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

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "Bad Request",
  "message": "string",
  "statusCode": 400
}
```

