Skip to content

Get survey

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

Get single survey with proper authorization. Returns survey details including settings and metadata. The response carries the resource’s ETag, as the ETag header and as meta.etag; send it back as If-Match on an update.

id
required
string
>= 16 characters <= 16 characters

Survey ID

Survey details

Media typeapplication/json
object
success
boolean
data

Survey basic information

object
id

Survey ID

string
>= 16 characters <= 16 characters
name

Survey name

string
description

Survey description

string
nullable
language

Survey language code

string
type

Survey type

integer
active

Survey status (0=inactive, 1=active)

integer
ownedAccountId

Owner account ID

string
>= 16 characters <= 16 characters
createdAt
string format: date-time
updatedAt
string format: date-time
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
etag

The resource’s ETag, on a read, create or update of a survey, element, rating or NPS question, distributor or contact. The same value as the ETag response header. Treat it as opaque and send it back as If-Match on the next update.

string
Example
{
"success": true,
"meta": {
"version": "3.0"
}
}
ETag
string
Example
"element:abc123:1790690123456789"

The resource’s current version, as a strong validator. Opaque: send it back unchanged as If-Match. Also returned as meta.etag in the body, for a client that only sees the body.

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
etag

The resource’s ETag, on a read, create or update of a survey, element, rating or NPS question, distributor or contact. The same value as the ETag response header. Treat it as opaque and send it back as If-Match on the next update.

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
etag

The resource’s ETag, on a read, create or update of a survey, element, rating or NPS question, distributor or contact. The same value as the ETag response header. Treat it as opaque and send it back as If-Match on the next update.

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

Survey 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
etag

The resource’s ETag, on a read, create or update of a survey, element, rating or NPS question, distributor or contact. The same value as the ETag response header. Treat it as opaque and send it back as If-Match on the next update.

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