Skip to main content
POST
/
api
/
pipelines
Update or create organization pipeline
curl --request POST \
  --url https://your-instance.example.com/api/pipelines \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Sales pipeline",
  "description": "NA sales pipeline",
  "pipelineId": "66f0a0b0c0d0e0f0a0b0c0d0",
  "pipelineStages": [
    {
      "name": "New",
      "color": "#3B82F6",
      "position": 0
    },
    {
      "name": "Qualified",
      "color": "#10B981",
      "position": 1
    },
    {
      "name": "Won",
      "color": "#F59E0B",
      "position": 2
    }
  ]
}
'
{
  "message": "Pipeline updated",
  "pipeline": {
    "_id": "66f0a0b0c0d0e0f0a0b0c0d0",
    "name": "Sales pipeline",
    "type": "Contact",
    "isDefault": true
  },
  "contactsMigrated": {
    "New Lead -> New": 14,
    "Qualified Lead -> Qualified": 8
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

type
enum<string>
default:Contact
Available options:
Contact,
Application

Body

application/json
name
string

Pipeline display name; trimmed and unique within the organization.

description
string

Optional human-readable summary of the pipeline's purpose.

pipelineId
string

Pipeline to update; if omitted, the org's default pipeline for the given type is updated.

stages
object[]

Legacy stage-rename mapping — pairs of oldStage -> newStage used to migrate existing records. Prefer pipelineStages.

pipelineStages
object[]

Stage definitions with _id (for updates), name, color, and position; omitted stages are deactivated.

Response

Pipeline updated

message
string
pipeline
object
Example:
{
"_id": "66f0a0b0c0d0e0f0a0b0c0d0",
"name": "Sales pipeline",
"description": "NA sales pipeline",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"type": "Contact",
"isDefault": true,
"isActive": true,
"stages": [
{ "name": "New", "color": "#3B82F6" },
{ "name": "Qualified", "color": "#10B981" }
],
"pipelineStageIds": [
"67f0a0b0c0d0e0f0a0b0c0d0",
"67f0a0b0c0d0e0f0a0b0c0d1"
],
"pipelineStages": [
{
"_id": "67f0a0b0c0d0e0f0a0b0c0d0",
"name": "New",
"color": "#3B82F6",
"position": 0
},
{
"_id": "67f0a0b0c0d0e0f0a0b0c0d1",
"name": "Qualified",
"color": "#10B981",
"position": 1
}
],
"createdBy": "65b1f0a2c3d4e5f6a7b8c9d0",
"updatedBy": "65b1f0a2c3d4e5f6a7b8c9d0"
}
contactsMigrated
object