---
search:
  tags:
    - pipelines
    - POST
seo:
  description: >-
    Creates a pipeline in an environment. Add… Reference for the POST
    /project/{project_id}/environment/{environment_id}/pipelines endpoint in the
    Platform API.
sidebar:
  label: Create a pipeline
  badge: POST
title: Create a pipeline
type: openapi-operation
---
Creates a pipeline in an environment. Add its stages with the stage endpoints.

`POST /project/{project_id}/environment/{environment_id}/pipelines`

**Request body** (`application/json`, required)

- `name` (string, required)
- `description` (string)
- `is_active` (boolean)

Request body example:

```json
{
  "name": "string",
  "description": "string",
  "is_active": true
}
```

**Responses**

- `200` — Pipeline created successfully
- `default` — Error

Response example, 200:

```json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
  "name": "string",
  "description": "string",
  "is_active": true,
  "last_run_id": "08df5d92-87b1-40a2-b1e7-a5977dea4efc",
  "last_run_status": "QUEUED",
  "stages": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
      "name": "string",
      "description": "string",
      "execution_order": 0,
      "on_failure": "STOP_PIPELINE",
      "components": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "stage_id": "f38d2b9c-0a0a-4eea-91a8-e974413bb670",
          "component_id": "41afafe5-2a48-424a-baef-34c2ad44ef7b",
          "component_kind": "Kjob",
          "is_required": true,
          "timeout_seconds": 0,
          "created_at": "2019-08-24T14:15:22Z"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}
```
