API Reference
API Reference

/surveys/:id

Returns a single survey cycle by id. Required scope: r_surveys.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

This endpoint uses the r_surveys scope, which must be enabled through the Integrations section found within the Settings menu.

Requires a user token whose member has permission to view survey cycles, or an account token together with the member_id query parameter of such a member (the request is then evaluated with that member's permissions). An account token without member_id gets 403 Account tokens need a member_id for this operation. The account must have the Surveys feature enabled.

The id is the survey cycle key returned by the list endpoint. Deleted survey cycles return 404. Members whose survey view permission is granted through a scoped role receive 404 for survey cycles outside their scope (unless they participate in the survey).

Results

{
  "id": "4d4",
  "name": "Q1 Engagement Pulse",
  "welcome_message": "<p>Tell us how things are going this quarter.</p>",
  "state": "active",
  "type": "cycle",
  "template_id": "b2f0c1de-5a7e-4c1b-9d2a-0f6c3e8a91d4",
  "start_date": "2025-03-01T08:00:00.000Z",
  "end_date": "2025-03-15T20:00:00.000Z",
  "timezone": "Europe/Athens",
  "is_anonymous": true,
  "min_responses_required": 3,
  "participant_count": 42,
  "employee_sharing_type": "all",
  "created_at": "2025-02-15T10:00:00.000Z",
  "updated_at": "2025-03-01T08:00:00.000Z"
}
keytypedescription
idstringSurvey cycle key
namestringName of the survey
welcome_messagestring | nullWelcome message shown to participants (HTML)
statestringSurvey state. One of: draft, scheduled, active, closed, archived
typestring | nullHow the survey is distributed. cycle for a survey sent to participants on a date-based schedule, workflow_task for a survey sent as a task of a workflow
template_idstring | nullId of the survey master template the questionnaire is based on (see GET /surveys/templates/:id)
start_datestring | nullISO 8601 timestamp the survey starts (or started)
end_datestring | nullISO 8601 timestamp the survey ends (or ended)
timezonestring | nullIANA timezone the survey dates are scheduled in
is_anonymousbooleanWhether responses are anonymous. For anonymous surveys the answers endpoint never exposes participant identity
min_responses_requiredintegerMinimum number of submitted responses required before results of an anonymous survey are revealed. 0 means no threshold
participant_countintegerNumber of participants assigned to the survey
employee_sharing_typestring | nullWho the survey is shared with. One of: all, selected, custom
created_atstringISO 8601 timestamp of creation
updated_atstringISO 8601 timestamp of the last update

Error responses

StatusCondition
400id is not a valid survey cycle key
401Missing or invalid token
403Missing r_surveys scope, account token without member_id, the Surveys feature is not enabled for the account, or the user lacks permission to view survey cycles
404No survey cycle with the supplied id exists in the account, it is deleted, or it is outside the member's scope

Error bodies: 401 / 403 responses are plain text holding the reason (e.g. Required scopes missing: ["r_surveys"]). 404 responses are JSON of the form {"message": "..."}. 400 validation errors are JSON keyed by the offending field, e.g. {"limit": {"code": "number.min", "message": "\"limit\" must be greater than or equal to 1"}}.

Path Params
string
required

Survey cycle key (as returned by GET /surveys)

Query Params
string

Required when using an account token: the member (SPI key, from GET /members) to act as. The request is evaluated with that member's permissions; without it the request gets 403. Ignored for user tokens.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain