# List personalization condition templates

Retrieves all available condition templates for personalization.

Endpoint: GET /api/v1/personalization/condition-templates
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `definition` (any)
    The template definition content. For AUDIENCE type templates, this is a structured AudienceDefinition object serialised as JSON; for all other types it is a plain string, such as JavaScript source.

  - `definition.operator` (any)
    The top-level boolean operator combining the groups.

  - `definition.groups` (any)
    The list of condition groups that make up the audience rule.

  - `definition.groups.operator` (any)
    The boolean operator combining the conditions within this group.

  - `definition.groups.conditions` (any)
    The list of individual conditions that form this group.

  - `definition.groups.conditions.source` (any)
    The data source identifier. For example, CDP, SESSION, ORDER.

  - `definition.groups.conditions.field` (any)
    The field name within the data source to evaluate.

  - `definition.groups.conditions.mapKey` (any)
    The key used when the source field is a map or a dictionary, to access a specific entry.

  - `definition.groups.conditions.operator` (any)
    The operator to apply when evaluating the condition such as EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN.

  - `definition.groups.conditions.value` (any)
    The value to compare against. This can be a string, number, boolean, array, or null depending on the operator.

  - `definition.groups.conditions.unit` (any)
    The time unit used with temporal operators, such as DAYS or HOURS.

  - `definition.groups.conditions.scope` (any)
    The optional count scope for nested array count conditions. Supported values: total, session.

  - `definition.groups.conditions.with` (any)
    The nested audience group to evaluate within this condition.

  - `definition.groups.conditions.unionType` (any)
    The logical operator either AND or OR combining this condition with the others in its group. This determines how the conditions are evaluated together.

  - `definition.groups.conditions.templateId` (string)
    The friendly ID of the audience template that defines the condition logic.

  - `definition.groups.conditions.params` (object)
    The key-value parameter overrides supplied to the audience template at evaluation time.

  - `definition.groups.eventSource` (any)
    The optional typed event source key, for example, `form`, `search`, or `custom`. When set, all conditions in the group are collapsed into a single event-instance check against this event type.

  - `clientKey` (any)
    The client key associated with the template.

  - `href` (any)
    The hyperlink reference associated with the template.

  - `ref` (any)
    The reference ID associated with the template.

  - `name` (string)
    The name of the template.

  - `description` (any)
    The description of the template.

  - `modifiedByRef` (any)
    The reference ID of the user who last modified the template.

  - `modifiedByEmail` (any)
    The email of the user who last modified the template.

  - `modifiedAt` (any)
    The timestamp indicating when the template was last modified.

  - `revision` (any)
    The revision number of the template.

  - `revisionComment` (any)
    The comment associated with the current revision of the template.

  - `archived` (any)
    Whether the template is archived.

  - `createdAt` (any)
    The timestamp indicating when the template was created.

  - `createdByRef` (any)
    The reference ID of the user who created the template.

  - `createdByEmail` (any)
    The email of the user who created the template.

  - `friendlyId` (any)
    The unique human-readable identifier for this template. Lowercase letters, digits, and underscores only.

  - `type` (string)
    Represents the different types of entities available in the system.
    Enum: "WEB", "EMAIL", "DECISION", "AUDIENCE", "CONDITION", "SEGMENT", "JS_MODULE", "VALUE_EXTRACTOR"

  - `status` (string)
    The status of the item, indicating whether it is in draft or published state.
    Enum: "DRAFT", "PUBLISHED"

  - `icon` (any)
    The icon identifier for display in the editor.

  - `revisions` (any)
    The HAL link to the revision history of this template.

  - `revisions.href` (any)
    The URL of the linked resource.

  - `additionalFields` (any)
    The additional key-value metadata fields associated with this template.

  - `templateElements` (any)
    The configurable element slots within this template.

  - `templateElements.id` (any)
    The unique identifier for this template element within the template.

  - `templateElements.template` (any)
    he template content or reference for this element.

  - `transpiledDefinition` (any)
    The compiled or transpiled form of the definition, populated after processing.

  - `render` (any)
    Whether the template should be rendered.

  - `defaultTemplate` (any)
    Whether this template is the default template.

  - `tags` (any)
    Tags associated with this template.

  - `customTemplate` (any)
    Whether this template is a custom template.

  - `valueType` (any)
    The type of value this template expects.

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

