---
title: "Search contacts"
method: POST
path: "/contacts/search"
tags: ["Contacts"]
---

# Search contacts

`POST /contacts/search`

## Request

- Base URL: `https://api.loopify.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.loopify.com/contacts/search`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.loopify.com/connect/authorize`, token URL `https://auth.loopify.com/token`, scopes: `ContactDataManagement`, `ReadContacts`, `AccountAPIKey`)

#### Auth policies: ContactDataManagement,ReadContacts,AccountAPIKey 

 The projection field can be used to limit the fields returned (ie. {firstName:1, email:1})
If an array of contactIds are supplied in the payload, the segment search will not be executed.

## Query parameters

- `pageSize` integer
- `pageIndex` integer

## Request body

- ContactSearchParameters
  - `contactIds` string[], nullable
  - `segment` SegmentSearch
    - `filterGroups` FilterGroup[], nullable
      - `index` integer
      - `type` 'contact' | 'event' | 'custom-event' | 'event-booking' | 'job-data' | 'event-booking-v2' | 'data-collection': Allowed values: contact,event,custom-event,event-booking,job-data,event-booking-v2,data-collection
      - `conjunction` 'AND' | 'OR': Allowed values: AND,OR
      - `joinType` 'some' | 'all': Allowed values: some,all
      - `filters` Filter[], nullable
        - `index` integer
        - `source` string, nullable
        - `sourceType` 'number' | 'string' | 'date' | 'array' | 'object' | 'transaction' | 'boolean' | 'nullable boolean' | 'sum' | 'count' | 'event booking session' | 'date age' | 'datetime': Allowed values: number,string,date,array,object,transaction,boolean,nullable boolean,sum,count,event booking session,date age,datetime
        - `comperator` 'contains' | 'does not contain' | 'is equal to' | 'is not equal to' | 'begins with' | 'ends with' | 'is greater than' | 'is less than' | 'is greater than or equal to' | 'is less than or equal to' | 'is empty' | 'is not empty' | 'matches' | 'is before' | 'is after' | 'occurred in the last' | 'occurred before the last' | 'occurs within the next' | 'recurs yearly today' | 'is set' | 'is not set' | 'contains specific' | 'does not contain specific' | 'has changed in' | 'has not changed in' | 'was updated after' | 'has opened' | 'has not opened' | 'has clicked' | 'has not clicked' | 'has filed form' | 'has not filed form' | 'has received' | 'has not received' | 'recurs yearly in' | 'occurs in' | 'is true' | 'is false' | 'is not true' | 'has unsubscribed' | 'has bounced' | 'has hardbounced' | 'has softbounced' | 'is not false' | 'has occurred' | 'has not occurred' | 'occurs today' | 'occurred' | 'is guest' | 'has been' | 'campaign member' | 'up to turning' | 'from turning' | 'turning' | 'in time range' | 'has flow block executed' | 'has flow block executed true' | 'has flow block executed false' | 'has flow block executed error' | 'has flow job created' | 'has flow job queued' | 'is one of' | 'is none of': Allowed values: contains,does not contain,is equal to,is not equal to,begins with,ends with,is greater than,is less than,is greater than or equal to,is less than or equal to,is empty,is not empty,matches,is before,is after,occurred in the last,occurred before the last,occurs within the next,recurs yearly today,is set,is not set,contains specific,does not contain specific,has changed in,has not changed in,was updated after,has opened,has not opened,has clicked,has not clicked,has filed form,has not filed form,has received,has not received,recurs yearly in,occurs in,is true,is false,is not true,has unsubscribed,has bounced,has hardbounced,has softbounced,is not false,has occurred,has not occurred,occurs today,occurred,is guest,has been,campaign member,up to turning,from turning,turning,in time range,has flow block executed,has flow block executed true,has flow block executed false,has flow block executed error,has flow job created,has flow job queued,is one of,is none of
        - `patternType` 'date' | 'date offset' | 'number' | 'string' | 'regex' | 'path': Allowed values: date,date offset,number,string,regex,path
        - `pattern` string, nullable: Scalar filter text, or JSON-encoded string array for V2 set comparators.
      - `showAll` boolean
      - `excludeEventResult` boolean: Only used if type is event or custom-event
    - `includeStatements` FilterGroup[], nullable
      - `index` integer
      - `type` 'contact' | 'event' | 'custom-event' | 'event-booking' | 'job-data' | 'event-booking-v2' | 'data-collection': Allowed values: contact,event,custom-event,event-booking,job-data,event-booking-v2,data-collection
      - `conjunction` 'AND' | 'OR': Allowed values: AND,OR
      - `joinType` 'some' | 'all': Allowed values: some,all
      - `filters` Filter[], nullable
        - `index` integer
        - `source` string, nullable
        - `sourceType` 'number' | 'string' | 'date' | 'array' | 'object' | 'transaction' | 'boolean' | 'nullable boolean' | 'sum' | 'count' | 'event booking session' | 'date age' | 'datetime': Allowed values: number,string,date,array,object,transaction,boolean,nullable boolean,sum,count,event booking session,date age,datetime
        - `comperator` 'contains' | 'does not contain' | 'is equal to' | 'is not equal to' | 'begins with' | 'ends with' | 'is greater than' | 'is less than' | 'is greater than or equal to' | 'is less than or equal to' | 'is empty' | 'is not empty' | 'matches' | 'is before' | 'is after' | 'occurred in the last' | 'occurred before the last' | 'occurs within the next' | 'recurs yearly today' | 'is set' | 'is not set' | 'contains specific' | 'does not contain specific' | 'has changed in' | 'has not changed in' | 'was updated after' | 'has opened' | 'has not opened' | 'has clicked' | 'has not clicked' | 'has filed form' | 'has not filed form' | 'has received' | 'has not received' | 'recurs yearly in' | 'occurs in' | 'is true' | 'is false' | 'is not true' | 'has unsubscribed' | 'has bounced' | 'has hardbounced' | 'has softbounced' | 'is not false' | 'has occurred' | 'has not occurred' | 'occurs today' | 'occurred' | 'is guest' | 'has been' | 'campaign member' | 'up to turning' | 'from turning' | 'turning' | 'in time range' | 'has flow block executed' | 'has flow block executed true' | 'has flow block executed false' | 'has flow block executed error' | 'has flow job created' | 'has flow job queued' | 'is one of' | 'is none of': Allowed values: contains,does not contain,is equal to,is not equal to,begins with,ends with,is greater than,is less than,is greater than or equal to,is less than or equal to,is empty,is not empty,matches,is before,is after,occurred in the last,occurred before the last,occurs within the next,recurs yearly today,is set,is not set,contains specific,does not contain specific,has changed in,has not changed in,was updated after,has opened,has not opened,has clicked,has not clicked,has filed form,has not filed form,has received,has not received,recurs yearly in,occurs in,is true,is false,is not true,has unsubscribed,has bounced,has hardbounced,has softbounced,is not false,has occurred,has not occurred,occurs today,occurred,is guest,has been,campaign member,up to turning,from turning,turning,in time range,has flow block executed,has flow block executed true,has flow block executed false,has flow block executed error,has flow job created,has flow job queued,is one of,is none of
        - `patternType` 'date' | 'date offset' | 'number' | 'string' | 'regex' | 'path': Allowed values: date,date offset,number,string,regex,path
        - `pattern` string, nullable: Scalar filter text, or JSON-encoded string array for V2 set comparators.
      - `showAll` boolean
      - `excludeEventResult` boolean: Only used if type is event or custom-event
    - `conjunction` 'AND' | 'OR': Allowed values: AND,OR
    - `excludeStatements` FilterGroup[], nullable
      - `index` integer
      - `type` 'contact' | 'event' | 'custom-event' | 'event-booking' | 'job-data' | 'event-booking-v2' | 'data-collection': Allowed values: contact,event,custom-event,event-booking,job-data,event-booking-v2,data-collection
      - `conjunction` 'AND' | 'OR': Allowed values: AND,OR
      - `joinType` 'some' | 'all': Allowed values: some,all
      - `filters` Filter[], nullable
        - `index` integer
        - `source` string, nullable
        - `sourceType` 'number' | 'string' | 'date' | 'array' | 'object' | 'transaction' | 'boolean' | 'nullable boolean' | 'sum' | 'count' | 'event booking session' | 'date age' | 'datetime': Allowed values: number,string,date,array,object,transaction,boolean,nullable boolean,sum,count,event booking session,date age,datetime
        - `comperator` 'contains' | 'does not contain' | 'is equal to' | 'is not equal to' | 'begins with' | 'ends with' | 'is greater than' | 'is less than' | 'is greater than or equal to' | 'is less than or equal to' | 'is empty' | 'is not empty' | 'matches' | 'is before' | 'is after' | 'occurred in the last' | 'occurred before the last' | 'occurs within the next' | 'recurs yearly today' | 'is set' | 'is not set' | 'contains specific' | 'does not contain specific' | 'has changed in' | 'has not changed in' | 'was updated after' | 'has opened' | 'has not opened' | 'has clicked' | 'has not clicked' | 'has filed form' | 'has not filed form' | 'has received' | 'has not received' | 'recurs yearly in' | 'occurs in' | 'is true' | 'is false' | 'is not true' | 'has unsubscribed' | 'has bounced' | 'has hardbounced' | 'has softbounced' | 'is not false' | 'has occurred' | 'has not occurred' | 'occurs today' | 'occurred' | 'is guest' | 'has been' | 'campaign member' | 'up to turning' | 'from turning' | 'turning' | 'in time range' | 'has flow block executed' | 'has flow block executed true' | 'has flow block executed false' | 'has flow block executed error' | 'has flow job created' | 'has flow job queued' | 'is one of' | 'is none of': Allowed values: contains,does not contain,is equal to,is not equal to,begins with,ends with,is greater than,is less than,is greater than or equal to,is less than or equal to,is empty,is not empty,matches,is before,is after,occurred in the last,occurred before the last,occurs within the next,recurs yearly today,is set,is not set,contains specific,does not contain specific,has changed in,has not changed in,was updated after,has opened,has not opened,has clicked,has not clicked,has filed form,has not filed form,has received,has not received,recurs yearly in,occurs in,is true,is false,is not true,has unsubscribed,has bounced,has hardbounced,has softbounced,is not false,has occurred,has not occurred,occurs today,occurred,is guest,has been,campaign member,up to turning,from turning,turning,in time range,has flow block executed,has flow block executed true,has flow block executed false,has flow block executed error,has flow job created,has flow job queued,is one of,is none of
        - `patternType` 'date' | 'date offset' | 'number' | 'string' | 'regex' | 'path': Allowed values: date,date offset,number,string,regex,path
        - `pattern` string, nullable: Scalar filter text, or JSON-encoded string array for V2 set comparators.
      - `showAll` boolean
      - `excludeEventResult` boolean: Only used if type is event or custom-event
    - `excludeConjunction` 'AND' | 'OR': Allowed values: AND,OR
  - `projection` object, nullable: Dynamic object
  - `sortOrder` object, nullable: Dynamic object
  - `options` ContactSearchOptions
    - `excludeEmailSuppressed` boolean
    - `excludeSMSSuppressed` boolean
    - `returnTotals` boolean
    - `returnContacts` boolean
    - `skipSort` boolean

## Response `200`

Success

- ContactResponse
  - `totalItems` integer
  - `contacts` unknown[], nullable
    - unknown

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `500`: Get contacts failed

---

[API](https://skmtc.dev/loopify/apis/web-api-loopify.md) · [All operations](https://skmtc.dev/loopify/apis/web-api-loopify/llms.txt) · [OpenAPI document](https://skmtc.dev/loopify/apis/web-api-loopify/revisions/68c51b11a24b?raw)
