Pipeline
5 endpoints
/v1/pipeline/dealsList pipeline deals
Returns the paginated list of the account's deals (opportunities) (cursor v2).
Stable sort created_; with updated_ or
updated_, the list is sorted by ascending updated_, broken
by id.
A deal is NOT a separate entity in the database: it is a
client_ row with pipeline_. The set
of exposed fields is intentionally limited to what matters for
the pipeline view (contact details + stage + value). For the full
contact (custom_fields, tags, notes), use GET /.
Filters
?stage_(uuid) — exact match on the pipeline stage. A value that is not a UUID returnsid 400 invalid_(request details.=field stage_).id
Merged contacts
A contact absorbed by a merge no longer appears in the list: its history lives in the surviving contact, which is the only one listed.
No single GET
No GET / endpoint is exposed — to
retrieve an individual deal, use GET / or
filter this list by ?stage_.
pipeline:readQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | null | optional | Opaque pagination cursor: pass the pagination. value from the previous page. |
limit | integer | optional | Maximum number of results per page (default 20, max 100). Above that → 400 invalid_request. |
created_after | string | optional | Filter: only resources created after this date (inclusive). |
created_before | string | optional | Filter: only resources created before this date (inclusive). |
updated_after | string | optional | Filter: only resources modified after this date (inclusive). With an updated_ bound, the list
is sorted by ascending updated_ (oldest change first), tie-broken by id. Restart from the
updated_ of the last resource you read, minus 2 minutes: a long write can carry a date
slightly earlier than the end of your read. Drop duplicates by id. A cursor from another sort
is refused (cursor_). A list that leaves archived resources out (bookings,
quotes) returns them in this read with their archived_: that is how a withdrawal is read. |
updated_before | string | optional | Filter: only resources modified before this date (inclusive). Sorts the list like updated_. |
stage_id | string | optional | Exact match on the pipeline stage. |
Responses
| Status | Description |
|---|---|
200 | Paginated list of deals. |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X GET 'https://api.capturia.io/v1/pipeline/deals' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'/v1/pipeline/dealsPlace a contact in the pipeline
Places an existing contact in a pipeline stage (sets
pipeline_). Does not create a contact — contact_ must
already exist and belong to the calling account (otherwise 404 not_,
details. = contact). The same applies to stage_
(404 not_, details. = pipeline_, if the stage does
not belong to the account).
A contact_ that points to a contact absorbed by a merge returns
404 not_: place the surviving contact instead. If the merge is
undone from the dashboard, the contact becomes accessible again under
its ID.
If the contact is already in a stage of the same pipeline, it is moved there. The move goes through the same engine as the dashboard: it appears in the contact's timeline, triggers the stage automations and the webhook, and counts as a human decision (the AI agent stops following up with this lead).
A contact filed in a different pipeline than the target stage's
is not moved: 422 business_ with
details. = other_ (moving a contact between pipelines
is done from the dashboard). An archived contact is not moved
either (details. = contact_), nor is a contact leaving
a won stage whose sale is recorded
(details. = pipeline_: a
manager first confirms the sale correction from the
dashboard).
A disqualified lead does not change stage until its
disqualification is lifted: the request returns
409 lead_. Moving it to a lost stage, or to the
disqualification stage, is still accepted. You reopen the lead from
its contact in the dashboard.
pipeline:writeRequest body
| Property | Type | Required | Description |
|---|---|---|---|
contact_id | string | required | Contact to place in the pipeline. Must belong to the calling account. |
stage_id | string | required | Destination stage. Must belong to the calling account. |
Responses
| Status | Description |
|---|---|
201 | Deal placed in the pipeline. |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
404 | Resource not found.
|
409 | Conflict with the resource's state.
|
413 | The request body exceeds 1 MB (1,048,576 bytes).
|
415 | The
|
422 | Request refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X POST 'https://api.capturia.io/v1/pipeline/deals' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
"stage_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}'/v1/pipeline/deals/{id}Move a deal to another stage
Moves a deal (pipeline_) to a new stage. Only the
stage move is exposed through this endpoint — to change the
deal's other fields (email, deal_value, etc.), use
PATCH /.
Preconditions
- The target deal must exist, belong to the calling account, and have
pipeline_, otherwisestage_ id IS NOT NULL 404 not_(found details.=resource deal). The ID of a contact absorbed by a merge also returns404 not_: move the surviving contact.found - The target stage must belong to the calling account, otherwise
404 not_(found details.=resource pipeline_).stage - The lead must not be disqualified, otherwise
409 lead_. A lost stage or the disqualification stage is still an accepted target; otherwise, reopen the lead from its contact in the dashboard before retrying the request.disqualified - The target stage must belong to the deal's pipeline, and the contact
must not be archived, otherwise
422 business_(rule_ violation details.=reason other_orpipeline contact_).archived - A deal leaving a won stage whose sale is recorded is not
moved:
422 business_(rule_ violation details.=reason pipeline_). A manager first confirms the sale correction from the dashboard.sale_ commission_ review_ required
The move goes through the same engine as the dashboard: it appears in the contact's timeline, triggers the stage automations and the webhook, and counts as a human decision (the AI agent stops following up with this lead).
pipeline:writePath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | required | UUID of the resource. |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
stage_id | string | required | Destination stage. Must belong to the calling account. |
Responses
| Status | Description |
|---|---|
200 | Deal moved to the new stage. |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
404 | Resource not found.
|
409 | Conflict with the resource's state.
|
413 | The request body exceeds 1 MB (1,048,576 bytes).
|
415 | The
|
422 | Request refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X PATCH 'https://api.capturia.io/v1/pipeline/deals/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
}'/v1/pipeline/deals/{id}Remove a deal from the pipeline
Removes the deal from the pipeline by setting pipeline_. The
contact is NOT deleted — it remains accessible via
GET /. To permanently delete the contact,
use DELETE /.
The target deal must exist, belong to the calling account, and have
pipeline_ — otherwise 404 not_
(details. = deal). The ID of a contact absorbed by a merge
also returns 404 not_: remove the surviving contact. If the merge
is undone from the dashboard, the contact becomes accessible again under
its ID. An archived contact stays in its pipeline:
422 business_ (details. = contact_).
A deal in a won stage whose sale is recorded stays there too
(details. = pipeline_): a
manager first confirms the sale correction from the
dashboard.
pipeline:writePath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | required | UUID of the resource. |
Responses
| Status | Description |
|---|---|
200 | Deal removed from the pipeline (the contact is not deleted). |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
404 | Resource not found.
|
422 | Request refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X DELETE 'https://api.capturia.io/v1/pipeline/deals/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'/v1/pipeline/stagesList pipeline stages
Returns the full list of stages across the account's pipelines, sorted
by pipeline (in dashboard order), then by stage_.
Each stage names its pipeline (pipeline.,
pipeline.): an account with several pipelines can have
two stages with the same name. Each stage includes a
contact_ computed in real time (the number of the account's contacts
currently in that stage, excluding archived
and merged contacts — useful for pipeline KPIs). A stage hidden in
the dashboard is still listed, flagged is_.
Non-paginated response
The endpoint returns all of the account's stages in a single call
(usually < 20 per account, max 50). The response format stays
list V2-compatible for integration consistency
(pagination., pagination.,
pagination. and pagination. equal the number of
stages returned).
Read-only
Creating, editing, and reordering stages is done in the
dashboard — no POST/PATCH/DELETE / endpoint
is exposed.
pipeline:readResponses
| Status | Description |
|---|---|
200 | Full list of pipeline stages (non-paginated). |
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X GET 'https://api.capturia.io/v1/pipeline/stages' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'