Skip to main content
POST
/
v1
/
deals
/
search
Search deals
curl --request POST \
  --url https://api.stardex.ai/v1/deals/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "offset": 0,
  "limit": 100,
  "sort_by": "<string>",
  "sort_order": "desc",
  "keywords": [
    "<string>"
  ],
  "deal_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deal_status_ids_included": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "deal_status_ids_excluded": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "owner_ids_included": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "owner_ids_excluded": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "show_open_deals_only": true,
  "show_archived": true,
  "closed_date_filter": {
    "start_date": "<string>",
    "end_date": "<string>",
    "include_empty": false
  },
  "open_date_filter": {
    "start_date": "<string>",
    "end_date": "<string>",
    "include_empty": false
  },
  "select_attribute_filters": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "values": [],
      "excluded_values": [],
      "require_all": false,
      "include_empty": false
    }
  ],
  "numeric_attribute_filters": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "min": 123,
      "max": 123,
      "include_empty": false
    }
  ],
  "date_attribute_filters": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "start_date": "<string>",
      "end_date": "<string>",
      "include_empty": false
    }
  ],
  "team_member_attribute_filters": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "values": [],
      "excluded_values": [],
      "require_all": false,
      "include_empty": false
    }
  ],
  "include": [
    "custom_fields"
  ]
}
'
{
  "success": true,
  "data": [
    {
      "id": "aaa11111-bbbb-cccc-dddd-eeeeeeee1111",
      "name": "Acme Corp Staffing Agreement",
      "amount": 150000,
      "win_probability": 75,
      "closed_date": "2024-06-30T00:00:00Z",
      "last_contacted_at": "2024-05-20T14:30:00Z",
      "deal_status": {
        "id": "ccc33333-dddd-eeee-ffff-000000003333",
        "name": "Proposal Sent"
      },
      "created_at": "2024-01-15T10:00:00Z",
      "client_name": "Acme Corp",
      "client_id": "bbb22222-cccc-dddd-eeee-ffffffff2222",
      "owners": [
        {
          "id": "ddd44444-eeee-ffff-0000-111111114444",
          "name": "Jane Smith"
        }
      ],
      "custom_fields": [
        {
          "attribute_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
          "attribute_name": "Deal Priority",
          "data_type": "single-select",
          "value": null,
          "tag": {
            "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "name": "High"
          },
          "team_member": null
        }
      ]
    }
  ],
  "meta": {
    "total": 100,
    "offset": 0,
    "limit": 20
  }
}

Authorizations

Authorization
string
header
required

Authenticate with a Bearer token: API key, OAuth token, or session token.

Body

application/json
offset
integer
default:0

Records to skip for pagination. Defaults to 0.

Required range: x >= 0
limit
integer
default:100

Max records to return (1–100). Defaults to 100.

Required range: 1 <= x <= 100
sort_by
string

Column to sort by. Accepted values:

  • name — deal name (alphabetical)
  • amount — deal monetary amount
  • win_probability — win probability percentage
  • company — client company name (alphabetical)
  • status — deal status (by stage order)
  • closed_date — expected or actual close date
  • last_contacted_at — most recent engagement with client contacts
  • created_at — creation timestamp (default)
  • custom_<attribute_id> — any custom attribute UUID prefixed with custom_ (e.g. custom_e5f6a7b8-...). Sorts by the attribute's decimal, date, string, or tag value.
sort_order
enum<string>
default:desc

Sort direction. Defaults to desc (newest first).

Available options:
asc,
desc
keywords
string[]

Full-text search across deal name, client company name, and domain. Multiple keywords use OR logic.

deal_ids
string<uuid>[]

Pre-filter to a specific set of deal UUIDs.

list_id
string<uuid>

Filter to deals belonging to this list.

deal_status_ids_included
string<uuid>[]

Include only deals with these status UUIDs.

deal_status_ids_excluded
string<uuid>[]

Exclude deals with these status UUIDs.

owner_ids_included
string<uuid>[]

Include only deals owned by these team members. Get IDs from GET /v1/team-members.

owner_ids_excluded
string<uuid>[]

Exclude deals owned by these team members.

show_open_deals_only
boolean

When true, only return deals with an "active" status type.

show_archived
boolean

When true, return archived (soft-deleted) deals instead of active ones.

closed_date_filter
object

Filter by closed_date range. Supports start_date, end_date, and include_empty.

open_date_filter
object

Filter by creation date (open date) range. Supports start_date, end_date, and include_empty.

select_attribute_filters
object[]

Filter by select/multi-select custom fields. Get attribute_id and tag IDs from GET /v1/custom-fields/deals.

numeric_attribute_filters
object[]

Filter by numeric custom fields (min/max range). Get attribute_id from GET /v1/custom-fields/deals.

date_attribute_filters
object[]

Filter by date custom fields (date range). Get attribute_id from GET /v1/custom-fields/deals.

team_member_attribute_filters
object[]

Filter by team-member custom fields. Get attribute_id from GET /v1/custom-fields/deals.

include
enum<string>[]

Extra sections to embed. Values: custom_fields. Omit for base fields only.

Available options:
custom_fields

Response

Successful search response

success
enum<boolean>
required
Available options:
true
data
object[]
required
meta
object
required