Validate Formula Expression
POST/api/v2/report-builder/validate-formula
Check a calculated-column formula before saving it in a column's formula.
reports:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
formula(string, required, max 2000): the expression. Reference the entity's measures by their bare key (e.g.total_revenue,order_count); numbers, quoted strings, arithmetic (+ - * /), comparisons and these functions are allowed: ROUND, ABS, CEIL, FLOOR, MOD, POWER, IF, CASE, COALESCE, NULLIF, CONCAT, UPPER, LOWER, TRIM, LENGTH, REPLACE, SUBSTRING, DATEDIFF, DATE_ADD, YEAR, MONTH, DAY, DATE_FORMAT, CAST, NOW.entity_key(string, required): the entity whose measures the formula may reference
Returns {"valid": true}, or {"valid": false, "error": "..."} with status 200 when the formula is malformed or references an unknown measure. An unknown entity_key returns 422 with the same shape.
Authentication: Bearer token (Personal Access Token). Personal access tokens need the reports:write scope.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.