v1

latestOpenAPI 3.1.02026-08-06492794.7 KB
Contacts

Search contacts

Search and filter contacts using various criteria

get/contacts/search

Query parameters

querystring
Example:john

Search by email, first name, or last name (prefix match on primary email)

tagstring
Example:vip

Filter by a single tag name

sort'first_name' | 'last_name' | 'email' | 'client_id_number' | 'phone'

Column to sort by

direction'asc' | 'desc'

Sort direction

query_type'and' | 'or'

How to combine advanced filters (used with filters parameter)

type'enum' | 'string' required

Data type - 'enum' for tags/owner, 'string' for text fields

field'tags' | 'owner' | 'phone_number' | 'first_name' | 'last_name' | 'client_id_number' required

Field to filter on

criteria'has_any_of' | 'has_all_of' | 'has_none_of' | 'equals' | 'contains' | 'starts_with' | 'ends_with' | 'does_not_equal' | 'does_not_contain' | 'does_not_start_with' | 'does_not_end_with' required

Filter criteria (depends on field type)

valuestring

Single value for string/phone_number filters

Advanced filtering array. Each filter has type, field, criteria, and value/values. NOTE: Swagger UI generates filters[0][field]=tags format. Manually change [0] to [] for Rails: filters[][field]=tags For enum fields (tags, owner): filters[][type]=enum&filters[][field]=tags&filters[][criteria]=has_any_of&filters[][values][]=tag1 For string fields: filters[][type]=string&filters[][field]=first_name&filters[][criteria]=starts_with&filters[][value]=John

[
  {
    "type": "enum",
    "field": "tags",
    "criteria": "has_any_of",
    "values": [
      "vip",
      "active"
    ]
  },
  {
    "type": "string",
    "field": "first_name",
    "criteria": "starts_with",
    "value": "John"
  }
]

Response

Successful response with filtered contacts

dataobject[]