admin-schema

Validate Formula

Compile a formula expression against an object's current schema and report whether it's valid.

The Setup → Fields → Formula editor calls this on every "Check syntax" click — it lets admins surface compile errors (unknown field, type mismatch, bad syntax) before submitting the create-field form, where the same compile would also run but rejects the whole save instead of just inlining a hint.

Request body::

{"object_type": "Opportunity",
 "formula_expression": "TODAY() - close_date",
 "return_type": "number"}            # optional — when present, the
                                     # endpoint also checks that
                                     # the inferred type matches.

Response on success::

{"valid": true,
 "return_type": "number",            # inferred from the formula
 "referenced_fields": ["close_date"]}

Response on failure (HTTP 200 with valid=false, so the UI can show the error inline)::

{"valid": false, "error": "Unknown field reference: close_dat"}
post/api/v1/admin/fields/validate-formula

Request

  • Base URL
    https://api.ninjavan.co (the document declares no server; this is the origin it was published from)
  • URL
    https://api.ninjavan.co/api/v1/admin/fields/validate-formula
  • Auth
    none declared

Headers

authorizationstring nullable
X-API-Keystring nullable

Request body

object required

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 10 revisions of this API.