Skip to main content
POST

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.

Body

application/json
operation
enum<string>
required
Available options:
create
data
any
required

Intended create payload, checked against CreateResponseRequest by the operation rather than by this envelope. Any JSON value is accepted here so the endpoint can return repairable validation errors: a document that is not an object, or that breaks CreateResponseRequest, is a 200 with valid: false, not a 400. Only the request limits come first: an array past its budget, or nesting past 256 levels, is a 400 for any request.

Response

Validation completed. A 200 means the check ran, not that the payload is valid — read valid.

data
object
required

Outcome of a dry-run validation. Deliberately the same shape as SurveyValidationResult — the value of this endpoint is that the two behave alike, so a client can treat validation uniformly.

Answers are checked against the survey's own validation rules (SurveyValidationRule) rather than a parallel rule set, so a payload this endpoint accepts is a payload the real write accepts.