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

# Update Respondents Excluded Status

> Updates the exclusion status of respondents within a specific survey.

This endpoint allows you to manually update the exclusion status of one or more respondents within a survey. It acts as a toggle — if a respondent is currently excluded, they will be included after the update, and vice versa. The endpoint also automatically updates the `reasonsForExclusion` field to reflect the respondent’s new status.


## OpenAPI

````yaml POST /v3/updateRespondentsExcludedStatus
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/updateRespondentsExcludedStatus:
    post:
      tags:
        - Respondent
      summary: Update respondents excluded status
      description: Updates the exclusion status of respondents within a specific survey.
      operationId: updateRespondentsExcludedStatusV3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                surveyName:
                  type: string
                  description: The survey name.
                respondentIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: Array of respondent IDs to update the excluded status.
              required:
                - surveyName
                - respondentIds
            example:
              surveyName: Customer-Satisfaction-2025
              respondentIds:
                - R123
                - R124
      responses:
        '200':
          description: >-
            When a request is successfully processed, the API returns a 200 OK
            status code along with the expected data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      A variable indicating whether the **operation was
                      successful**.
                  message:
                    type: string
                    description: >-
                      A variable that **human-readable message** providing
                      additional context or confirmation of the requested
                      action.
                  results:
                    type: object
                    description: >-
                      This object serves as a **container to hold the results
                      for the requested data**, encapsulating all relevant
                      information and outputs in a structured format.
                    properties:
                      surveyName:
                        type: string
                        description: >-
                          This is the name of the survey that the respondents
                          belong to.
                      respondentIds:
                        type: array
                        items:
                          type: string
                        description: >-
                          Array of respondent IDs that were successfully
                          updated.
              example:
                success: true
                message: Respondents excluded status updated successfully
                results:
                  surveyName: Customer-Satisfaction-2025
                  respondentIds:
                    - R123
                    - R124
        '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: Survey not found
                    description: >-
                      This error occurs when the **requested survey does not
                      exist in the system**. It may happen if the survey name is
                      incorrect, has been deleted, or was never created. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Respondent not found
                    description: >-
                      This error occurs when the **requested respondentId does
                      not exist under the specified survey**. It may happen if
                      the respondent has not been added to the specified survey
                      or if an incorrect ID was provided. 

                       **⭕ 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'
                Survey not found:
                  value:
                    success: false
                    message: Survey not found
                    errors: {}
                Respondents not found:
                  value:
                    success: false
                    message: >-
                      The following respondents were not found in the survey
                      'Customer-Satisfaction-2025': 'R987', 'R986'
                    errors: {}
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````