---
title: "Search Templates"
method: POST
path: "/client/template/search"
tags: ["Template"]
---

# Search Templates

`POST /client/template/search`

## Request

- Base URL: `https://netcoreapi-main-prod-us.netcorein.com/v5`
- URL: `https://netcoreapi-main-prod-us.netcorein.com/v5/client/template/search`
- Auth: API key in header `api-key`

The Search Templates API retrieves contact details based on advanced filtering conditions.

## Headers

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

## Request body

- object
  - `channel_name` 'apn', required: Specifies the communication channel for the search. The supported value is **apn**.
  - `filtering_criteria_operator` 'and' | 'or': Specifies how the top-level filtering criteria are combined. Supported values are `AND` and `OR`.
  - `filtering_criteria` object[]: Contains the criteria used to filter templates. Each object can define a group of conditions.
    - `condition_operator` 'and' | 'or': Specifies how the conditions in condition_details are combined. Supported values are `AND` and `OR`.
    - `condition_details` object[]: Contains the individual conditions used to filter templates.
      - `field` 'template_id' | 'template_name' | 'category': Specifies the template field to evaluate. Supported values are **template_id**, **template_name**, and **category**.
      - `operation` 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'greater_than_or_equal_to' | 'less_than_or_equal_to' | 'between' | 'in' | 'not_in' | 'contains' | 'does_not_contain' | 'starts_with' | 'ends_with' | 'is_null' | 'is_not_null' | 'matches_regex': Specifies the comparison or matching operation to apply to the selected field.
      - `value` union[]
        - union
          - string
          - integer
          - boolean
  - `output` object
    - `get_count` boolean
    - `sorting` object[]
      - `field` 'template_id' | 'template_name' | 'modified' | 'modified_at' | 'entered' | 'folder_id' | 'created_date' | 'updated_date'
      - `direction` 'asc' | 'desc'
    - `pagination` object
      - `page` integer
      - `limit` integer
    - `fields` string[]

## Response `200`

Searched successfully.

- object
  - `request_id` string, required: Unique request id of request.
  - `code` 200 | 400 | 401 | 500, required: Response status Code.
  - `status` 'success' | 'failed', required: Status of API request.
  - `description` string, required: API response description.

## Other responses

- `400`: Validation Failure.
- `401`: Unauthorized: The API key is invalid, missing, or incorrect. Ensure you provide a valid API key in the request header.
- `500`: Internal Server Error: An unexpected issue occured on the server. Possibly, Internal service failure or unexpected request payload structure.

---

[API](https://skmtc.dev/netcorecloud/apis/templates-api.md) - [All operations](https://skmtc.dev/netcorecloud/apis/templates-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/templates-api/revisions/595bc4c948c1?raw)
