Skip to main content
POST
Preview Entity Type Field Formula

Authentication and permissions

Token requirements: User-based token (OAuth) or Organization-scoped API key or Team-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
Permissions joined by + are all required; or separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Team keys must allow every team checked by the request. OAuth access depends on the user’s roles and resource access.
  • Check a field’s formula in a team’s database: The permission is checked on the team that owns the field’s database. Previewing on an entity also requires access to that entity and to every field the formula reads on it.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the output entity type field. Its data type is the type the formula must produce.

Body

application/json
formula
string

The formula to check.

defaultFormula
boolean

Check the formula as a create-time default instead of a computed formula. Defaults may read only entered fields.

entityId
string | null

Also evaluate the formula against this entity. Omit to compile only.

Response

200 - application/json

Success

compileError
string | null

Why the formula does not compile. Unset when it compiles.

runtimeError
string | null

Why evaluating on entity_id failed. A saved formula leaves the field empty on such a record.

value

The result on entity_id: a string, number or bool, an RFC 3339 timestamp, or the option ID for an ENUM output. Unset when the result is empty, evaluation failed, or entity_id was omitted.

readFieldIds
string[]

The entity type field IDs on this type the formula reads.