Skip to main content
POST
/
v2
/
persons
/
search
curl --request POST \
  --url https://api.affinity.co/v2/persons/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": {
    "operator": "and",
    "filters": [
      {
        "fieldId": "field-4574182",
        "valueType": "dropdown",
        "operator": "is-any-of",
        "value": [
          {
            "dropdownOptionId": 1
          },
          {
            "dropdownOptionId": 2
          }
        ]
      }
    ]
  }
}
'
{
  "data": [
    {
      "id": 1,
      "firstName": "Jane",
      "lastName": "Smith",
      "primaryEmailAddress": "jane.smith@northpointvc.com",
      "emailAddresses": [
        "jane.smith@northpointvc.com"
      ],
      "type": "internal",
      "fields": []
    },
    {
      "id": 2,
      "firstName": "Michael",
      "lastName": "Torres",
      "primaryEmailAddress": "m.torres@northpointvc.com",
      "emailAddresses": [
        "m.torres@northpointvc.com"
      ],
      "type": "external",
      "fields": []
    }
  ],
  "pagination": {
    "prevUrl": "https://api.affinity.co/v2/persons?cursor=ICAgICAgYmVmb3JlOjo6Nw",
    "nextUrl": "https://api.affinity.co/v2/persons?cursor=ICAgICAgIGFmdGVyOjo6NA"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fieldIds
string[]

Specific field IDs for which to return field data on each Person. Cannot be used together with fieldTypes; use one or the other. Use GET /v2/persons/fields to discover available field IDs.

fieldTypes
enum<string>[]

A category of fields for which to return field data on each Person. Cannot be used together with fieldIds; use one or the other.

Available options:
enriched,
global,
relationship-intelligence
cursor
string

Cursor for the next or previous page.

limit
integer<int32>
default:100

Maximum number of Persons to return per page.

Required range: 1 <= x <= 100
totalCount
boolean
default:false

When true, includes the total count of matching Persons in the pagination response. Adds additional query cost; use only when needed.

Body

application/json

Search criteria for filtering, sorting, and searching. All fields are optional — omitting the body returns all results with default pagination.

filters
FilterGroup · object

A tree of filter conditions to apply. Supports nested AND/OR grouping. Use the relevant fields endpoint for your resource type to discover available fields, their valueType, and supported operators.

sorts
SearchSort · object[]

One or more sort criteria, applied in order. Supports up to 5 sort items. Use the relevant fields endpoint for your resource type to discover sortable fields.

Required array length: 1 - 5 elements

An optional keyword to match against field values. Results must satisfy both the search term AND any provided filters (intersection). Only one search object may be provided. When fieldIds is omitted, the term is matched against the entity name, primary domain (companies), primary email address (persons), or opportunity name.

Response

Created

PersonPaged model

data
Person · object[]
required

A page of Person results

Maximum array length: 100
pagination
Pagination · object
required