API Reference
Pipelines
List pipelines, inspect their steps, and move records between stages.
Pipelines define the stages a record moves through in your workflow. Any object with a PIPELINE field can have one or more pipelines associated with it -- not just opportunities.
List all pipelines
GET /api/v1/pipelinesReturns every pipeline in your organization, including their ordered steps.
Response
{
"pipelines": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sales Pipeline",
"objectName": "opportunities",
"steps": [
{
"id": "step-001",
"name": "Qualification",
"order_index": 0
},
{
"id": "step-002",
"name": "Discovery",
"order_index": 1
},
{
"id": "step-003",
"name": "Proposal",
"order_index": 2
},
{
"id": "step-004",
"name": "Negotiation",
"order_index": 3
},
{
"id": "step-005",
"name": "Closed Won",
"order_index": 4
}
]
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Recruitment Pipeline",
"objectName": "candidates",
"steps": [
{
"id": "step-010",
"name": "Applied",
"order_index": 0
},
{
"id": "step-011",
"name": "Screening",
"order_index": 1
},
{
"id": "step-012",
"name": "Interview",
"order_index": 2
},
{
"id": "step-013",
"name": "Offer",
"order_index": 3
}
]
}
]
}Example
curl -X GET "https://kasar.app/api/v1/pipelines" \
-H "Authorization: Bearer YOUR_API_TOKEN"Move a record to a different step
PUT /api/v1/pipelines/{object}/{id}/moveMoves a record to a different pipeline step. Works with any object that has a PIPELINE field.
Path parameters
| Parameter | Type | Description |
|---|---|---|
object | string | The object name (e.g., opportunities, candidates) |
id | string | The record ID to move |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
pipeline_step_id | string | Yes | The target step ID |
pipeline_id | string | No | The pipeline ID. Auto-inferred from the step if not provided. |
{
"pipeline_step_id": "step-003"
}Behavior
- The endpoint validates that the target step belongs to the specified (or inferred) pipeline.
- If
pipeline_idis omitted, Kasar looks up which pipeline owns the given step and uses it automatically. - If the step does not belong to the pipeline, the request is rejected with a validation error.
- Pipeline step validation rules (required fields at a given stage) are enforced. If a required field is missing, the response includes the list of fields that must be filled before the move is allowed.
Response
{
"data": {
"id": "record-uuid",
"pipeline_step_id": "step-003",
"pipeline_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | The step does not belong to the pipeline, or required fields are missing |
| 404 | RECORD_NOT_FOUND | No record found with the given ID |
Example
Move an opportunity to the "Proposal" step:
curl -X PUT "https://kasar.app/api/v1/pipelines/opportunities/record-uuid/move" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pipeline_step_id": "step-003"
}'Move a record and explicitly specify the pipeline:
curl -X PUT "https://kasar.app/api/v1/pipelines/candidates/record-uuid/move" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pipeline_step_id": "step-011",
"pipeline_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}'