Skip to content

Validate Formula

POST
/objects/{object_slug}/attributes/formula/validate

Dry-run type-check and cycle-check of a typed formula expression, optionally evaluated on one record. Nothing is stored. Read-only (objects:read) despite the POST verb: the expression travels in the body. The check uses YOUR view of the schema: a field you cannot see or an object you cannot read is unknown, and a preview that names one is valid: false with unknown_field (200), exactly like a name that does not exist. An admin key is held to the same object grants: API keys never bypass them.

Authorizations

Parameters

Path Parameters

object_slug
required
string

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Dry-run check of a typed formula expression. Nothing is persisted or locked.

object
attribute_slug
Any of:
string
<= 100 characters
expression
required

The typed JSON expression (a node tree; a rollup is a rollup node).

object
key
additional properties
any
preview_record_id
Any of:
string
<= 64 characters

Responses

200

Successful Response

object
data
required
object
currency_code
Any of:
string
depends_on
Array<object>
object
key
additional properties
any
errors

Field-level problems (reason is a stable code).

Array<object>
object
key
additional properties
any
preview_error
Any of:
string
preview_rollups

With a preview record: one entry per rollup in the expression, counted over the records the caller may read.

Array<object>

How many linked records one rollup of a previewed expression counted.

object
matched_count
required

Linked records the rollup counted for the preview record (the ones its filters keep).

integer
node_path
required

Where the rollup sits in the expression: $ is the root, $.left, $.args[1], $.then_branch.

string
preview_value
referenced_object_slugs
Array<string>
result_type
Any of:
string
valid
required
boolean
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string