Skip to content

Submit answers to a public Scope Refinement survey

POST
/surveys/{code}/responses
curl --request POST \
--url https://example.com/api/surveys/example/responses \
--header 'Content-Type: application/json' \
--data '{ "respondent_email": "hello@example.com", "answers": [ { "question_id": "example", "choice": "example", "note": "example" } ], "comment": "example" }'

Public: saves the response and sends best-effort notification emails to the survey owner and the respondent. Every survey question must get exactly one answer with a valid option key. IP rate limited.

code
required
string
>= 1 characters <= 64 characters
Media type application/json
object
respondent_email
required
string format: email
answers
required
Array<object>
>= 1 items
object
question_id
required
string
<= 64 characters
choice
required

Option key of the chosen option.

string
<= 16 characters
note
string
<= 2000 characters
comment
string
<= 5000 characters

Response saved

Media type application/json
object
ok
required
boolean

Invalid request

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not found

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Rate limited

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
retryAfter

Seconds until the rate limit resets

number
Retry-After
string