---
title: "/survey/history/{surveyKey}"
method: GET
path: "/survey/history/{surveyKey}"
tags: ["Survey"]
---

# /survey/history/{surveyKey}

`GET /survey/history/{surveyKey}`

Get all versions of survey by Survey Key

## Path parameters

- `surveyKey` string, required

## Query parameters

- `page` number
- `limit` number
- `sort` Sort
  - `property` string, required — Name of the property to sort
  - `direction` 'asc' | 'desc', required — 'asc' or 'desc' to order the result

## Headers

- `octa-agent-email` string

## Response `201`

- SurveyDTO[]
  - `key` string, required — UUID key of a survey version.
  - `subDomain` string, required — Subdomain of the survey.
  - `name` string, required — Name of the survey.
  - `baseSurveyKey` string, required — UUID key of a survey.
  - `isActive` string, required — Flag idicates if the current version od a survey is active.
  - `channels` string, required — Array of channel items where the survey is configured.
  - `customize` CustomizeDTO, required
    - `title` string — Custom title for survey visualization.
    - `header` HeaderDTO
      - `ticket` string — Custom page header for Ticket survey visualization.
      - `chat` string — Custom page header for Chat survey visualization.
    - `questionBuilder` QuestionDTO, required
      - `type` string, required — Question type.
      - `question` string, required — Question text.
      - `required` boolean, required — Flag for question is required.
      - `minLabel` string — Label for question minimum value.
      - `maxLabel` string — Label for question maximum value.
      - `rangeStart` number — Start range for question value.
      - `rangeEnd` number, required — End range for question value.
      - `format` string, required — Question format.
      - `options` string[], required — Custom options for question.
      - `answer` string — Answser expected for question.
    - `buttonText` string, required — Custom text for a submit button in survey visualization.
  - `configure` ConfigureItemDTO[], required — Array of configurations applied to the survey for different chat and ticket.
    - `type` string, required — Survey domain type (CHAT, TICKET, etc).
    - `title` string — Optional title shown in the config.
    - `text` string — Text body of the configuration.
    - `emailBody` string — Email body to be used when type is TICKET.
    - `isAgentAllowedToResend` boolean — Indicates if agents can resend the survey.
    - `isClientAllowedToEdit` boolean, required — Indicates if clients can edit their survey answers.
    - `timeToClose` TimeToCloseItemDTO, required
      - `days` number, required — Days until auto-close.
      - `hours` number, required — Hours until auto-close.
      - `minutes` number, required — Minutes until auto-close.
    - `successMessage` string — Success message after user submits the survey.
    - `eventHandler` EventHandlerItemDTO, required
      - `domainType` number, required — The domain type where the event will be applied.
      - `type` string, required — The type of event to trigger.
      - `condition` ConditionItemDTO, required
        - `filtersAnd` FilterItemDTO[], required — All filters that must be satisfied (AND logic).
          - `description` string, required — Description of the filter condition.
          - `propertyName` string, required — Property name being evaluated in the filter.
          - `operator` number, required — Comparison operator applied in the filter.
          - `valueCompare` string, required — Single value used in comparison.
          - `valuesCompare` string[], required — Array of values used in comparison.
          - `isRecorded` boolean — Whether this property is a recorded value.
          - `isValuePropertyCompare` boolean — Whether to compare against a property instead of a fixed value.
          - `objectsCompare` object[] — Array of objects for additional logic comparisons.
          - `expressionValueResolve` string — Optional expression to resolve the value of this filter.
        - `filtersOr` FilterItemDTO[], required — Any filter that can be satisfied (OR logic).
          - `description` string, required — Description of the filter condition.
          - `propertyName` string, required — Property name being evaluated in the filter.
          - `operator` number, required — Comparison operator applied in the filter.
          - `valueCompare` string, required — Single value used in comparison.
          - `valuesCompare` string[], required — Array of values used in comparison.
          - `isRecorded` boolean — Whether this property is a recorded value.
          - `isValuePropertyCompare` boolean — Whether to compare against a property instead of a fixed value.
          - `objectsCompare` object[] — Array of objects for additional logic comparisons.
          - `expressionValueResolve` string — Optional expression to resolve the value of this filter.
      - `executionDelay` ExecutionDelayItemDTO
        - `days` number, required — Number of days before executing the event.
        - `hours` number, required — Number of hours before executing the event.
        - `minutes` number, required — Number of minutes before executing the event.
      - `metadata` object — Metadata associated with the event.

---

[API](https://skmtc.net/octadesk/apis/octadesk-api.md) · [All operations](https://skmtc.net/octadesk/apis/octadesk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octadesk/octadesk-api/revisions/bc5e6dccb979/schema)
