---
title: "searchCustomVariables"
method: POST
path: "/v1/custom-variables:search"
tags: ["Custom Variables"]
---

# searchCustomVariables

`POST /v1/custom-variables:search`

Search custom variables

## Request body

- CustomVariablesSearchParams
  - `type` 'order_table' | 'custom' | 'journey_link' | 'snippet' — Variable type
  - `tags` string[] — The tags of custom variable
  - `query` string — Search string
  - `from` integer
  - `size` integer
  - `sort_by` string — Sort by field
  - `fields` string[] — Fields to return

## Response `200`

Success

- object
  - `results` CustomVariable[]
    - `id` string — ID
    - `type` 'order_table' | 'custom' | 'journey_link' | 'snippet' — Custom variable type
    - `name` string — Custom variable name
    - `key` string, required — The key which is used for Handlebar variable syntax {{key}}
    - `_tags` string[] — The tags of custom variable
    - `_manifest` string[] — The manifest IDs associated with this custom variable
    - `helper_params` string[] — The helper function parameter's names
    - `helper_logic` string — The helper function logic
    - `config` object — Variable configuration
    - `template` string, required — Handlebar template that used to generate the variable content
    - `created_at` string — Creation time
    - `created_by` string — Created by
    - `updated_at` string — Last update time
    - `updated_by` string — Updated by
  - `hits` integer — Total number of results

## Other responses

- `403` — Forbidden

---

[API](https://skmtc.dev/epilot/apis/template-variables-api.md) · [All operations](https://skmtc.dev/epilot/apis/template-variables-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/epilot/template-variables-api/revisions/ff0c1e3dc198/schema)
