Skip to content

Get element details

GET
/elements/{id}
curl --request GET \
--url https://app.surveyrock.com/api/v1/elements/example \
--header 'Authorization: Bearer <token>'

Get single element with proper authorization. Returns element details including settings, question text, and metadata.

id
required
string
>= 16 characters <= 16 characters

Element ID

Element details

Media typeapplication/json
object
success
boolean
data

Survey element (question) full details

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
settings

Element configuration settings

object
typeSettings

Question type specific settings

object
responseValidation

Response validation rules

object
statements

Element statements (for matrix, slider, etc.)

Array<object>

Element statement (row in matrix questions)

object
id

Statement ID

string
>= 16 characters <= 16 characters
text

Statement text

string
sortOrder

Display order

integer
isLocked

Whether statement is locked in position

boolean
isHidden

Whether statement is hidden

boolean
isNA

Whether statement is N/A option

boolean
choices

Element choices (for multiple choice, etc.)

Array<object>

Element choice (option in multiple choice questions)

object
id

Choice ID

string
>= 16 characters <= 16 characters
sortOrder

Display order

integer
details

Choice metadata

object
text

Choice text

string
imageUrl

Choice image URL

string
nullable
value

Choice value

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 - invalid element ID

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 - access denied to element

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"
}
}

Element not found

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"
}
}