Skip to content

Create a Scope Refinement survey (super admin only)

POST
/admin/scope-surveys
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.

Media type application/json
object
title
required
string
>= 1 characters <= 300 characters
intro
string
<= 5000 characters
questions
required
Array<object>
>= 1 items
object
id

Generated server-side (q1..qN) when absent on create.

string
<= 64 characters
title
required
string
>= 1 characters <= 500 characters
description
string
<= 2000 characters
options
required
Array<object>
>= 2 items
object
key
required
string
>= 1 characters <= 8 characters
Example
A
label
required
string
>= 1 characters <= 500 characters
proposal

Option key the survey author proposes as the default direction.

string
<= 8 characters

Survey created

Media type application/json
object
survey
required
object
id
required
string format: uuid
code
required
string
title
required
string
intro
string | null
questions
required
Array<object>
object
id

Generated server-side (q1..qN) when absent on create.

string
<= 64 characters
title
required
string
>= 1 characters <= 500 characters
description
string
<= 2000 characters
options
required
Array<object>
>= 2 items
object
key
required
string
>= 1 characters <= 8 characters
Example
A
label
required
string
>= 1 characters <= 500 characters
proposal

Option key the survey author proposes as the default direction.

string
<= 8 characters
created_at
required
string format: date-time

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 authenticated

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
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

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