APIOpportunities

Search opportunities

Returns opportunities matching filters on default and custom fields, with the total match count. Optionally pass `query` to describe the search in natural language; that consumes credits, including for keys with `read` access.

POST
/v1/records/opportunities/search

Returns opportunities matching filters on default and custom fields, with the total match count. Optionally pass query to describe the search in natural language; that consumes credits, including for keys with read access.

X-Api-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/records/opportunities/search" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": [
    {
      "opportunity_name": "Acme Corp Enterprise Deal",
      "account_id": "550e8400-e29b-41d4-a716-446655440000",
      "tags": [
        "enterprise",
        "q2"
      ],
      "amount": 50000,
      "close_date": "2026-06-30",
      "stage_id": "550e8400-e29b-41d4-a716-446655440001",
      "pipeline": "Sales Pipeline",
      "custom_fields": {
        "property1": "string",
        "property2": "string"
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "crm_id": "123456",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "limit": 0,
    "offset": 0,
    "total": 0
  },
  "interpretation": {
    "explanation": "string",
    "filters": [
      {
        "field": "string",
        "operator": "string",
        "value": "string"
      }
    ],
    "or_filters": [
      [
        {
          "field": "string",
          "operator": "string",
          "value": "string"
        }
      ]
    ],
    "uses_related_records": true
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty
{
  "error": "string"
}
Empty
{
  "error": "string"
}
{
  "error": "string"
}