Edit survey blocks
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.
Authorizations
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.
Path Parameters
Survey identifier.
Body
Operations applied in order against a single snapshot, atomically — either all of them land or none do. Each operation resolves against the state left by the previous one, so an insert may anchor after a block an earlier operation inserted, and a remove followed by an insert of the same id is legal.
1 - 100 elementsA single block operation.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
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.
The three fields every SurveyListItem and SurveyResource carries, merged into both via allOf. All required, always present.
Show child attributes
Show child attributes
Was this page helpful?