Get a public Scope Refinement survey by unique code
GET
/surveys/{code}
const url = 'https://example.com/api/surveys/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/surveys/examplePublic: anyone with the unique-code URL can view the survey. Returns only the public shape (code, title, intro, questions) — never id or created_by.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” code
required
string
Responses
Section titled “ Responses ”Public survey
Media type application/json
object
survey
required
object
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
title
required
string
description
string
options
required
Array<object>
object
key
required
string
Example
A label
required
string
proposal
Option key the survey author proposes as the default direction.
string
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