ZeroPipeline
AI-native CRM and sales pipeline management. Build deal pipelines, track customers, automate workflows, and get revenue analytics — all powered by ZeroDB.
Base URL: https://pipeline.ainative.studio/api/v1
Interactive docs: https://pipeline.ainative.studio/api/v1/docs
Authentication
Authorization: Bearer YOUR_JWT_TOKEN
Or use an API key created via POST /api/v1/api-keys.
# Login
curl -X POST https://pipeline.ainative.studio/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"yourpassword"}'
# Response
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"token_type": "bearer"
}
Pipelines
| Method | Path | Description |
|---|---|---|
POST | /pipelines | Create a pipeline |
GET | /pipelines | List all pipelines |
GET | /pipelines/{id} | Get pipeline details |
PUT | /pipelines/{id} | Update pipeline |
DELETE | /pipelines/{id} | Delete pipeline |
GET | /pipelines/{id}/stages | List stages for a pipeline |
Stages
| Method | Path | Description |
|---|---|---|
POST | /stages | Create a stage |
GET | /stages/{id} | Get stage |
PUT | /stages/{id} | Update stage |
DELETE | /stages/{id} | Delete stage |
POST | /stages/{id}/reorder | Reorder stage position |
Deals
| Method | Path | Description |
|---|---|---|
POST | /deals | Create a deal |
GET | /deals | List deals (filterable by pipeline, stage, owner) |
GET | /deals/{id} | Get deal |
PUT | /deals/{id} | Update deal |
DELETE | /deals/{id} | Delete deal |
POST | /deals/{id}/move | Move deal to a different stage |
GET | /deals/{id}/activities | List activities on a deal |
Customers
| Method | Path | Description |
|---|---|---|
POST | /customers | Create a customer |
GET | /customers | List customers |
GET | /customers/{id} | Get customer |
PUT | /customers/{id} | Update customer |
DELETE | /customers/{id} | Delete customer |
GET | /customers/{id}/deals | List deals for a customer |
Tasks
| Method | Path | Description |
|---|---|---|
POST | /tasks | Create a task |
GET | /tasks | List tasks (filter by deal, assignee, due date) |
GET | /tasks/{id} | Get task |
PUT | /tasks/{id} | Update task |
DELETE | /tasks/{id} | Delete task |
POST | /tasks/{id}/complete | Mark task complete |
Activities
| Method | Path | Description |
|---|---|---|
POST | /activities | Log an activity (call, email, meeting, note) |
GET | /activities | List activities |
GET | /activities/{id} | Get activity |
DELETE | /activities/{id} | Delete activity |
Automations
| Method | Path | Description |
|---|---|---|
POST | /automations | Create an automation rule |
GET | /automations | List automations |
PUT | /automations/{id} | Update automation |
DELETE | /automations/{id} | Delete automation |
POST | /automations/{id}/toggle | Enable or disable automation |
Analytics
| Method | Path | Description |
|---|---|---|
GET | /analytics/revenue | Revenue by period |
GET | /analytics/pipeline | Pipeline velocity and conversion rates |
GET | /analytics/deals | Deal win/loss breakdown |
GET | /analytics/leaderboard | Rep performance leaderboard |
Error Format
{
"detail": "Deal not found",
"error_code": "NOT_FOUND",
"next_action": null
}
Quick Start
# 1. Create a pipeline
curl -X POST https://pipeline.ainative.studio/api/v1/pipelines \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Sales Q2", "description": "Q2 outbound deals"}'
# 2. Add a stage
curl -X POST https://pipeline.ainative.studio/api/v1/stages \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"pipeline_id": "PIPELINE_ID", "name": "Qualified", "position": 1}'
# 3. Create a deal
curl -X POST https://pipeline.ainative.studio/api/v1/deals \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"pipeline_id": "PIPELINE_ID", "stage_id": "STAGE_ID", "title": "Acme Corp", "value": 15000}'