Update or create organization pipeline
Upsert the org’s default pipeline for the given type. When the legacy stages mapping is provided, the controller also migrates existing records from oldStage to newStage and returns the per-stage migration counts on the response.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Contact, Application Body
Pipeline display name; trimmed and unique within the organization.
Optional human-readable summary of the pipeline's purpose.
Pipeline to update; if omitted, the org's default pipeline for the given type is updated.
Legacy stage-rename mapping — pairs of oldStage -> newStage used to migrate existing records. Prefer pipelineStages.
Stage definitions with _id (for updates), name, color, and position; omitted stages are deactivated.
Response
Pipeline updated
{
"_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"
}