Sales::Opportunity

List Opportunities

Changed on

List Opportunities

get/workspaces/{workspace_id}/sales/opportunities

Request

Path parameters

workspace_idstring required

Query parameters

afterstring

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

per_pageinteger

Records per page. Defaults to 20; raise it up to 100 for bulk reads. A larger value returns 100 records. Zero, a negative or a non-integer value is a 422. The Link next-page URL keeps the value, so a client following it keeps the page size. More 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": {
      "id": 24359,
      "public_id": "vQxYMj",
      "workspace_id": 4,
      "default_shipping_address_id": null,
      "anonymous": 0,
      "email_address": "jane.doe@example.com",
      "first_name": "Jane",
      "last_name": "Doe",
      "phone_number": "+18005550199",
      "time_zone": "Madrid",
      "uuid": "80b7f903-76cd-4edf-94bf-fc34c13ee654",
      "unsubscribed_at": null,
      "last_notification_email_sent_at": null,
      "email_suppression_reason": null,
      "is_active": true,
      "deleted_at": null,
      "fb_url": null,
      "twitter_url": null,
      "instagram_url": null,
      "linkedin_url": null,
      "website_url": null,
      "created_at": "2026-01-09T15:27:56.647Z",
      "updated_at": "2026-01-09T15:28:08.075Z",
      "tags": [],
      "custom_attributes": {},
      "visits": {
        "first_visit": {
          "uuid": "9f2e8a22-1b65-4414-95f3-5caf0bbd11da",
          "utm_source": "google",
          "utm_medium": "cpc",
          "utm_campaign": "spring_sale",
          "utm_term": "running shoes",
          "utm_content": "ad_variant_a",
          "ip": "192.168.1.1",
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
          "referrer": "https://www.google.com/search?q=example",
          "referring_domain": "google.com",
          "landing_page": "https://example.com/products/shoes",
          "browser": "Chrome",
          "os": "Mac OS X",
          "device_type": "desktop",
          "started_at": "2026-01-09T14:23:45.123Z",
          "created_at": "2026-01-09T14:23:45.123Z",
          "updated_at": "2026-01-09T14:23:45.123Z"
        },
        "last_visit": null,
        "last_visit_with_utm": {
          "uuid": "9f2e8a22-1b65-4414-95f3-5caf0bbd11da",
          "utm_source": "google",
          "utm_medium": "cpc",
          "utm_campaign": "spring_sale",
          "utm_term": "running shoes",
          "utm_content": "ad_variant_a",
          "ip": "192.168.1.1",
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
          "referrer": "https://www.google.com/search?q=example",
          "referring_domain": "google.com",
          "landing_page": "https://example.com/products/shoes",
          "browser": "Chrome",
          "os": "Mac OS X",
          "device_type": "desktop",
          "started_at": "2026-01-09T14:23:45.123Z",
          "created_at": "2026-01-09T14:23:45.123Z",
          "updated_at": "2026-01-09T14:23:45.123Z"
        }
      }
    },
    "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"
      }
    ]
  }
]

Changes

    • info

      added the new optional query request parameter per_page

    • info

      for the path request parameter workspace_id, the type was generalized from integer to string

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      removed from the //// response property allOf list for the response status

    • info

      removed from the //// response property allOf list for the response status

    • info

      removed from the //// response property allOf list for the response status

    • info

      added subschema #2 to the //// response property anyOf list for the response status

    • info

      added subschema #2 to the //// response property anyOf list for the response status

    • info

      added subschema #2 to the //// response property anyOf list for the response status