V3 Surveys

Edit survey blocks

Changed on

Edits a survey's blocks in place — update, insert or remove whole blocks without resending the ones you are not changing. Operations apply in order against a single snapshot and are applied atomically: either all of them land or none do.

Blocks are addressed by id, never by position, so a concurrent edit cannot silently redirect an operation onto a different block. An update replaces the target block entirely, the same whole-subtree rule PATCH /api/v3/surveys/{surveyId} uses, and the replacement must carry every language the survey has configured.

Pass expectedUpdatedAt (the updatedAt from your last read) to make the write conditional; see the 409 response. Session cookie or x-api-key.

patch/api/v3/surveys/{surveyId}/blocks

Request

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

Path parameters

surveyIdstring cuid2 required

Survey identifier.

Request body

expectedUpdatedAtstring date-time

Optimistic-concurrency precondition: the survey's updatedAt from your last read. If the survey changed since, the write is rejected with 409 and the response carries the current value. Omit it to accept last-write-wins.

Response

Blocks updated; returns the full survey resource.

Changes

    • warning

      added the new row enum value to the /////////// response property for the response status

    • warning

      added the new row enum value to the /////////// response property for the response status

    • 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 //////////////////

    • breaking

      added subschema #5: SurveyInteractionFilter to the ///////////// response property oneOf list for the response status