Pipelines

Create a new pipeline

POST
/api/pipelines/create

Create a brand-new pipeline (with its pipelineStages) for the given type. Setting isDefault: true switches the org's default pipeline to the newly-created one.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

type?string
Default"Contact"

Value in

  • "Contact"
  • "Application"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/pipelines/create" \  -H "Content-Type: application/json" \  -d '{    "name": "EMEA sales pipeline",    "description": "EMEA-specific sales funnel",    "isDefault": false,    "pipelineStages": [      {        "name": "New",        "color": "#3B82F6",        "position": 0      },      {        "name": "Discovery",        "color": "#8B5CF6",        "position": 1      }    ]  }'
{  "message": "Pipeline updated",  "pipeline": {    "_id": "66f0a0b0c0d0e0f0a0b0c0d0",    "name": "Sales pipeline",    "type": "Contact",    "isDefault": true  },  "contactsMigrated": {    "New Lead -> New": 14,    "Qualified Lead -> Qualified": 8  }}