---
title: "Preview playtable field condition"
method: POST
path: "/api/playtable-fields/preview-condition"
tags: ["playtable_fields"]
---

# Preview playtable field condition

`POST /api/playtable-fields/preview-condition`

## Request

- Base URL: `https://beta.getsales.io/playtables/v1`
- URL: `https://beta.getsales.io/playtables/v1/api/playtable-fields/preview-condition`
- Auth: HTTP bearer and API key in header `Team-SID`

Dry run of an UNSAVED run condition over up to 100 named rows of one tab: which rows the column would run on, decided by the same evaluator a paid run uses (MySQL, never the index). No writes, no charges. run_condition null = no gate, every row runs; an unknown record.<slug> or a bad atom is 422 here instead of at save. Use it before create_playtable_field or update_playtable_field sets config.run_condition, on rows from search_people or search_companies.

Contract:
- MCP tool `preview_playtable_field_condition`, registry package `mcp.playtables/playtable_fields`, mount `playtables.columns`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Request body

- PreviewPlaytableFieldConditionRequest: Request body of `preview_playtable_field_condition`.
  - `playtable_sid` string, required: Owner playtable sid (pt_tb_…).
  - `object_type` 'people' | 'company', required: Which rows the gate is about, people or company: the tab the draft column belongs to.
  - `run_condition` union: The unsaved gate, the shape config.run_condition takes; null or absent = no gate, every row runs. An unknown record.<slug> or a bad atom is 422 here, not at save.
    - object
      - `and` object[], required
    - object
      - `or` object[], required
    - object
      - `not` object, required: Recursive node: the same object shape repeats here. A static OpenAPI document cannot express the cycle, so this level is documented as an open object.
    - object
      - `any` object, required
        - `path` string, required: Array-valued path - the only way to reach inside an array.
        - `where` object, required: Recursive node: the same object shape repeats here. A static OpenAPI document cannot express the cycle, so this level is documented as an open object.
    - object
      - `field` string, required: Namespaced path: record.<slug> or a built-in object attribute; element-relative inside any.where.
      - `op` object, required
        - `eq` union
          - string
          - number
          - boolean
        - `ne` union
          - string
          - number
          - boolean
        - `in` union[]
          - union
            - string
            - number
            - boolean
        - `nin` union[]
          - union
            - string
            - number
            - boolean
        - `gt` union
          - number
          - string
        - `gte` union
          - number
          - string
        - `lt` union
          - number
          - string
        - `lte` union
          - number
          - string
        - `is_null` boolean
        - `contains` string
        - `not_contains` string
        - `contains_any` string[]
        - `not_contains_any` string[]
        - `starts_with` string
    - unknown
  - `object_sids` string[], required: 1..100 distinct row sids of the tab (cr_pp_… or cr_co_…) to try the gate on.

## Response `200`

`action` success envelope.

- PreviewPlaytableFieldConditionResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` unknown, required
  - `result` object, required
    - `rows` object[], required: One verdict per named row, in the order given.
      - `object_sid` string, required
      - `will_run` boolean, required
    - `will_run_count` integer, required
    - `evaluated_count` integer, required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/revisions/aa394506515d?raw)
