v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Sales::Opportunity

List Opportunities

List Opportunities

get/workspaces/{workspace_id}/sales/opportunities

Path parameters

workspace_idinteger required

Query parameters

afterstring

ID of item after which the collection should be returned. More examples and info about pagination in our guides.

sort_order'asc' | 'desc'

Sort order of a list response. Use 'desc' to reverse the default 'asc' (ascending) sort order. Examples in our guides.

sort_property'id' | 'updated_at' | 'sort_order'

Sort property of a list response. The default is id and thus the created_at order. If you sort by other properties, we additionally sort by id implicitly as a secondary sort property, so that you can rely on the sort order to be deterministic even if the main sort property ends up with the same values.

idstring

A comma-separated list of opportunity IDs to filter by.

pipeline_idstring

A comma-separated list of pipeline IDs to filter by.

pipelines_stage_idstring

A comma-separated list of pipelines stage IDs to filter by.

primary_contact_idstring

A comma-separated list of primary contact IDs to filter by.

assignee_idstring

A comma-separated list of assignee memberships IDs to filter by.

Filter by available properties in query params, like this: api/v2/resources?filter[id]=value&filter[another_property]=value1,value2. Check our Filtering guide for examples and all about filtering here.

{
  "id": "1,42",
  "pipeline_id": "1,42",
  "pipelines_stage_id": "1,42",
  "primary_contact_id": "1,42",
  "assignee_id": "1,42"
}

Response

OK

idinteger

Opportunity ID

public_idstring nullable

Opportunity public ID

namestring

Name

workspace_idinteger

Workspace ID

pipeline_idstring nullable

Pipeline ID

pipelines_stage_idinteger

Pipeline Stage

primary_contact_idinteger

Primary Contact

valuenumber nullable

The potential value of this opportunity in the default currency of the workspace

sort_orderinteger nullable

The position of the opportunity in its pipeline stage

closed_atstring date-time nullable

Close date

created_atstring date-time nullable

Added

updated_atstring date-time nullable

Updated

assignee_idstring nullable

The ID of the Team-Membership to whom the opportunity is assigned.

Example response

[
  {
    "id": 17,
    "public_id": "eMKZhP",
    "name": "Example Opportunity",
    "workspace_id": 42000,
    "pipeline_id": null,
    "pipelines_stage_id": 42,
    "primary_contact_id": 26,
    "value": "100.0",
    "sort_order": 0,
    "closed_at": "2025-01-01T00:00:00.000Z",
    "created_at": "2025-01-01T00:00:00.000Z",
    "updated_at": "2025-01-01T00:00:00.000Z",
    "pipeline": {
      "id": 3,
      "public_id": "KIaXjp",
      "name": "Example Pipeline"
    },
    "pipelines_stage": {
      "id": 42,
      "public_id": "rebCDY",
      "name": "Example Stage"
    },
    "primary_contact": {
      "$ref": "#/components/schemas/ContactBaseAttributes/example"
    },
    "assignee_id": null,
    "notes": [
      {
        "id": 33,
        "public_id": "TNibqR",
        "content": "Example note",
        "created_by_id": 37,
        "created_at": "2025-01-01T00:00:00.000Z",
        "updated_at": "2025-01-01T00:00:00.000Z"
      },
      {
        "id": 34,
        "public_id": "jrHtbW",
        "content": "Example note",
        "created_by_id": 38,
        "created_at": "2025-01-01T00:00:00.000Z",
        "updated_at": "2025-01-01T00:00:00.000Z"
      }
    ]
  }
]