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

# Get rule metadata

> Metadata for building audience rule trees (used by `POST /v1/contacts/search` and dynamic contact lists): every filterable field — the standard contact fields plus your active custom fields — with its value type and the operators that apply to it, and a catalog of operator labels for display.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/contact-fields/rule-metadata
openapi: 3.1.0
info:
  title: Tented API
  version: 1.0.0
  description: >-
    The Tented public API: generate, publish, and manage AI-built web pages
    (tents), and run the email platform — contacts, reusable emails, one-time
    blasts, and triggered flows.


    ## Authentication

    Authenticate every request with a workspace API key: `Authorization: Bearer
    <api-key>`. Keys are created in **Workspace Settings → API Keys** and are
    scoped to a single workspace.


    ## Asynchronous work

    Tent generation, bulk creation, and email AI generation return `202
    Accepted` immediately. Poll the corresponding status endpoint (`GET
    /v1/tents/{tentId}`, `GET /v1/bulk-jobs/{bulkJobId}`, `GET
    /v1/emails/{emailId}/generations/{generationId}`) — no more than every 10
    seconds.


    ## Pagination

    Email listings use cursor pagination (`cursor`/`next_cursor`). Blast, flow,
    and member listings use page pagination (`page`/`limit` with a `pagination`
    object in the response).


    ## Conventions

    Request and response fields are snake_case, with two exceptions: analytics
    query parameters (`tentIdOrAlias`, `daysBack`) and segment rule trees
    (camelCase keys such as `listId` and `timeWindow`).
  contact:
    name: Tented Support
    email: support@tented.ai
servers:
  - url: https://api.tented.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Tents
    description: >-
      Create, edit, publish, and manage AI-generated pages, including asset
      uploads and bulk creation.
  - name: Analytics
    description: Traffic analytics for single tents and the whole workspace.
  - name: Contacts
    description: >-
      Batch create, update, and delete contacts. Up to 25 items per request with
      per-item results.
  - name: Emails
    description: >-
      Reusable email content: AI generation, direct HTML edits, plain-text
      control, and approval.
  - name: Email Blasts
    description: >-
      One-time sends to an audience: compose, schedule, track engagement, export
      recipients.
  - name: Triggered Flows
    description: >-
      Multi-step automations that enroll contacts on triggers and move them
      through a step graph.
  - name: Contact Imports
  - name: Contact Fields
  - name: Contact Lists
  - name: Email Templates
  - name: Tent Templates
    description: >-
      Reusable, AI-editable tent layouts. Create from HTML or an existing tent,
      iterate with AI, approve, and clone. Approved tent templates seed new
      tents.
paths:
  /v1/contact-fields/rule-metadata:
    get:
      tags:
        - Contact Fields
      summary: Get rule metadata
      description: >-
        Metadata for building audience rule trees (used by `POST
        /v1/contacts/search` and dynamic contact lists): every filterable field
        — the standard contact fields plus your active custom fields — with its
        value type and the operators that apply to it, and a catalog of operator
        labels for display.
      operationId: get-contact-field-rule-metadata
      responses:
        '200':
          description: Filterable fields and operators.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactFieldRuleMetadata'
        '401':
          description: Unauthorized — missing, malformed, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ContactFieldRuleMetadata:
      type: object
      properties:
        fields:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
                enum:
                  - contact
                  - custom_field
                description: >-
                  Rule condition source: `contact` for standard fields,
                  `custom_field` for custom fields.
              field:
                type: string
                description: >-
                  Standard field name to use as the rule condition's `field`
                  (e.g. `email`, `company`, `tentedScore`). Present when
                  `source` is `contact`.
              label:
                type: string
                description: Human-readable label for display.
              operators:
                type: array
                items:
                  type: string
                description: >-
                  Operator IDs valid for this field (e.g. `equals`, `contains`,
                  `greater_than`, `is_empty`).
              field_definition_id:
                type: string
                format: uuid
                description: >-
                  Custom field ID — use this as the rule condition's
                  `fieldDefinitionId`. Present when `source` is `custom_field`.
              value_type:
                type: string
                enum:
                  - string
                  - phone
                  - number
                  - boolean
                  - date
                description: Value type, which determines the applicable operators.
            required:
              - source
              - label
              - value_type
              - operators
          description: >-
            Filterable fields: the standard contact fields followed by your
            active custom fields, sorted by display name.
        operators:
          type: array
          items:
            type: object
            properties:
              operator:
                type: string
                description: >-
                  Operator ID (e.g. `equals`, `not_contains`,
                  `greater_than_or_equal`, `is_true`, `is_empty`).
              label:
                type: string
                description: Human-readable label (e.g. `Does not contain`).
            required:
              - operator
              - label
          description: Catalog of all rule operators with display labels.
      required:
        - fields
        - operators
      description: Metadata for building audience rule trees.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        error_code:
          type: string
          description: >-
            Stable machine-readable error code (present on email, blast, flow,
            and related endpoints, e.g. `campaign_not_ready`,
            `generation_in_progress`).
        message:
          type: string
          description: Additional human-readable context (present on some tent endpoints).
        code:
          type: string
          description: >-
            Machine-readable code used by tent creation errors (e.g.
            `INVALID_PROMPT_INTENT`).
        details:
          type: object
          additionalProperties: true
          description: >-
            Additional error context. Validation errors include `issues`: an
            array of `{ path, message }` objects.
        limit:
          type: integer
          description: Plan limit that was hit (present on `429` publish-limit errors).
        current:
          type: integer
          description: >-
            Current usage against the limit (present on `429` publish-limit
            errors).
      required:
        - error
      description: >-
        Error response. All errors include `error`; the other fields vary by
        endpoint group.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, e.g. `Authorization: Bearer tented_...`. Create keys
        in Workspace Settings → API Keys.

````