Submit answers to a public Scope Refinement survey
const url = 'https://example.com/api/surveys/example/responses';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"respondent_email":"hello@example.com","answers":[{"question_id":"example","choice":"example","note":"example"}],"comment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
object
Option key of the chosen option.
Responses
Section titled “ Responses ”Response saved
object
Invalid request
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Not found
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Rate limited
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Seconds until the rate limit resets