---
title: "Audience Contact Search"
method: POST
path: "/contact/audience/search"
tags: ["Contacts"]
---

# Audience Contact Search

`POST /contact/audience/search`

The Audience Contact Search API allows you to search for contacts within a specified audience(list, ccg or UDT) based on multiple filter conditions. It supports advanced filtering logic, sorting, pagination, and the ability to fetch either result data or just the count of matching records. This is a synchronous API.

## Headers

- `api-key` string, required
- `Content-Type` string, required

## Request body

- object
  - `audience_type` string, required — Specifies the audience type. Allowed values: List | UDT | Segment | CCG
  - `filtering_criteria_operator` string — Specifies how to combine multiple filtering criteria blocks. (Allowed value "and" & "or"). Mandory if more than one 'filtering_criteria' block is provided. Blank value accepted if exactly one 'filtering_criteria' block is provided.
  - `filtering_criteria` object[], required — Defines the conditions used to filter contacts within the specified audience.
    - `condition_operator` string, required — Operator to apply between multiple 'condition_details' (Allowed value "and" & "or"). Should be opposite of 'filtering_criteria_operator'.
    - `condition_details` object[], required — Array of field-based conditions used to filter contacts.
      - `field` string, required — The contact field or attribute to filter.
      - `field_category` string, required — Specify field category to be added in filter condition. Fields allowed: 'config' , 'attribute', 'audience'
      - `operation` string, required — Supported operators like 'equals', 'startswith', 'in'.
      - `value` string[], required — Values used for filtering.
  - `output` object, required — Defines how the results should be returned. Required unless 'get_Count' is set to 'true'.
    - `sorting` object[] — Lists of objects to define sorting order of the results. This will be ignored in case 'get_count' is set 'true'.
      - `field` string, required — specify field to apply sorting
      - `direction` string, required — The direction of the sort, either 'asc' for ascending or 'desc' for descending.
    - `pagination` object, required — if get_count is false pagination is compulsory.
      - `page` integer, required — Specify page number to retrive. Default and minimum value is 1
      - `limit` integer, required — Specify number of records to return per page. Default and minimum value is 10.
    - `fields` string[], required — List of contact or audience field to include in the response. If 'get_Count' is false then it is mandatory. Example:audience_id | audience_name
  - `get_Count` string — Specifies whether the API should return only thr total count of matching records instead of the full contact data. If 'get_Count' is set to 'true', the response will include only the count. If set to 'false', the output object must be defined. Important Notes When 'get_Count' is 'true', fields like 'pagination','fields, and 'sorting' under the 'output' object are ignored./nWhen using this mode, the API returns the total number of matched records as an integer.

## Response `200`

Success Response: The request was successfully processed and matching audience contact data or count was returned.

- object
  - `request_id` string, required — This is unique ID refer to each request.
  - `status` string, required — It signifies the status of API. For example: success , failed.
  - `description` string, required — This display the expected description of the API.
  - `code` integer, required — This returns the customized code.
  - `count` integer — The total number of items that match the request's query or filter criteria.

## Other responses

- `401` — Unauthorized: The API key is missing, invalid, or the request lacks proper authentication.
- `500` — Internal Server Error: An unexpected issue occurred while processing the request.
- `x-200-2`

---

[API](https://skmtc.net/netcorecloud/apis/contacts-api.md) · [All operations](https://skmtc.net/netcorecloud/apis/contacts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netcorecloud/contacts-api/versions/2878cfd0ee01/schema)
