ClientSphereDocs
API reference/Opportunities

List opportunities

Returns a paginated list of opportunities. Supports filtering by stage, deal size, lead source, and pipeline.

GET
/opportunities

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Query Parameters

pageinteger

Page number

Default: 1
limitinteger

Items per page (max 100)

Default: 20Maximum: 100
searchstring

Search term

stagestring
Value in: "discovery" | "qualification" | "technical_evaluation" | "proposal" | "negotiation" | "closed_won" | "closed_lost"
dealSizestring
Value in: "small" | "medium" | "large" | "enterprise"
leadSourcestring
pipelinestring
Format: "uuid"
curl -X GET "https://clientsphere.io/api/v1/opportunities?page=1&limit=20&search=%3Cstring%3E&stage=discovery&dealSize=small&leadSource=%3Cstring%3E&pipeline=497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: Bearer <token>"

Paginated list of opportunities

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
      "pipelineId": "621ef2b0-ba1d-48e5-89dc-b778e6ed42fd",
      "title": "string",
      "description": "string",
      "value": "50000.00",
      "stage": "discovery",
      "probability": 100,
      "expectedCloseDate": "2019-08-24T14:15:22Z",
      "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
      "leadSource": "string",
      "dealSize": "small",
      "forecastCategory": "pipeline",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 20,
      "totalCount": 137,
      "totalPages": 7
    }
  }
}