{
"data": {
"workspaceId": "clxx1234567890123456789012",
"customCss": {
"light": "[data-fb-part=\"button-primary\"] { border-radius: 999px; }",
"dark": null
},
"previous": null,
"status": "ok",
"canEdit": true,
"planAllowed": true
},
"warnings": []
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "Unprocessable Content",
"status": 422,
"detail": "Custom CSS failed validation",
"code": "unprocessable_content",
"requestId": "req_01j9zq7w3k2m4n5p6r7s8t9v0w",
"invalid_params": [
{
"name": "customCss.light",
"reason": "Unexpected end of input (line 3, column 1)"
}
],
"details": {
"errors": [
{
"code": "syntax_error",
"scope": "workspace",
"appearance": "light",
"line": 3,
"column": 1,
"reason": "Unexpected end of input"
}
]
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}Save or clear workspace custom CSS
Saves or clears the workspace’s shared survey CSS. customCss replaces both fields; null clears all of it. The source is processed by the same processor every save path uses: constructs it removes come back as top-level warnings, and CSS it rejects is a 422 that leaves the saved CSS in effect. The replaced value becomes previous, the one recoverable revision — restore it by sending its source back. Unchanged source writes nothing.
Workspace CSS reaches every survey in the workspace, so writing it is narrower than writing a survey: organization owners and managers for signed-in users (session or OAuth), and a manage grant on this workspace for API keys — a Read & write grant is refused with 403. On Formbricks Cloud, adding or editing needs the Scale plan (403 custom_css_plan_required); clearing never does. Successful changes refresh the cached configuration the SDKs receive (they pick it up on their next configuration fetch). Saves that add or edit CSS count against a custom CSS budget of 60 per minute per user or API key, shared with custom CSS validation and with survey writes that add or edit custom CSS; beyond it they return 429. Re-saving the same CSS and clearing it are never counted.
{
"data": {
"workspaceId": "clxx1234567890123456789012",
"customCss": {
"light": "[data-fb-part=\"button-primary\"] { border-radius: 999px; }",
"dark": null
},
"previous": null,
"status": "ok",
"canEdit": true,
"planAllowed": true
},
"warnings": []
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "Unprocessable Content",
"status": 422,
"detail": "Custom CSS failed validation",
"code": "unprocessable_content",
"requestId": "req_01j9zq7w3k2m4n5p6r7s8t9v0w",
"invalid_params": [
{
"name": "customCss.light",
"reason": "Unexpected end of input (line 3, column 1)"
}
],
"details": {
"errors": [
{
"code": "syntax_error",
"scope": "workspace",
"appearance": "light",
"line": 3,
"column": 1,
"reason": "Unexpected end of input"
}
]
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}Authorizations
Body
Response
Workspace custom CSS saved (or unchanged)
Was this page helpful?