V3 Surveys

Validate a survey document

Changed on

Validates a future create or patch survey payload without writing data, creating languages, or creating survey versions. Invalid survey documents return 200 with data.valid=false so agents and MCP clients can repair payloads from structured invalid_params.

Use 400 only for malformed validation envelopes, unsupported operations, invalid surveyId, or unsupported query parameters.

Custom CSS. A create or patch payload that carries customCss is also run through the custom CSS processor; the result adds the compiled customCss and warnings, or errors and valid=false. operation: customCss validates CSS alone for a live preview — with scope: workspace | survey and, optionally, an existing surveyId in workspaceId, or a creativeType for a creative's own CSS — and returns the compiled CSS and warnings. Validation never saves, versions, touches timestamps or invalidates caches, needs only read access, and grants nothing: the write itself checks permissions and the plan again. Requests that process custom CSS also count against a separate budget of 60 per minute per user or API key, shared with the workspace custom CSS endpoint, with survey creates and updates that add or edit custom CSS, and with the MCP tools; beyond it they return 429.

post/api/v3/surveys/validate

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://app.formbricks.com/api/v3/surveys/validate
  • Auth
    • API key in cookie next-auth.session-token
    • or API key in header x-api-key
    • or HTTP bearer

Request body

OR
OR

Response

Validation completed. The survey document may still be invalid.

Example response

{
  "data": {
    "languages": [
      {
        "code": "en-US"
      }
    ]
  }
}

Changes

    • info

      added the new row enum value to the request property //////////////////

    • info

      added the new row enum value to the request property //////////////////

    • info

      added the new row enum value to the request property //////////////////

    • info

      added the new row enum value to the request property //////////////////

    • info

      added subschema #5: SurveyInteractionFilter to the //////////////////// request property oneOf list

    • info

      added subschema #5: SurveyInteractionFilter to the //////////////////// request property oneOf list