Skip to content

List survey elements

GET
/elements
curl --request GET \
--url 'https://app.surveyrock.com/api/v1/elements?surveyId=example&limit=50&page=1' \
--header 'Authorization: Bearer <token>'

List elements with pagination and tenant scoping. Supports both offset-based and cursor-based pagination for efficient traversal of large collections.

surveyId
required
string
>= 16 characters <= 16 characters

Survey ID to filter elements

limit
integer
default: 50 >= 1 <= 100

Number of results (1-100, default 50)

page
integer
default: 1 >= 1

Page number for offset pagination (default 1)

cursor
string

Cursor token for cursor-based pagination

List of elements with pagination metadata

Media typeapplication/json
object
success
boolean
data
Array<object>

Survey element (question) basic information

object
id

Element ID

string
>= 16 characters <= 16 characters
surveyId

Survey ID

string
>= 16 characters <= 16 characters
pageId

Page ID

string
>= 16 characters <= 16 characters
type

Element type enum value

integer
sortOrder

Display order within page

integer
questionText

Question text

string
nullable
helpText

Help text

string
nullable
createdAt
string format: date-time
updatedAt
string format: date-time
pagination
object
total
integer
page
integer
limit
integer
totalPages
integer
hasMore
boolean
cursor_next
string
nullable
meta

Standard response metadata

object
timestamp

Response timestamp in ISO 8601 format

string format: date-time
version

API version

string
requestId

Unique request identifier

string
Example
{
"success": true,
"meta": {
"version": "3.0"
}
}

Bad request - missing surveyId parameter

Media typeapplication/json

Standard error response format

object
success
boolean
error
object
code

Stable, snake_case domain code – see ApiErrorHandler::EXCEPTION_MAP and DomainException

string
message

Human-readable error message

string
suggestion

Imperative recovery hint for this domain code – see ApiErrorHandler::DOMAIN_CODE_SUGGESTIONS

string
retryable

Whether retrying the identical request might succeed without any change on the caller’s end

boolean
details

Additional, code-specific error details

object
meta

Standard response metadata

object
timestamp

Response timestamp in ISO 8601 format

string format: date-time
version

API version

string
requestId

Unique request identifier

string
Example
{
"success": false,
"error": {
"code": "survey_not_found"
},
"meta": {
"version": "3.0"
}
}

Unauthorized - invalid or missing token

Media typeapplication/json

Standard error response format

object
success
boolean
error
object
code

Stable, snake_case domain code – see ApiErrorHandler::EXCEPTION_MAP and DomainException

string
message

Human-readable error message

string
suggestion

Imperative recovery hint for this domain code – see ApiErrorHandler::DOMAIN_CODE_SUGGESTIONS

string
retryable

Whether retrying the identical request might succeed without any change on the caller’s end

boolean
details

Additional, code-specific error details

object
meta

Standard response metadata

object
timestamp

Response timestamp in ISO 8601 format

string format: date-time
version

API version

string
requestId

Unique request identifier

string
Example
{
"success": false,
"error": {
"code": "survey_not_found"
},
"meta": {
"version": "3.0"
}
}

Forbidden - insufficient permissions

Media typeapplication/json

Standard error response format

object
success
boolean
error
object
code

Stable, snake_case domain code – see ApiErrorHandler::EXCEPTION_MAP and DomainException

string
message

Human-readable error message

string
suggestion

Imperative recovery hint for this domain code – see ApiErrorHandler::DOMAIN_CODE_SUGGESTIONS

string
retryable

Whether retrying the identical request might succeed without any change on the caller’s end

boolean
details

Additional, code-specific error details

object
meta

Standard response metadata

object
timestamp

Response timestamp in ISO 8601 format

string format: date-time
version

API version

string
requestId

Unique request identifier

string
Example
{
"success": false,
"error": {
"code": "survey_not_found"
},
"meta": {
"version": "3.0"
}
}

Rate limit exceeded

Media typeapplication/json

Standard error response format

object
success
boolean
error
object
code

Stable, snake_case domain code – see ApiErrorHandler::EXCEPTION_MAP and DomainException

string
message

Human-readable error message

string
suggestion

Imperative recovery hint for this domain code – see ApiErrorHandler::DOMAIN_CODE_SUGGESTIONS

string
retryable

Whether retrying the identical request might succeed without any change on the caller’s end

boolean
details

Additional, code-specific error details

object
meta

Standard response metadata

object
timestamp

Response timestamp in ISO 8601 format

string format: date-time
version

API version

string
requestId

Unique request identifier

string
Example
{
"success": false,
"error": {
"code": "survey_not_found"
},
"meta": {
"version": "3.0"
}
}