> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clickterm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get templates by tags

> Retrieve enabled clickwrap templates for your app, optionally
filtered by tags. Returns template metadata including the
effective version, tags, and optional acceptance deadline.

Templates can be configured with custom tags in the ClickTerm UI
to support flexible categorization (e.g., user types, registration-only
flags, required flows).

**Authenticated** — requires `X-APP-ID` and `X-APP-KEY` headers.

When at least one template is linked to your app in the dashboard,
only linked templates are returned. If no templates are linked,
all enabled templates are returned.




## OpenAPI

````yaml /openapi/clickterm-public-api.yaml get /clickwrap-templates
openapi: 3.0.3
info:
  title: ClickTerm Public Client API
  version: '1.0'
  description: |
    The ClickTerm Public Client API lets you integrate legally-binding
    consent management into your application. Use it alongside the
    ClickTerm Web SDK or Android SDK.

    **Authentication:** Most endpoints require `X-APP-ID` and `X-APP-KEY`
    headers. The exceptions are `GET /clickwrap` and `POST /clickwrap`,
    which use the public `appId` in query/body parameters and do not
    require the App Key.
  contact:
    name: ClickTerm Support
    url: https://clickterm.com
    email: support@clickterm.com
servers:
  - url: https://api.clickterm.com/public-client/v1
    description: Production
security: []
tags:
  - name: Clickwrap
    description: >-
      Core clickwrap operations — fetch templates, record acceptance, verify
      Signatures
  - name: Events
    description: Clickwrap event details, certificates, and consent status
  - name: Templates
    description: Template discovery and metadata
paths:
  /clickwrap-templates:
    get:
      tags:
        - Templates
      summary: Get templates by tags
      description: |
        Retrieve enabled clickwrap templates for your app, optionally
        filtered by tags. Returns template metadata including the
        effective version, tags, and optional acceptance deadline.

        Templates can be configured with custom tags in the ClickTerm UI
        to support flexible categorization (e.g., user types, registration-only
        flags, required flows).

        **Authenticated** — requires `X-APP-ID` and `X-APP-KEY` headers.

        When at least one template is linked to your app in the dashboard,
        only linked templates are returned. If no templates are linked,
        all enabled templates are returned.
      operationId: getTemplatesByTags
      parameters:
        - name: tags
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
          description: Tags to filter templates (repeatable)
      responses:
        '200':
          description: Templates retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateMetadata'
              example:
                - clickwrapTemplateId: 987e6543-e21b-45d3-b321-426614174999
                  clickwrapTemplateName: Terms of Service
                  clickwrapTemplateVersion: 2
                  clickwrapTemplateVersionMinor: 0
                  tags:
                    - registration
                    - customer_only
                  effectiveAt: '2025-08-20T14:00:00Z'
                  mustAcceptBy: null
                - clickwrapTemplateId: 123e4567-e89b-12d3-a456-426614174000
                  clickwrapTemplateName: Privacy Policy
                  clickwrapTemplateVersion: 1
                  clickwrapTemplateVersionMinor: 3
                  tags: []
                  effectiveAt: '2025-09-01T00:00:00Z'
                  mustAcceptBy: '2025-10-01T00:00:00Z'
      security:
        - appIdHeader: []
          appKeyHeader: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl -X GET \
              -H "X-APP-ID: YOUR_APP_ID" \
              -H "X-APP-KEY: YOUR_APP_KEY" \
              "https://api.clickterm.com/public-client/v1/clickwrap-templates?tags=registrationOnly&tags=required"
        - lang: javascript
          label: Node.js
          source: |
            const response = await fetch(
              "https://api.clickterm.com/public-client/v1/clickwrap-templates?tags=registrationOnly&tags=required",
              {
                headers: {
                  "X-APP-ID": process.env.CLICKTERM_APP_ID,
                  "X-APP-KEY": process.env.CLICKTERM_APP_KEY,
                },
              }
            );
            const templates = await response.json();
        - lang: python
          label: Python
          source: |
            response = requests.get(
                "https://api.clickterm.com/public-client/v1/clickwrap-templates",
                headers={
                    "X-APP-ID": CLICKTERM_APP_ID,
                    "X-APP-KEY": CLICKTERM_APP_KEY,
                },
                params={"tags": ["registrationOnly", "required"]},
            )
            templates = response.json()
        - lang: java
          label: Java
          source: |
            HttpResponse<String> response = Unirest.get(
                "https://api.clickterm.com/public-client/v1/clickwrap-templates")
              .header("X-APP-ID", "YOUR_APP_ID")
              .header("X-APP-KEY", "YOUR_APP_KEY")
              .queryString("tags", "registrationOnly")
              .queryString("tags", "required")
              .asString();
components:
  schemas:
    TemplateMetadata:
      type: object
      description: Metadata for an enabled clickwrap template
      properties:
        clickwrapTemplateId:
          type: string
          format: uuid
          description: Unique identifier of the clickwrap template
        clickwrapTemplateName:
          type: string
          description: Display name of the clickwrap template
        clickwrapTemplateVersion:
          type: integer
          description: Effective major version of the template
        clickwrapTemplateVersionMinor:
          type: integer
          description: Effective minor version of the template
        tags:
          type: array
          items:
            type: string
          description: >-
            Custom tags associated with the template (empty array if none
            configured)
        effectiveAt:
          type: string
          format: date-time
          description: >-
            When this template version became visible to end users (UTC,
            ISO-8601)
        mustAcceptBy:
          type: string
          format: date-time
          nullable: true
          description: Optional acceptance deadline configured in the ClickTerm UI, or null
  securitySchemes:
    appIdHeader:
      type: apiKey
      in: header
      name: X-APP-ID
      description: |
        Your application's App ID, sent as the `X-APP-ID` header.
        Must be accompanied by `X-APP-KEY` for authenticated endpoints.
    appKeyHeader:
      type: apiKey
      in: header
      name: X-APP-KEY
      description: Your application's secret App Key (server-side only)

````