> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Respondent

> API endpoint for adding a new respondent with quality check data



## OpenAPI

````yaml POST /addRespondent
openapi: 3.0.1
info:
  title: API Documentation
  description: API Documentation for Redem 3.0
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.redem.io
security:
  - apiKeyAuth: []
tags:
  - name: Survey
    description: Survey management
  - name: Respondent
    description: Respondent management
paths:
  /addRespondent:
    post:
      tags:
        - Respondent
      summary: Add a new respondent
      description: API endpoint for adding a new respondent with quality check data
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRespondentRequest'
            example:
              respondentId: RESP497770
              surveyName: Global Vacation Insights 2024
              dataPoints:
                - qualityCheck: OES
                  dataPointId: Q1
                  question: Where did you spend your last vacation?
                  answer: We were at Lake Garda in Italy
                  keywords:
                    - Beach
                    - Mountains
                    - Lake
                    - Museums
                    - Europe
                    - Asia
                    - Destination
                  activateDuplicateDetection: true
                  allowedLanguages:
                    - en
                    - de
                    - it
                - qualityCheck: TS
                  dataPointId: durationQ1
                  duration: 42670
                - qualityCheck: GQS
                  dataPointId: Q2
                  gridAnswersPattern:
                    - 7
                    - 8
                    - 9
                    - 1
                    - 3
                    - 5
                    - 2
                    - 5
                    - 9
                    - 6
                  patternCheckEnabled: true
                - qualityCheck: OES
                  dataPointId: Q3
                  question: What was the most memorable part of your last vacation?
                  answer: Italian cuisine, especially pizza and fine wine.
                  keywords:
                    - Cuisine
                    - Food
                    - Art
                    - Adventure
                    - History
                    - Landscape
                    - Culture
                  activateDuplicateDetection: true
                  allowedLanguages:
                    - en
                    - de
                    - it
                - qualityCheck: TS
                  dataPointId: durationQ3
                  duration: 69720
                - qualityCheck: CHS
                  dataPointId: CHS_Question
                  surveyDescription: >-
                    This survey aims to understand travel preferences and
                    vacation experiences of European travelers, focusing on
                    accommodation choices, transportation methods, and budget
                    allocation.
                  interviewData:
                    - question: What mode of transport did you use?
                      answer: Car
                    - question: How many days did you stay?
                      answer: 5
                    - question: Did you travel with family?
                      answer: 'yes'
                    - question: >-
                        What was your approximate total budget for the trip (in
                        EUR)?
                      answer: 1500
                    - question: What type of accommodation did you stay in?
                      answer: Hotel
                - qualityCheck: GQS
                  dataPointId: Q4
                  gridAnswersPattern:
                    - 2
                    - 1
                    - 4
                    - 3
                    - 5
                    - 2
                    - 3
                    - 1
                    - 1
                    - 1
                  patternCheckEnabled: false
                - qualityCheck: TS
                  dataPointId: totalDuration
                  duration: 256843
                - qualityCheck: BAS
                  dataPointId: interactionsQ1
                  interactionData:
                    - interactionType: KEYSTROKE
                      value: W
                      timestamp: '2024-12-01T06:22:59.809Z'
                    - interactionType: KEYSTROKE
                      value: We
                      timestamp: '2024-12-01T06:22:59.833Z'
                    - interactionType: KEYSTROKE
                      value: 'We '
                      timestamp: '2024-12-01T06:22:59.909Z'
                    - interactionType: KEYSTROKE
                      value: We w
                      timestamp: '2024-12-01T06:22:59.962Z'
                    - interactionType: KEYSTROKE
                      value: We we
                      timestamp: '2024-12-01T06:23:00.024Z'
                    - interactionType: KEYSTROKE
                      value: We were
                      timestamp: '2024-12-01T06:23:00.086Z'
                    - interactionType: KEYSTROKE
                      value: 'We were '
                      timestamp: '2024-12-01T06:23:00.148Z'
                    - interactionType: KEYSTROKE
                      value: We were a
                      timestamp: '2024-12-01T06:23:00.210Z'
                    - interactionType: KEYSTROKE
                      value: We were at
                      timestamp: '2024-12-01T06:23:00.272Z'
              activateCleaning: true
              cleaningSettings:
                redemScore: 60
                OES:
                  activate: true
                  score: 40
                  minDataPoints: 2
                  categories:
                    GENERIC_ANSWER:
                      activate: false
                      minDataPoints: 2
                    NO_INFORMATION:
                      activate: false
                      minDataPoints: 2
                    BAD_LANGUAGE:
                      activate: true
                      minDataPoints: 2
                    NONSENSE:
                      activate: true
                      minDataPoints: 2
                    DUPLICATE_ANSWER:
                      activate: false
                      minDataPoints: 1
                    DUPLICATE_RESPONDENT:
                      activate: false
                      minDataPoints: 1
                    WRONG_TOPIC:
                      activate: true
                      minDataPoints: 2
                    WRONG_LANGUAGE:
                      activate: true
                      minDataPoints: 2
                    AI_GENERATED_ANSWER:
                      activate: true
                      minDataPoints: 2
                CHS:
                  activate: true
                  score: 20
                GQS:
                  activate: true
                  score: 10
                  minDataPoints: 2
                TS:
                  activate: true
                  score: 20
                BAS:
                  activate: true
                  score: 10
                  minDataPoints: 2
                  categories:
                    UNNATURAL_TYPING:
                      activate: true
                      minDataPoints: 2
                    COPY_AND_PASTE:
                      activate: true
                      minDataPoints: 2
              synchronousResponse: true
      responses:
        '200':
          description: >-
            When a request is successfully processed, the API returns a 200 OK
            status code along with the expected data. The structure of the
            response depends on the synchronousResponse parameter provided in
            the request body, which determines whether the response is
            synchronous (results of the respondent evaluation are returned
            immediately) or asynchronous (a respondent is created and the
            results of the respondent evaluation are available later through a
            separate endpoint).
          content:
            application/json:
              schema:
                oneOf:
                  - title: Synchronous Response
                    description: >-
                      **Synchronous Response** 


                      This response mode is triggered when `synchronousResponse`
                      is set to `true`. 

                       In this mode, the system generates a detailed response containing all quality parameters of the respondent. The request will wait (`await`) until the full response is ready before proceeding.
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: >-
                          A variable indicating whether the **operation was
                          successful**.
                        enum:
                          - true
                          - false
                      message:
                        type: string
                        description: >-
                          A variable that **human-readable message** providing
                          additional context or confirmation of the requested
                          action.
                      results:
                        type: object
                        description: >-
                          This variable includes **all quality parameters
                          associated with a respondent**.
                        properties:
                          respondentId:
                            type: string
                            description: A variable that **indicates the respondent**.
                          status:
                            type: string
                            description: >-
                              A variable that represents the current state of
                              the respondent evaluation. For synchronous
                              responses, this value will always be `COMPLETED`. 
                            enum:
                              - COMPLETED
                          respondentQuality:
                            $ref: '#/components/schemas/RespondentResults'
                            description: >-
                              This variable includes **all quality parameters
                              associated with a respondent**. 

                               **💡Important:** Even if a respondent fails evaluation, the response will still be returned with results with an error code of `-999` instead of valid scores. 

                               **⭕ Note:** The value `-999` is a predefined code returned by **ReDem** whenever a respondent cannot be evaluated. This applies to all quality scores, **including ReDem Score (R-Score), OES, GQS, CHS, TS, and BAS**.
                  - title: Asynchronous Response
                    description: >-
                      **Asynchronous Response** 


                      This response mode is triggered when `synchronousResponse`
                      is set to `false`. 

                       In this case, the system generates a detailed response and processes it asynchronously, meaning the request will not wait (`await`) for the evaluation to complete. Instead, the evaluation is performed in the background, and the status of the respondent can be retrieved later using the [Get Respondent Status](/api-reference/endpoints/v1/getRespondent) endpoint.
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: >-
                          A variable indicating whether the **operation was
                          successful**.
                        enum:
                          - true
                          - false
                      message:
                        type: string
                        description: >-
                          A variable that **human-readable message** providing
                          additional context or confirmation of the requested
                          action.
                      results:
                        type: object
                        description: >-
                          This variable includes **all quality parameters
                          associated with a respondent**.
                        properties:
                          respondentId:
                            type: string
                            description: A variable that **indicates the respondent**.
                          status:
                            type: string
                            description: >-
                              A variable that represents the **current state of
                              the respondent evaluation**.
                            enum:
                              - QUEUED
              examples:
                Synchronous Response:
                  summary: Synchronous Response Example
                  value:
                    success: true
                    message: Respondent Evaluated successfully
                    results:
                      respondentId: RESP497770
                      status: COMPLETED
                      respondentQuality:
                        isExcluded: true
                        reasonsForExclusion:
                          - Open Ended Score Threshold
                          - Coherence Score Threshold
                        redemScore: 85
                        qualityScoreSummary:
                          - qualityCheck: OES
                            score: 80
                          - qualityCheck: CHS
                            score: 75
                            reason: >-
                              The user shows several inconsistencies and
                              contradictions, such as different ...
                            incoherentQuestions:
                              - Q1
                              - Q2
                          - qualityCheck: GQS
                            score: 85
                          - qualityCheck: TS
                            score: 70
                          - qualityCheck: BAS
                            score: 75
                        dataPointsSummary:
                          - qualityCheck: OES
                            dataPointId: Q1
                            score: 85
                            category: VALID_ANSWER
                          - qualityCheck: TS
                            dataPointId: durationQ1
                            score: 95
                          - qualityCheck: GQS
                            dataPointId: Q2
                            score: 90
                          - qualityCheck: OES
                            dataPointId: Q3
                            score: 75
                            category: VALID_ANSWER
                          - qualityCheck: TS
                            dataPointId: durationQ3
                            score: 50
                          - qualityCheck: CHS
                            dataPointId: CHS_Question
                            score: 75
                            reason: >-
                              The user shows several inconsistencies and
                              contradictions, such as different ...
                          - qualityCheck: GQS
                            dataPointId: Q4
                            score: 80
                          - qualityCheck: TS
                            dataPointId: totalDuration
                            score: 65
                          - qualityCheck: BAS
                            dataPointId: interactionsQ1
                            score: 75
                            category: NATURAL_TYPING
                Asynchronously Response:
                  summary: Asynchronous Response Example
                  value:
                    success: true
                    message: Respondent Queued for Evaluation
                    results:
                      respondentId: RESP497770
                      status: QUEUED
        '400':
          description: >-
            When a request fails due to invalid input or other errors, the API
            returns a 400 Bad Request status code. The response includes a
            descriptive `message` explaining the issue and an `error` object
            containing additional details to aid in diagnosing and resolving the
            problem.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Validation Error
                    description: >-
                      Indicating a validation failure, the response includes a
                      `message` field specifying the issue and an `errors`
                      object listing the missing or incorrect fields to help
                      clients resolve them. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: ID already exists
                    description: >-
                      If the system detects a duplicate `respondentId` within
                      the same survey, it returns an error. The `respondentId`
                      serves as a unique identifier for each respondent within a
                      survey, ensuring they are distinguishable. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Survey has been stopped
                    description: >-
                      If a respondent addition request is made for a survey that
                      is **stopped**, the system returns an error. A **stopped**
                      survey no longer accepts new respondents, preventing
                      further additions. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Insufficient credit balance
                    description: >-
                      If there are **not enough credits available to add a
                      respondent**, the system returns an error. Adding
                      respondents requires sufficient credits, and if the limit
                      is reached, no further respondents can be added. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Respondent processing timed out
                    description: >-
                      If processing a respondent **exceeds 20 seconds**, the
                      system returns an error. If the processing time surpasses
                      this threshold, the request continues in the background,
                      but an error response is returned. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Validation Error
                    errors:
                      '0': '"surveyName" is required'
                      '1': '"dataPoints[0].dataPointId" is required'
                ID already exists:
                  value:
                    success: false
                    message: ID already exists
                    errors: {}
                Survey has been stopped:
                  value:
                    success: false
                    message: Survey has been stopped
                    errors: {}
                Insufficient credit balance:
                  value:
                    success: false
                    message: Insufficient credit balance
                    errors: {}
                Respondent processing timed out:
                  value:
                    success: false
                    message: Respondent processing timed out
                    errors: {}
        '429':
          description: >-
            Too Many Requests. This API key exceeded the configured per-minute
            rate limit. Standard keys are limited to 600 requests per minute for
            addRespondent; premium keys may be configured for higher limits.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: rate_limit_exceeded
                  message:
                    type: string
                    example: This API key exceeded 600 requests per minute.
                  statusCode:
                    type: number
                    example: 429
              example:
                error: rate_limit_exceeded
                message: This API key exceeded 600 requests per minute.
                statusCode: 429
components:
  schemas:
    AddRespondentRequest:
      description: |-
        Request body for adding a new respondent 

         **🔒 Authentication:** This endpoint can be accessed using both `PRIVATE` and `PUBLIC` API key types
      required:
        - respondentId
        - surveyName
        - dataPoints
      type: object
      properties:
        respondentId:
          type: string
          description: >-
            **The unique identifier for a respondent**, making it easy to
            distinguish them from others in the survey. The respondent ID can be
            freely chosen for flexibility.


            **💡 Important:** The system utilizes this ID, combined with the
            survey name, to uniquely identify the respondent within a survey.
            This allows the same respondent ID to participate in multiple
            surveys without conflicts. 


            If the combination of survey name and respondent ID already exists,
            an error will be displayed. 

             **🔦 Tip:** You can use the same respondent ID as in the survey tool to easily identify the respondent later.
          example: RESP497770
        surveyName:
          type: string
          description: >-
            **The name of the survery**, which helps identify different surveys.
            The survey name can be assigned freely. 


            **💡Important:** If the survey name already exists, the system will
            add the respondent under the appropriate survey. If the survey name
            is new, a new survey will be created, and the respondent will be
            added to the new survey. 

             **⭕ Note:** Each survey identifier must be unique. 

             **🔦 Tip:** you can simply make survey name unique by adding a timestamp. 
             As Example: `Global Vacation Insights - 1709040600`
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/DataPoint'
          description: >-
            An array of data points used for quality checks on each respondent.
            For the Coherence Score (CHS), only a single data point is allowed,
            which must contain the entire interview.

             🧪 **Validations:** 
             - A **maximum of 10** `OES` data points are allowed per respondent. 
             - A **maximum of 100** `TS` data points are allowed per respondent. 
             - A **maximum of 20** `GQS` data points are allowed per respondent. 
             - A **maximum of 1 with 300 question/answer pairs** `CHS` data point is allowed per respondent. 

             Exceeding these limits will trigger validation errors. Ensure that the number of data points per respondent remains within the allowed limits.
        activateCleaning:
          type: boolean
          description: |-
            **Indicates whether cleaning should be applied to the respondent**. 

             **💡Important:** To get an indicator whether respondents should be removed from the sample, ensure this variable is set to true. 

             When cleaning is enabled, the response will include the variable isExcluded, which indicates whether the respondent has been excluded based on the applied criteria.
          example: true
          default: false
        cleaningSettings:
          $ref: '#/components/schemas/CleaningSettings'
          description: >-
            Cleaning settings define the rules for determining whether a
            respondent should be excluded and marked as low quality. If a
            **respondent’s scores fall below the threshold, they will be
            excluded and flagged as low quality**.

             **💡Important:** If no custom cleaning settings are defined and cleaning is enabled, the system will apply ReDem’s recommended cleaning settings. You can view the recommended settings here: [ReDem Recommended Cleaning Settings](/knowledge-base/features/cleaning-and-review#redem-recommended-cleaning-settings) 
             
             For more details on how cleaning works, refer to the [Data Cleaning](/knowledge-base/features/cleaning-and-review) section.
        synchronousResponse:
          type: boolean
          description: >-
            **Indicates whether the response should be processed
            synchronously**. 

             - Set to `true` if you need an immediate response. 
             - Set to false if you don’t need to wait; you can later check the respondent’s status using the [Get Respondent Status endpoint](/api-reference/endpoints/v1/getRespondent).
          example: true
          default: true
    RespondentResults:
      description: Complete quality assessment for a respondent
      type: object
      properties:
        isExcluded:
          type: boolean
          description: >-
            **Indicates whether a respondent is excluded based on the cleaning
            settings specified in the request**. If cleaning is not activated,
            the respondent is always included by default.
          example: false
        reasonsForExclusion:
          type: array
          items:
            type: string
          description: >-
            **Reasons for exclusion** will only be available if the respondent
            is excluded based on the cleaning settings specified in the request.
            If the respondent is not excluded, the array will be empty.
        redemScore:
          type: number
          description: >-
            **A weighted average score** (0–100) calculated based on the applied
            quality scores.. 

             For more information refer to the [ReDem Score](/quality-checks/redem-score) section.
          example: 85
        qualityScoreSummary:
          type: array
          items:
            $ref: '#/components/schemas/QualityCheckResponse'
          description: An object containing detailed results for each quality score applied
        dataPointsSummary:
          type: array
          items:
            $ref: '#/components/schemas/DataPointsQualityResponse'
          description: >-
            Detailed results of quality checks performed at the individual data
            point level.
    DataPoint:
      description: >-
        An array of data points used to perform quality checks on each
        respondent.
      type: object
      discriminator:
        propertyName: qualityCheck
        mapping:
          OES:
            $ref: '#/components/schemas/OESDataPoint'
          TS:
            $ref: '#/components/schemas/TSDataPoint'
          GQS:
            $ref: '#/components/schemas/GQSDataPoint'
          CHS:
            $ref: '#/components/schemas/CHSDataPoint'
          BAS:
            $ref: '#/components/schemas/BASDataPoint'
      oneOf:
        - $ref: '#/components/schemas/OESDataPoint'
        - $ref: '#/components/schemas/TSDataPoint'
        - $ref: '#/components/schemas/GQSDataPoint'
        - $ref: '#/components/schemas/CHSDataPoint'
        - $ref: '#/components/schemas/BASDataPoint'
    CleaningSettings:
      description: Configuration for data cleaning and review process
      type: object
      properties:
        redemScore:
          type: number
          description: Minimum acceptable ReDem score (0-100)
          example: 60
        OES:
          type: object
          properties:
            activate:
              type: boolean
              description: >-
                Indicates whether **OES** should be applied as a cleaning
                parameter.
              example: true
            score:
              type: number
              description: Minimum score threshold for OES checks
              example: 40
            minDataPoints:
              type: number
              description: Minimum number of data points required
              example: 2
            categories:
              type: object
              properties:
                GENERIC_ANSWER:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                NO_INFORMATION:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                BAD_LANGUAGE:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                NONSENSE:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                DUPLICATE_ANSWER:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                DUPLICATE_RESPONDENT:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                WRONG_TOPIC:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                WRONG_LANGUAGE:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                AI_GENERATED_ANSWER:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
        CHS:
          type: object
          properties:
            activate:
              type: boolean
              description: >-
                Indicates whether **CHS** should be applied as a cleaning
                parameter.
              example: true
            score:
              type: number
              description: Minimum score threshold for CHS checks
              example: 30
        GQS:
          type: object
          properties:
            activate:
              type: boolean
              description: >-
                Indicates whether **GQS** should be applied as a cleaning
                parameter.
              example: true
            score:
              type: number
              description: Minimum score threshold for GQS checks
              example: 20
            minDataPoints:
              type: number
              description: Minimum number of data points required
              example: 2
        TS:
          type: object
          properties:
            activate:
              type: boolean
              description: >-
                Indicates whether **TS** should be applied as a cleaning
                parameter.
              example: true
            score:
              type: number
              description: Minimum score threshold for TS checks
              example: 20
        BAS:
          type: object
          properties:
            activate:
              type: boolean
              description: >-
                Indicates whether **BAS** should be applied as a cleaning
                parameter.
              example: true
            score:
              type: number
              description: Minimum score threshold for BAS checks
              example: 20
            categories:
              type: object
              properties:
                UNNATURAL_TYPING:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
                COPY_AND_PASTE:
                  type: object
                  properties:
                    activate:
                      type: boolean
                    minDataPoints:
                      type: number
    QualityCheckResponse:
      description: Aggregated results for a quality score type
      type: object
      properties:
        qualityCheck:
          type: string
          enum:
            - OES
            - TS
            - GQS
            - CHS
            - BAS
          description: '**The specific type of quality check** applied to a respondent.'
          example: OES
        score:
          type: number
          description: >-
            A **numerical score from 0 to 100** that represents the overall
            result of a specific quality check. It is calculated based on the
            combined evaluation of all data point scores of the same quality
            type.
          example: 78
        reason:
          type: string
          description: >-
            **The reason behind the score** — available only when the quality
            score type is set to `CHS`.
          example: >-
            The user shows several inconsistencies and contradictions, such as
            different ...
        incoherentQuestions:
          type: array
          items:
            type: string
          description: >-
            **List of incoherent questions** identified during the CHS quality
            check. This will be only available if the quality score type is set
            to `CHS` 

             **⭕ Note:** The questions are named in numerical order, reflecting the sequence in which they were presented to the respondent.
          example:
            - Q1
            - Q2
    DataPointsQualityResponse:
      description: Quality check results for a single datapoint
      type: object
      properties:
        qualityCheck:
          type: string
          enum:
            - OES
            - TS
            - GQS
            - CHS
            - BAS
          description: '**Type of quality check** performed for the data point'
          example: OES
        dataPointId:
          type: string
          description: '**A unique identifier of the data point**'
          example: Q1
        score:
          type: number
          description: '**Quality score for the data point**, ranging from 0 to 100'
          example: 85
        category:
          type: string
          description: >-
            **Quality category** for the data point, this will be only available
            if the quality check type is set to `OES` or `BAS`
          example: VALID_ANSWER
        reason:
          type: string
          description: >-
            **Explanation** for the score, this will be only available if the
            quality check type is set to `GQS`
          example: Straightliner, Partial Straightliner
    OESDataPoint:
      type: object
      title: OES
      properties:
        qualityCheck:
          type: string
          description: >-
            A variable that **specifies the type of quality check applied to the
            data point**, determining how it will be assessed and evaluated.
          enum:
            - OES
        dataPointId:
          type: string
          x-mintlify-id: oes-data-point-id
          description: >-
            **A unique identifier assigned to each data point**, allowing users
            to pick a customized name. This name will be used to identify and
            reference the data point later within the system.
          example: Q1
        question:
          type: string
          description: >-
            **Contains the title or text of the open-ended question**, which is
            used directly to evaluate respondent quality.  

             This variable is required only when the quality check type is set to `OES`. For all other quality check types, it will be ignored, even if provided. 

             🧪 **Validations:**  
             - The question must not exceed **500 characters**.
          example: Where did you spend your last vacation?
        answer:
          type: string
          description: >-
            A variable that holds the **respondent's answer to an open-ended
            question**, which is the main part we use for evaluation. 

             This variable is required only when the quality check type is set to `OES`. For all other quality check types, it will be ignored, even if provided.
          example: We were at Lake Garda in Italy
        keywords:
          type: array
          items:
            type: string
          description: >-
            **Keywords are used to perform `wrong topic` checks** and help
            evaluate whether responses are relevant to the topic. 


            The wrong topic check is always enabled. If no keywords are
            provided, the system uses the question title for evaluation. When
            keywords are provided, they enhance the context and improve the
            accuracy of the check. 

             For more details on how this works, refer to the [Wrong Topic Check](/quality-checks/open-ended-score#wrong-topic) section. 

             🧪 **Validations:**  
             - A **maximum of 20** keywords are allowed for each question.
          example:
            - Beach
            - Mountains
            - Lake
        activateDuplicateDetection:
          type: boolean
          description: >-
            A variable that indicates **whether duplicate checks are performed
            on the respondent's answers**. 

             This checks if an answer is identical to another respondent's answer or if a respondent provided the same answer to multiple questions. 

             By default, duplicate checks are active, but you can deactivate them by setting this variable to `false`.
          example: true
          default: true
        allowedLanguages:
          type: array
          items:
            type: string
          description: >-
            **Specifies the list of languages allowed for responses**. Answers
            provided in languages not on this list will be marked as `wrong
            language`. The specified languages are respondent-based.

             If no languages are specified, the wrong language check will not be performed. 

             **🔦 Tip:** To ensure accurate language detection, set the expected language to the one the respondent used to complete the questionnaire. 

             For more details on how this works, refer to the [Wrong Language Check](/quality-checks/open-ended-score#wrong-language) section. 

             🧪 **Validations:**  
             - Allowed languages should be represented using **two-letter ISO 639-1 language codes.**
          example:
            - en
            - de
            - it
      required:
        - dataPointId
        - qualityCheck
        - answer
        - question
    TSDataPoint:
      type: object
      title: TS
      properties:
        qualityCheck:
          type: string
          description: >-
            A variable that **specifies the type of quality check applied to the
            data point**, determining how it will be assessed and evaluated.
          enum:
            - TS
        dataPointId:
          type: string
          description: >-
            **A unique identifier assigned to each data point**, allowing users
            to pick a customized name. This name will be used to identify and
            reference the data point later within the system.
          example: Q1
        duration:
          type: number
          description: >-
            This variable captures the **time a respondent has spent on a
            question or a specific section of the survey**. The duration can be
            provided in seconds or milliseconds. 

             **💬 Recommendation:** Send the duration for each question rather than the total survey duration to ensure more accurate analysis.
          example: 42670
      required:
        - dataPointId
        - qualityCheck
        - duration
    GQSDataPoint:
      type: object
      title: GQS
      properties:
        qualityCheck:
          type: string
          description: >-
            A variable that **specifies the type of quality check applied to the
            data point**, determining how it will be assessed and evaluated.
          enum:
            - GQS
        dataPointId:
          type: string
          description: >-
            **A unique identifier assigned to each data point**, allowing users
            to pick a customized name. This name will be used to identify and
            reference the data point later within the system.
          example: Q1
        gridAnswersPattern:
          type: array
          items:
            type: number
          description: >-
            A variable that contains all the **answers provided by a specific
            respondent for a particular grid question**. 

             The grid pattern should be sent in the same order as the respondent saw it in the survey, especially for randomized grid questions, to ensure accurate analysis. 

             🧪 **Validations:**  
             - A **minimum of 5** and a **maximum of 50** answers are allowed for each grid question. 
             - Pattern checks beyond straightlining are applied only for grids with **7 or more** answers. 
             - Each answer must be provided as a **numeric value**.
          example:
            - 5
            - 4
            - 3
            - 5
            - 4
        patternCheckEnabled:
          type: boolean
          default: false
          description: >-
            Whether to activate Grid Question Score pattern checking for this
            data point. This field is only processed when `qualityCheck` is
            `GQS`.
          example: false
      required:
        - dataPointId
        - qualityCheck
        - gridAnswersPattern
    CHSDataPoint:
      type: object
      title: CHS
      properties:
        qualityCheck:
          type: string
          description: >-
            A variable that **specifies the type of quality check applied to the
            data point**, determining how it will be assessed and evaluated.
          enum:
            - CHS
        dataPointId:
          type: string
          description: >-
            **A unique identifier assigned to each data point**, allowing users
            to pick a customized name. This name will be used to identify and
            reference the data point later within the system. Note that there
            can be only one CHS datapoint per respondent. This datapoint should
            contain the entire interview. 

             **Note:** We strongly recommend to send the same `dataPointId` for all respondents in the survey.
          example: CHS_DataPoint
        interviewData:
          type: array
          items:
            $ref: '#/components/schemas/InterviewData'
          description: >-
            This variable aggregates all relevant question-answer pairs used to
            evaluate the respondent's coherence. 

             🧪 **Validations:**  
             - A **maximum of 300** question/answer pairs are allowed per respondent.
          example:
            - question: What type of accommodation did you stay in?
              answer: Hotel
        surveyDescription:
          type: string
          description: >-
            **Additional context about the purpose and intent of the survey.**
            This optional field provides supplementary information that helps
            improve the quality and accuracy of the Coherence Score evaluation
            by giving the AI model better context about the survey's
            objectives. 

             🧪 **Validations:** If provided, it must contain a minimum of **20 characters** and a maximum of **500 characters**.
          example: >-
            This survey aims to understand travel preferences and vacation
            experiences of European travelers, focusing on accommodation
            choices, transportation methods, and budget allocation.
      required:
        - dataPointId
        - qualityCheck
        - interviewData
    BASDataPoint:
      type: object
      title: BAS
      properties:
        qualityCheck:
          type: string
          description: >-
            A variable that **specifies the type of quality check applied to the
            data point**, determining how it will be assessed and evaluated.
          enum:
            - BAS
        dataPointId:
          type: string
          description: >-
            **A unique identifier assigned to each data point**, allowing users
            to pick a customized name. This name will be used to identify and
            reference the data point later within the system.
          example: Q1
        interactionData:
          type: array
          items:
            $ref: '#/components/schemas/InteractionData'
          description: >-
            This variable compiles all relevant information about the
            interaction of the respondent with the data point. 

             🔦 **Tip:** Need a template to extract keystroke patterns directly from individual browsers? Contact us at [support@redem.io](mailto:support@redem.io)
          example:
            - interactionType: KEYSTROKE
              value: W
              timestamp: '2024-12-01T06:22:59.833Z'
      required:
        - dataPointId
        - qualityCheck
        - interactionData
    InterviewData:
      description: Structure for interview-based questions
      type: object
      required:
        - question
        - answer
      properties:
        question:
          type: string
          description: '**Contains the title or text of the question**.'
          example: What type of accommodation did you stay in?
        answer:
          oneOf:
            - type: number
            - type: string
          description: A variable that stores the **respondent’s answer to the question**.
          example: Hotel
    InteractionData:
      description: >-
        This variable compiles all relevant information about the interaction of
        the respondent with the data point. 

         🔦 **Tip:** Need a template to extract keystroke patterns directly from individual browsers? Contact us at [support@redem.io](mailto:support@redem.io)
      type: object
      required:
        - value
        - interactionType
        - timestamp
      properties:
        interactionType:
          type: string
          description: |-
            The type of interaction the respondent had with the data point. 

             ⭕ **Note:** Currently, the API supports `KEYSTROKE` and `COPY_AND_PASTE` interactions. Future updates will extend support to additional interactions, such as **mouse clicks, mouse movements**, and more.
          enum:
            - KEYSTROKE
            - COPY_AND_PASTE
        value:
          type: string
          description: >-
            The value of the interaction, which should include the final value
            once the interaction is complete.
        timestamp:
          type: string
          description: >-
            The timestamp of the interaction. The timestamp is in the format
            `YYYY-MM-DDTHH:MM:SS.SSSZ`.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````