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

# Delete saved objects

deprecated

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

## Paths

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

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

Deletes multiple Kibana saved objects in a single request.

There is currently no complete replacement for deleting arbitrary saved objects via an HTTP API.

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

- `force` (boolean) — optional
  When true, force deletion of multi-namespace objects from all namespaces.

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

- `id` (string) — required
- `type` (string) — required

## Responses

#### `200`

A bulk delete response.

`application/json`

#### `400`

A bad request.

`application/json`

## Code examples

#### Console

```console
POST kbn://api/saved_objects/_bulk_delete?force=false
[{"type":"dashboard","id":"example-dashboard-1"},{"type":"dashboard","id":"does-not-exist"}]
```

#### curl

```curl
curl \
  -X POST "${KIBANA_URL}/api/saved_objects/_bulk_delete?force=false" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '[{"type":"dashboard","id":"example-dashboard-1"},{"type":"dashboard","id":"does-not-exist"}]'
```

## Response examples

#### A bulk delete response with one not found result

```json
{
  "statuses": [
    {
      "id": "example-dashboard-1",
      "success": true,
      "type": "dashboard"
    },
    {
      "error": {
        "error": "Not Found",
        "message": "Saved object [dashboard/does-not-exist] not found",
        "statusCode": 404
      },
      "id": "does-not-exist",
      "success": false,
      "type": "dashboard"
    }
  ]
}
```

#### A bad request error

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

