V3 Surveys

Create a survey

Creates a block-based survey template from one strict survey document. The endpoint accepts multilingual authoring maps keyed by real locale codes and converts them to Formbricks' internal default-language representation. Non-default locale keys in translated content must be declared in languages; undeclared locale keys return unsupported_locale in invalid_params instead of silently mutating workspace languages.

blocks[].id and variables[].id are stable public identifiers. They may be omitted on create, in which case the server generates cuid2 ids. If the same create request needs to reference a block or variable from logic, provide explicit valid ids and use those references consistently.

For normal sequential surveys, omit logic and logicFallback. logicFallback is only valid when the same block has at least one logic rule; otherwise the API returns invalid_reference.

This first write surface intentionally stays structure-focused: type may be omitted or set to link or app, but in-app survey creation and distribution-channel settings are not part of this operation. Unsupported fields are rejected instead of ignored.

post/api/v3/surveys

Request body

workspaceIdstring cuid2 required

Workspace where the survey will be created. Requires read/write access.

namestring required
type'link' | 'app'

Optional compatibility field. link and app survey types are accepted here; app/in-app survey distribution settings remain outside this structure-focused create endpoint.

status'draft' | 'inProgress' | 'paused' | 'completed'
defaultLanguagestring

Canonical locale code accepted by v3 survey APIs, for example en-US, de-DE, or zh-Hans-CN.

Response

Survey created successfully

Changes