---
title: "Create a new pipeline"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Pipeline

`POST /api/pipeline/pipelines`

## Authentication

- `bearerAuth`

## Request body

_Required._

- `name` (`post/api/pipeline/pipelines.name`; string, required) — Name of the pipeline
- `description` (`post/api/pipeline/pipelines.description`; string, optional) — Description of the pipeline

## Example request

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

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/pipeline/pipelines \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "description": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/pipeline/pipelines';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({name: 'string', description: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/pipeline/pipelines"

payload = {
    "name": "string",
    "description": "string"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Pipeline created successfully

#### Example

```json
{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "description": "string",
    "workspace_id": "string",
    "is_default": true,
    "is_active": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
    "opportunity_count": 0,
    "total_value": 0,
    "stages": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "position": 0,
        "color": "string",
        "default_probability": 0,
        "is_won_stage": true,
        "is_lost_stage": true,
        "opportunity_count": 0
      }
    ]
  }
}
```

- `success` (`post/api/pipeline/pipelines.response.201.success`; boolean, optional)
- `data` (`post/api/pipeline/pipelines.response.201.data`; object, optional)
  - `id` (`post/api/pipeline/pipelines.response.201.data.id`; string, optional) — Unique pipeline identifier
    - format `uuid`
  - `name` (`post/api/pipeline/pipelines.response.201.data.name`; string, optional) — Name of the pipeline
  - `description` (`post/api/pipeline/pipelines.response.201.data.description`; string, optional) — Description of the pipeline
  - `workspace_id` (`post/api/pipeline/pipelines.response.201.data.workspace_id`; string, optional) — Workspace ID this pipeline belongs to
  - `is_default` (`post/api/pipeline/pipelines.response.201.data.is_default`; boolean, optional) — Whether this is the default pipeline
  - `is_active` (`post/api/pipeline/pipelines.response.201.data.is_active`; boolean, optional) — Whether this pipeline is active
  - `created_at` (`post/api/pipeline/pipelines.response.201.data.created_at`; string, optional) — Creation timestamp
    - format `date-time`
  - `updated_at` (`post/api/pipeline/pipelines.response.201.data.updated_at`; string, optional) — Last update timestamp
    - format `date-time`
  - `created_by` (`post/api/pipeline/pipelines.response.201.data.created_by`; string, optional) — User ID who created the pipeline
    - format `uuid`
  - `opportunity_count` (`post/api/pipeline/pipelines.response.201.data.opportunity_count`; integer, optional) — Number of opportunities in this pipeline
  - `total_value` (`post/api/pipeline/pipelines.response.201.data.total_value`; number, optional) — Total value of all opportunities in this pipeline
  - `stages` (`post/api/pipeline/pipelines.response.201.data.stages`; array<object>, optional)
    - `id` (`post/api/pipeline/pipelines.response.201.data.stages.id`; string, optional) — Unique stage identifier
      - format `uuid`
    - `name` (`post/api/pipeline/pipelines.response.201.data.stages.name`; string, optional) — Name of the stage
    - `position` (`post/api/pipeline/pipelines.response.201.data.stages.position`; integer, optional) — Order position in the pipeline
    - `color` (`post/api/pipeline/pipelines.response.201.data.stages.color`; string, optional) — Color code for the stage
    - `default_probability` (`post/api/pipeline/pipelines.response.201.data.stages.default_probability`; integer, optional) — Default probability percentage for opportunities in this stage
    - `is_won_stage` (`post/api/pipeline/pipelines.response.201.data.stages.is_won_stage`; boolean, optional) — Whether this is a won/success stage
    - `is_lost_stage` (`post/api/pipeline/pipelines.response.201.data.stages.is_lost_stage`; boolean, optional) — Whether this is a lost/failed stage
    - `opportunity_count` (`post/api/pipeline/pipelines.response.201.data.stages.opportunity_count`; integer, optional) — Number of opportunities in this stage

### 400

Invalid input

### 401

Unauthorized

### 500

Internal server error


Source: https://developer.channelautomations.com/api/post-api-pipeline-pipelines/index.md
