curl --request POST \
--url https://app.formbricks.com/api/v3/surveys/validate \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"operation": "create",
"data": {
"workspaceId": "clxx1234567890123456789012",
"name": "Product Feedback Survey",
"defaultLanguage": "en-US",
"blocks": [
{
"id": "clbk1234567890123456789012",
"name": "Main Block",
"elements": [
{
"id": "satisfaction",
"type": "openText",
"headline": {
"en-US": "What should we improve?"
},
"required": true
}
]
}
]
}
}
'{
"data": {
"valid": false,
"operation": "create",
"invalid_params": [
{
"name": "blocks.0.elements.0.buttonUrl",
"reason": "Unsupported field 'buttonUrl' for element type 'openText'. Allowed fields..."
}
]
}
}V3 Surveys
Validate a survey document
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.
POST
/
api
/
v3
/
surveys
/
validate
curl --request POST \
--url https://app.formbricks.com/api/v3/surveys/validate \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"operation": "create",
"data": {
"workspaceId": "clxx1234567890123456789012",
"name": "Product Feedback Survey",
"defaultLanguage": "en-US",
"blocks": [
{
"id": "clbk1234567890123456789012",
"name": "Main Block",
"elements": [
{
"id": "satisfaction",
"type": "openText",
"headline": {
"en-US": "What should we improve?"
},
"required": true
}
]
}
]
}
}
'{
"data": {
"valid": false,
"operation": "create",
"invalid_params": [
{
"name": "blocks.0.elements.0.buttonUrl",
"reason": "Unsupported field 'buttonUrl' for element type 'openText'. Allowed fields..."
}
]
}
}Authorizations
sessionAuthapiKeyAuth
NextAuth session JWT cookie. Development: often next-auth.session-token.
Production (HTTPS): often __Secure-next-auth.session-token. Send the cookie your browser receives after sign-in.
Body
application/json
Response
Validation completed. The survey document may still be invalid.
Show child attributes
Show child attributes
Was this page helpful?