Pipelines
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.
Authorization
bearerAuth In: header
Query Parameters
"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
application/json
application/json
application/json
curl -X POST "https://example.com/api/pipelines" \ -H "Content-Type: application/json" \ -d '{ "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 }}