Skip to main content

Survey Templates API

The Survey Templates API allows you to create, customize, and manage reusable templates for employee mobility surveys. Templates define which questions appear in the survey, the work mode (hybrid, in-person, remote), and any custom fields.
Customizable SurveysTemplates control the survey experience for employees. Depending on the work mode selected, different questions are shown or hidden automatically. The backend sends default values for hidden questions to ensure CO2e calculations remain accurate.

Key Features

  • Work Modes: Configure surveys for hybrid, in-person only, or remote-only teams
  • Step Configuration: Enable/disable, reorder, and set questions as required or optional
  • Custom Fields: Add organization-specific questions (text, number, select, boolean)
  • Default Templates: Mark a template as the organization default for quick survey creation
  • Clone & Iterate: Duplicate templates to create variations without starting from scratch
  • Versioning: Templates auto-increment version on each update for response traceability

Authentication

All endpoints require authentication using an API key or JWT token, plus the organization header.

Headers

x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef

Available Endpoints

List Templates

Retrieve all survey templates for your organization

Create Template

Create a new survey template

Get Template

Get a specific template by ID

Update Template

Modify template configuration

Delete Template

Soft-delete a template

Clone Template

Duplicate an existing template

Set Default

Set a template as the organization default

Data Model

Template Object

Work Modes

ModeDescriptionHidden Questions
hybridShows all questionsNone
in_person_onlyOffice-only teamsWork model, hours/day, telecommuting days
remote_onlyRemote-only teamsTransport, distance, fuel type, carpooling, commuting address

Step Keys

KeyTypeDescription
start_datedateMeasurement period dates
nametextEmployee name or ID (optional)
hours_worked_per_daynumberHours worked per day
telecommuteselectWork model (telecommute vs office)
weekly_travelsnumberDays commuting per week
weekly_telecommutingnumberDays working from home per week
daily_tripsnumberRound trips per day
total_kmnumberOne-way distance in km
transportselectPrimary transport mode
fuel_typeselectFuel type (conditional on transport)
carpoolingselectCar sharing (conditional on car)
commuting_addresstextOrigin/destination addresses

Step Configuration

Each step in the config.steps array has:
FieldTypeDescription
keystringStep identifier (from Step Keys table)
enabledbooleanWhether the step appears in the survey
requiredbooleanWhether the step is mandatory
default_valueanyDefault value when step is hidden
descriptionstringCustom subtitle shown under the question
orderintegerDisplay order (1-based)

Custom Fields

Custom fields allow adding organization-specific questions:
Field TypeDescription
textShort text answer
numberNumeric input
selectDropdown with predefined options
booleanYes/No toggle

Workflow

Creating a Customized Survey

  1. Create Template: Define name, work mode, and question configuration
  2. Customize Steps: Enable/disable and reorder questions
  3. Add Custom Fields: Add organization-specific questions
  4. Set as Default: Mark as the organization’s default template
  5. Send Survey: Use the template when sending surveys via CSV upload or QR code

Using Templates with Surveys

When sending surveys via POST /v1/employees/csv or generating QR codes, pass the template_id parameter to use a specific template. If omitted, the organization’s default template is used.

Employees API

Manage employee records and commuting data

CSV Import

Bulk import employees and send surveys