---
type: api
title: Delete a stream
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-delete-streams-name
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-delete-streams-name
products:
  - Kibana
---

# Delete a stream

Availability: Experimental

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

## Paths

- `DELETE` `/api/streams/{name}`
- `DELETE` `/s/{space_id}/api/streams/{name}`

#### Path parameters

- `name` (string · max length: 200) — required
  The name of the stream.

## Description

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

Deletes a stream definition and the underlying data stream

## Required authorization

- Privileges: `manage_stream`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

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

## Request body

`application/json`

Any of:
- **object**
- **object**

## Response

The stream was deleted successfully.

## Code examples

#### Console

```console
DELETE kbn:/api/streams/NAME
{}
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/streams/${NAME}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}'
```

