> ## 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.

# Recalculate Respondents

> This endpoint allows you to recalculate specific quality checks for a list of respondents within a given survey. It is useful for re-running checks with updated parameters or if they were skipped previously. Note that this operation requires the survey to be created with API version v3 and after the feature release date (2025-12-02).

This endpoint allows you to recalculate specific quality checks for a list of respondents within a survey. It is useful when you need to re-evaluate respondents with updated check configurations (e.g., enabling OES or Duplicate Detection) or if previous checks were skipped.

**Prerequisites:**

* The survey must have been created with API version `v3`.
* The feature must be enabled and the survey created after the feature release date (2025-12-02).
* You must provide valid `respondentIds` belonging to the specified `surveyName`.
* The number of `respondentIds` per request is limited to 100.


## OpenAPI

````yaml POST /v3/recalculateRespondents
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:
  /v3/recalculateRespondents:
    post:
      tags:
        - Respondent
      summary: Recalculate Respondents
      description: >-
        This endpoint allows you to recalculate specific quality checks for a
        list of respondents within a given survey. It is useful for re-running
        checks with updated parameters or if they were skipped previously. Note
        that this operation requires the survey to be created with API version
        v3 and after the feature release date (2025-12-02).
      operationId: recalculateRespondentsV3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: |-
                Request body for recalculating respondents 

                 **🔒 Authentication:** This endpoint is only accessible via a `PRIVATE` API key type
              properties:
                surveyName:
                  type: string
                  description: The name of the survey.
                respondentIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 100
                  description: Array of respondent IDs to recalculate (max 100).
                selectedChecks:
                  type: object
                  properties:
                    CHS:
                      type: boolean
                      description: >-
                        Coherence Score. Set to true to recalculate. Omit or set
                        to false to skip.
                    OES:
                      type: boolean
                      description: >-
                        Open Ended Score. Set to true to recalculate. Omit or
                        set to false to skip.
                    TS:
                      type: boolean
                      description: >-
                        Time Score. Set to true to recalculate. Omit or set to
                        false to skip.
                    GQS:
                      type: boolean
                      description: >-
                        Grid Question Score. Set to true to recalculate. Omit or
                        set to false to skip.
                    BAS:
                      type: boolean
                      description: >-
                        Behavior Analysis Score. Set to true to recalculate.
                        Omit or set to false to skip.
                  description: >-
                    Object specifying which quality checks to recalculate. At
                    least one check must be set to true. Omitted checks are
                    treated as false.
                oesAllowedLanguages:
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional list of allowed languages for Open Ended Score
                    check. This will only be processed if 'OES' is set to true
                    in selectedChecks.
                activateDuplicateDetection:
                  type: boolean
                  default: false
                  description: >-
                    Whether to activate duplicate detection during
                    recalculation. This will only be processed if 'OES' is set
                    to true in selectedChecks.
                patternCheckEnabled:
                  type: boolean
                  default: false
                  description: >-
                    Whether to activate Grid Question Score pattern checking.
                    This will only be processed if 'GQS' is set to true in
                    selectedChecks.
              required:
                - surveyName
                - respondentIds
                - selectedChecks
            example:
              surveyName: Customer-Satisfaction-2025
              respondentIds:
                - R123
                - R124
              selectedChecks:
                CHS: true
                OES: true
              oesAllowedLanguages:
                - en
                - de
              activateDuplicateDetection: true
      responses:
        '200':
          description: >-
            When a request is successfully processed, the API returns a 200 OK
            status code along with the result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the operation was successful.
                  message:
                    type: string
                    description: A human-readable message.
                  results:
                    type: object
                    properties:
                      surveyName:
                        type: string
                        description: The name of the survey.
                      totalRespondents:
                        type: number
                        description: Total number of respondents processed.
                      estimatedCredits:
                        type: number
                        description: Estimated credits required for the recalculation.
              example:
                success: true
                message: Recalculation queued
                results:
                  surveyName: Customer-Satisfaction-2025
                  totalRespondents: 2
                  estimatedCredits: 10
        '400':
          description: >-
            When a request fails due to issues with the referenced resources
            (e.g., survey or respondent not found), the API returns a 400 Bad
            Request status code.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Survey not found
                    description: The requested survey does not exist.
                    type: object
                  - title: Respondent not found
                    description: No respondents found for provided IDs
                    type: object
                  - title: Some Respondents not found
                    description: >-
                      Some respondents were not found in the survey for the
                      provided IDs
                    type: object
              examples:
                Survey not found:
                  value:
                    success: false
                    message: Survey not found
                    errors: {}
                Respondent not found:
                  value:
                    success: false
                    message: No respondents found for provided IDs
                    errors: {}
                Some Respondents not found:
                  value:
                    success: false
                    message: 'Some respondents not found: ''R123'', ''R124'''
                    errors: {}
        '422':
          description: >-
            When a request fails due to validation errors, the API returns a 422
            Unprocessable Entity status code.
          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
              examples:
                Validation Failed:
                  value:
                    success: false
                    message: Validation Failed
                    errors:
                      '0': '"surveyName" is required'
                      '1': '"respondentIds" is required'
                      '2': '"respondentIds" must contain at least 1 items'
                      '3': '"respondentIds" must contain at most 100 items'
                      '4': '"selectedChecks" is required'
                      '5': '"selectedChecks.CHS" is required'
                      '6': '"selectedChecks.OES" is required'
                      '7': '"selectedChecks.TS" is required'
                      '8': '"selectedChecks.GQS" is required'
                      '9': '"selectedChecks.BAS" is required'
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````