Skip to main content
PATCH

Authorizations

next-auth.session-token
string
cookie
required

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

surveyId
string<cuid2>
required

Survey identifier.

Body

application/json
ops
object[]
required

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.

Required array length: 1 - 100 elements

A single block operation.

expectedUpdatedAt
string<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.

data
object
required

The three fields every SurveyListItem and SurveyResource carries, merged into both via allOf. All required, always present.