Capturia measures its ads and site traffic with the Meta pixel and Google Analytics. You can decline at any time. Learn more

FR

Pipeline

5 endpoints

get/v1/pipeline/deals

List pipeline deals

Returns the paginated list of the account's deals (opportunities) (cursor v2). Stable sort created_at DESC, id DESC; with updated_after or updated_before, the list is sorted by ascending updated_at, broken by id.

A deal is NOT a separate entity in the database: it is a client_contacts row with pipeline_stage_id IS NOT NULL. 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 /v1/contacts/{id}.

Filters

  • ?stage_id (uuid) — exact match on the pipeline stage. A value that is not a UUID returns 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 /v1/pipeline/deals/{id} endpoint is exposed — to retrieve an individual deal, use GET /v1/contacts/{id} or filter this list by ?stage_id.

Required scopes: pipeline:read

Query parameters

NameTypeRequiredDescription
cursorstring | nulloptionalOpaque pagination cursor: pass the pagination.next_cursor value from the previous page.
limitintegeroptionalMaximum number of results per page (default 20, max 100). Above that → 400 invalid_request.
created_afterstringoptionalFilter: only resources created after this date (inclusive).
created_beforestringoptionalFilter: only resources created before this date (inclusive).
updated_afterstringoptionalFilter: only resources modified after this date (inclusive). With an updated_* bound, the list is sorted by ascending updated_at (oldest change first), tie-broken by id. Restart from the updated_at 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_field_mismatch). A list that leaves archived resources out (bookings, quotes) returns them in this read with their archived_at: that is how a withdrawal is read.
updated_beforestringoptionalFilter: only resources modified before this date (inclusive). Sorts the list like updated_after.
stage_idstringoptionalExact match on the pipeline stage.

Responses

StatusDescription
200

Paginated list of deals.

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one.

invalid_requestlimit · exceeds_max
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "limit",
      "reason": "exceeds_max",
      "max": 100
    }
  }
}
invalid_requestupdated_after · invalid_value
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "updated_after",
      "reason": "invalid_value"
    }
  }
}
invalid_requestcursor · cursor_field_mismatch
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "cursor",
      "reason": "cursor_field_mismatch"
    }
  }
}
invalid_requestcursor · cursor_invalid_format
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "cursor",
      "reason": "cursor_invalid_format"
    }
  }
}
invalid_requeststage_id · invalid_format
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "stage_id",
      "reason": "invalid_format"
    }
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_available
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `pipeline:read` scope. Create a new key with the \"Read only\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "pipeline:read",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_only"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
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 Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X GET 'https://api.capturia.io/v1/pipeline/deals' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'
post/v1/pipeline/deals

Place a contact in the pipeline

Places an existing contact in a pipeline stage (sets pipeline_stage_id). Does not create a contact — contact_id must already exist and belong to the calling account (otherwise 404 not_found, details.resource = contact). The same applies to stage_id (404 not_found, details.resource = pipeline_stage, if the stage does not belong to the account).

A contact_id that points to a contact absorbed by a merge returns 404 not_found: 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_rule_violation with details.reason = other_pipeline (moving a contact between pipelines is done from the dashboard). An archived contact is not moved either (details.reason = contact_archived), nor is a contact leaving a won stage whose sale is recorded (details.reason = pipeline_sale_commission_review_required: 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_disqualified. Moving it to a lost stage, or to the disqualification stage, is still accepted. You reopen the lead from its contact in the dashboard.

Required scopes: pipeline:write

Request body

PropertyTypeRequiredDescription
contact_idstringrequiredContact to place in the pipeline. Must belong to the calling account.
stage_idstringrequiredDestination stage. Must belong to the calling account.

Responses

StatusDescription
201

Deal placed in the pipeline.

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one.

invalid_request
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_encoding
{
  "error": {
    "type": "validation_error",
    "code": "invalid_encoding",
    "message": "Request encoding must be UTF-8.",
    "hint": "Use Content-Type: application/json; charset=utf-8.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#encoding",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_json
{
  "error": {
    "type": "validation_error",
    "code": "invalid_json",
    "message": "The request body is not valid JSON.",
    "hint": "Check the JSON syntax (quotes, commas, braces) and its UTF-8 encoding.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_json",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_body
{
  "error": {
    "type": "validation_error",
    "code": "invalid_body",
    "message": "The request body must be a JSON object.",
    "hint": "Send an object (`{ ... }`): this endpoint accepts no array, string or number.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_body",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
validation_errorcontact_id · required
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "contact_id",
        "reason": "required"
      }
    ]
  }
}
validation_errorstage_id · invalid_format
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "stage_id",
        "reason": "invalid_format"
      }
    ]
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_available
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `pipeline:write` scope. Create a new key with the \"Read + write\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "pipeline:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
404

Resource not found. details.resource names what is missing: contact (the contact does not exist, belongs to another account, or was absorbed by a merge) or pipeline_stage (the stage does not belong to the account). The stage is checked before the contact.

not_foundcontact
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "The requested resource was not found.",
    "hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "resource": "contact"
    }
  }
}
not_foundpipeline_stage
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "The requested resource was not found.",
    "hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "resource": "pipeline_stage"
    }
  }
}
409

Conflict with the resource's state. code tells apart the refusals the operation returns under this status, and each example shows one.

lead_disqualified
{
  "error": {
    "type": "conflict_error",
    "code": "lead_disqualified",
    "message": "This lead is disqualified: it must be reopened before changing stage.",
    "hint": "Reopen the lead from its record in the dashboard, then retry the request. A lost stage or a disqualification stage is still accepted without reopening.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#lead_disqualified",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
413

The request body exceeds 1 MB (1,048,576 bytes). details.max_bytes gives the limit, and details.received_bytes the size announced by Content-Length when the request declares it.

payload_too_large
{
  "error": {
    "type": "validation_error",
    "code": "payload_too_large",
    "message": "Request body exceeds the 1 MB limit.",
    "hint": "Split your request into smaller batches.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#body-size",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "max_bytes": 1048576,
      "received_bytes": 1572864
    }
  }
}
415

The Content-Type header is missing, or isn't application/json.

invalid_content_type
{
  "error": {
    "type": "validation_error",
    "code": "invalid_content_type",
    "message": "Unsupported Content-Type.",
    "hint": "Send Content-Type: application/json on POST/PUT/PATCH requests.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#content-type",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
422

Request refused. business_rule_violation: the contact did not move, and details.reason says why. other_pipeline: the contact is filed in a different pipeline than the target stage's; moving a contact between pipelines is done from the dashboard. contact_archived: the contact is archived. pipeline_sale_commission_review_required: the contact is leaving a won stage whose sale is recorded; a manager first confirms the sale and commission correction from the dashboard. not_moved: the move was not confirmed; read the contact again before retrying the request.

business_rule_violationother_pipeline
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "other_pipeline",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
business_rule_violationcontact_archived
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "contact_archived",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
business_rule_violationpipeline_sale_commission_review_required
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "pipeline_sale_commission_review_required"
    }
  }
}
business_rule_violationnot_moved
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "not_moved",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
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 Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

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"
}'
patch/v1/pipeline/deals/{id}

Move a deal to another stage

Moves a deal (pipeline_stage_id) 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 /v1/contacts/{id}.

Preconditions

  • The target deal must exist, belong to the calling account, and have pipeline_stage_id IS NOT NULL, otherwise 404 not_found (details.resource = deal). The ID of a contact absorbed by a merge also returns 404 not_found: move the surviving contact.
  • 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_disqualified. 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.
  • 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_pipeline or contact_archived).
  • A deal leaving a won stage whose sale is recorded is not moved: 422 business_rule_violation (details.reason = pipeline_sale_commission_review_required). A manager first confirms the sale correction from the dashboard.

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).

Required scopes: pipeline:write

Path parameters

NameTypeRequiredDescription
idstringrequiredUUID of the resource.

Request body

PropertyTypeRequiredDescription
stage_idstringrequiredDestination stage. Must belong to the calling account.

Responses

StatusDescription
200

Deal moved to the new stage.

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one.

invalid_request
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_encoding
{
  "error": {
    "type": "validation_error",
    "code": "invalid_encoding",
    "message": "Request encoding must be UTF-8.",
    "hint": "Use Content-Type: application/json; charset=utf-8.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#encoding",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_json
{
  "error": {
    "type": "validation_error",
    "code": "invalid_json",
    "message": "The request body is not valid JSON.",
    "hint": "Check the JSON syntax (quotes, commas, braces) and its UTF-8 encoding.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_json",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_body
{
  "error": {
    "type": "validation_error",
    "code": "invalid_body",
    "message": "The request body must be a JSON object.",
    "hint": "Send an object (`{ ... }`): this endpoint accepts no array, string or number.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_body",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
validation_errorstage_id · required
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "stage_id",
        "reason": "required"
      }
    ]
  }
}
validation_errorid · invalid_format
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "id",
        "reason": "invalid_format"
      }
    ]
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_available
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `pipeline:write` scope. Create a new key with the \"Read + write\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "pipeline:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
404

Resource not found. details.resource names what is missing: deal (the deal does not exist, is in no stage, belongs to another account, or was absorbed by a merge) or pipeline_stage (the stage does not belong to the account).

not_founddeal
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "The requested resource was not found.",
    "hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "resource": "deal"
    }
  }
}
not_foundpipeline_stage
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "The requested resource was not found.",
    "hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "resource": "pipeline_stage"
    }
  }
}
409

Conflict with the resource's state. code tells apart the refusals the operation returns under this status, and each example shows one.

lead_disqualified
{
  "error": {
    "type": "conflict_error",
    "code": "lead_disqualified",
    "message": "This lead is disqualified: it must be reopened before changing stage.",
    "hint": "Reopen the lead from its record in the dashboard, then retry the request. A lost stage or a disqualification stage is still accepted without reopening.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#lead_disqualified",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
413

The request body exceeds 1 MB (1,048,576 bytes). details.max_bytes gives the limit, and details.received_bytes the size announced by Content-Length when the request declares it.

payload_too_large
{
  "error": {
    "type": "validation_error",
    "code": "payload_too_large",
    "message": "Request body exceeds the 1 MB limit.",
    "hint": "Split your request into smaller batches.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#body-size",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "max_bytes": 1048576,
      "received_bytes": 1572864
    }
  }
}
415

The Content-Type header is missing, or isn't application/json.

invalid_content_type
{
  "error": {
    "type": "validation_error",
    "code": "invalid_content_type",
    "message": "Unsupported Content-Type.",
    "hint": "Send Content-Type: application/json on POST/PUT/PATCH requests.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#content-type",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
422

Request refused. business_rule_violation: the contact did not move, and details.reason says why. other_pipeline: the contact is filed in a different pipeline than the target stage's; moving a contact between pipelines is done from the dashboard. contact_archived: the contact is archived. pipeline_sale_commission_review_required: the contact is leaving a won stage whose sale is recorded; a manager first confirms the sale and commission correction from the dashboard. not_moved: the move was not confirmed; read the contact again before retrying the request.

business_rule_violationother_pipeline
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "other_pipeline",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
business_rule_violationcontact_archived
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "contact_archived",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
business_rule_violationpipeline_sale_commission_review_required
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "pipeline_sale_commission_review_required"
    }
  }
}
business_rule_violationnot_moved
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "not_moved",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
      "stage_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
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 Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

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"
}'
delete/v1/pipeline/deals/{id}

Remove a deal from the pipeline

Removes the deal from the pipeline by setting pipeline_stage_id = NULL. The contact is NOT deleted — it remains accessible via GET /v1/contacts/{id}. To permanently delete the contact, use DELETE /v1/contacts/{id}.

The target deal must exist, belong to the calling account, and have pipeline_stage_id IS NOT NULL — otherwise 404 not_found (details.resource = deal). The ID of a contact absorbed by a merge also returns 404 not_found: 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_rule_violation (details.reason = contact_archived). A deal in a won stage whose sale is recorded stays there too (details.reason = pipeline_sale_commission_review_required): a manager first confirms the sale correction from the dashboard.

Required scopes: pipeline:write

Path parameters

NameTypeRequiredDescription
idstringrequiredUUID of the resource.

Responses

StatusDescription
200

Deal removed from the pipeline (the contact is not deleted).

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one.

validation_error
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "id",
        "reason": "invalid_format"
      }
    ]
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_available
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `pipeline:write` scope. Create a new key with the \"Read + write\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "pipeline:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
404

Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one.

not_found
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "The requested resource was not found.",
    "hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "resource": "deal"
    }
  }
}
422

Request refused. business_rule_violation: the deal stays in its pipeline, and details.reason says why. contact_archived: the contact is archived. pipeline_sale_commission_review_required: the deal is in a won stage whose sale is recorded; a manager first confirms the sale and commission correction from the dashboard. not_moved: the removal was not confirmed; read the contact again before retrying the request.

business_rule_violationcontact_archived
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "contact_archived",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3"
    }
  }
}
business_rule_violationpipeline_sale_commission_review_required
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "pipeline_sale_commission_review_required"
    }
  }
}
business_rule_violationnot_moved
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "not_moved",
      "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
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 Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

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'
get/v1/pipeline/stages

List pipeline stages

Returns the full list of stages across the account's pipelines, sorted by pipeline (in dashboard order), then by stage_order ASC. Each stage names its pipeline (pipeline.name, pipeline.is_default): an account with several pipelines can have two stages with the same name. Each stage includes a contact_count 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_hidden.

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.next_cursor=null, pagination.has_more=false, pagination.limit and pagination.total_count equal the number of stages returned).

Read-only

Creating, editing, and reordering stages is done in the dashboard — no POST/PATCH/DELETE /v1/pipeline/stages endpoint is exposed.

Required scopes: pipeline:read

Responses

StatusDescription
200

Full list of pipeline stages (non-paginated).

401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_available
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `pipeline:read` scope. Create a new key with the \"Read only\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "pipeline:read",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_only"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
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 Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X GET 'https://api.capturia.io/v1/pipeline/stages' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'