---
type: api
title: Create or update a Logstash pipeline
description: Create a centrally-managed Logstash pipeline or update a pipeline.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-put-logstash-pipeline
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-put-logstash-pipeline
products:
  - Kibana
---

# Create or update a Logstash pipeline

Availability:

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

## Paths

- `PUT` `/api/logstash/pipeline/{id}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

#### Path Parameters

- `id` (string)
  An identifier for the pipeline. Pipeline ID must begin with a letter or underscore and can contain only letters, underscores, dashes, hyphens, and numbers.

## Description

Create a centrally-managed Logstash pipeline or update a pipeline.
To use this API, you must have either the `logstash_admin` built-in role or a customized Logstash writer role.

[Secure your connection](https://www.elastic.co/docs/reference/logstash/secure-connection)

## Request Body

`application/json`

- `description` (string · max: 1024) — optional
  A description of the pipeline.
- `pipeline` (string) — required
  A definition for the pipeline.
- `settings` (object) — optional
  Supported settings, represented as object keys, include the following:

- `pipeline.workers`
- `pipeline.batch.size`
- `pipeline.batch.delay`
- `pipeline.ecs_compatibility`
- `pipeline.ordered`
- `queue.type`
- `queue.max_bytes`
- `queue.checkpoint.writes`

## Response

Indicates a successful call

## Code Examples

#### Console

```console
PUT /api/logstash/pipeline/{id}
{
  "pipeline": "input { stdin {} } output { stdout {} }",
  "settings": {
    "queue.type": "persisted"
  }
}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/logstash/pipeline/{id}" \
  -H "Content-Type: application/json" \
  -d '{
  "pipeline": "input { stdin {} } output { stdout {} }",
  "settings": {
    "queue.type": "persisted"
  }
}'
```

