API Reference
API Reference

/surveys/templates/:id

Returns a single survey master template 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.

Only the latest, non-deleted master template in the survey category is returned. Templates belonging to a different category (for example performance reviews) return 404.

Results

{
  "id": "b2f0c1de-5a7e-4c1b-9d2a-0f6c3e8a91d4",
  "title": "Quarterly Engagement Pulse",
  "updated_at": "2025-01-10T09:30:00.000Z",
  "version": 2,
  "questionnaire": {
    "sections": [
      {
        "id": "2501ee00-0002-51cc-8e1c-6b29548a3d01",
        "body": "<p>Your experience</p>",
        "questions": [
          {
            "id": "2501ee00-0003-51cc-8e1c-6b29548a3d01",
            "body": "<p>What part of your role gives you the most energy right now?</p>",
            "type": "paragraph"
          },
          {
            "id": "2501ee00-0004-51cc-8e1c-6b29548a3d01",
            "body": "<p>Do you feel supported by your manager?</p>",
            "type": "single_choice",
            "metadata": {
              "mandatory": true,
              "answer_options": {
                "choices": {
                  "yes": "Yes",
                  "no": "No"
                }
              },
              "has_conditional_navigation": true,
              "navigation_config": {
                "rules": {
                  "yes": {
                    "type": "next_question"
                  },
                  "no": {
                    "type": "go_to_question",
                    "id": "2501ee00-0006-51cc-8e1c-6b29548a3d01"
                  }
                }
              }
            }
          },
          {
            "id": "2501ee00-0005-51cc-8e1c-6b29548a3d01",
            "body": "<p>How would you rate your work-life balance?</p>",
            "type": "star_rated",
            "metadata": {
              "mandatory": true,
              "rating_options": {
                "1": "Poor",
                "2": "Fair",
                "3": "Good",
                "4": "Very good",
                "5": "Excellent"
              }
            }
          },
          {
            "id": "2501ee00-0006-51cc-8e1c-6b29548a3d01",
            "body": "<p>What could your manager do differently?</p>",
            "type": "paragraph"
          }
        ]
      }
    ]
  },
  "default": false,
  "sample": false,
  "disabled": false
}
keytypedescription
idstringMaster template id
titlestringTitle of the template
updated_atstringISO 8601 timestamp of the last update in the template registry (omitted when unknown)
versionintegerTemplate version
questionnaireobjectTemplate questionnaire
questionnaire.sectionsarrayOrdered list of sections
questionnaire.sections[].idstringSection id
questionnaire.sections[].bodystringSection title / header text (may contain HTML)
questionnaire.sections[].questionsarrayOrdered list of questions in the section
questionnaire.sections[].questions[].idstringQuestion id
questionnaire.sections[].questions[].bodystringQuestion text (may contain HTML)
questionnaire.sections[].questions[].typestringQuestion type in snake_case. One of: paragraph, paragraph_star_rated, paragraph_numeric_rated, paragraph_custom_rated, single_choice, multiple_choice, star_rated, numeric_rated, custom_rated
questionnaire.sections[].questions[].metadataobjectOptional metadata for the question
questionnaire.sections[].questions[].metadata.mandatorybooleanWhether an answer is required
questionnaire.sections[].questions[].metadata.semantic_typestringSemantic role of the question. One of: section_rating, overall_rating
questionnaire.sections[].questions[].metadata.rating_optionsobjectMap of rating value to label
questionnaire.sections[].questions[].metadata.answer_optionsobjectMap of choice key to label, wrapped under choices
questionnaire.sections[].questions[].metadata.has_conditional_navigationbooleanWhether the question uses conditional navigation (skip logic)
questionnaire.sections[].questions[].metadata.navigation_config.rulesobjectMap of choice key to navigation rule
questionnaire.sections[].questions[].metadata.navigation_config.rules.*.typestringWhere to go when the choice is selected. One of: next_question, go_to_question, go_to_section, submit
questionnaire.sections[].questions[].metadata.navigation_config.rules.*.idstringTarget question / section id. Present for go_to_question and go_to_section
defaultbooleanWhether this is a default template
samplebooleanWhether this is a sample template
disabledbooleanWhether the template is disabled

Error responses

StatusCondition
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 template exists with the supplied id

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

Path Params
string
required

Master template id

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