Create a Scope Refinement survey (super admin only)
const url = 'https://example.com/api/admin/scope-surveys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","intro":"example","questions":[{"id":"example","title":"example","description":"example","options":[{"key":"A","label":"example"}],"proposal":"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/admin/scope-surveys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "intro": "example", "questions": [ { "id": "example", "title": "example", "description": "example", "options": [ { "key": "A", "label": "example" } ], "proposal": "example" } ] }'Generates a 10-char lowercase alphanumeric public code. Question ids are generated server-side (q1..qN) when absent; ids must be unique.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
object
Generated server-side (q1..qN) when absent on create.
object
Example
AOption key the survey author proposes as the default direction.
Responses
Section titled “ Responses ”Survey created
object
object
object
Generated server-side (q1..qN) when absent on create.
object
Example
AOption key the survey author proposes as the default direction.
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 authenticated
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)
True if re-linking GitHub may fix the issue
Forbidden
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)