Skip to main content

Start a new survey session or restart a current one

POST 

/surveys/sessions

Creates a survey session token, which is returned back to the client along with the id of the first question for this survey

Request

Body

required

The start survey request

    language string

    ISO 639-1: two-letter code, defaults to en

    token string

    Optional token to identify this session. Will be auto-generated if omitted

    reset boolean

    Resets the answered survey if true

    sector string

    Possible values: [transport, lifestyle, diet, home, publicservices, intro, personal, summary]

    If a specific sector-specific questionnaire is to be created with this session.

Responses

Returns a newly created token to be used throughout to identify the session in subsequent requests along with the id of the first question to be answered

Schema

    token stringrequired

    Token identifying this session

    firstQuestionId stringrequired

    The first unanswered question in the questionnaire

    isComplete booleanrequired

    Boolean indicating if survey is complete

Loading...