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

# Delete Respondents

> Delete one or more respondents from a survey and clean up related data.

Delete one or more respondents from a survey. Also removes related metadata, interaction data, and flattened records. If no respondents remain for the survey, the survey is deleted automatically.


## OpenAPI

````yaml POST /v3/deleteRespondents
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/deleteRespondents:
    post:
      tags:
        - Respondent
      summary: Delete respondents
      description: Delete one or more respondents from a survey and clean up related data.
      operationId: deleteRespondentsV3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: |-
                Request body for deleting 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
                  description: Array of respondent IDs to delete.
              required:
                - surveyName
                - respondentIds
      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:
                      deleted:
                        type: object
                        properties:
                          respondent:
                            type: number
              example:
                success: true
                message: Respondents deleted successfully
                results:
                  deleted:
                    respondent: 2
        '400':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    ValidationError:
      description: Validation Error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: Validation Error
              errors:
                type: object
                description: >-
                  Keyed by error index or field name; each value is a
                  human-readable description of the validation issue.
                additionalProperties:
                  type: string
                example:
                  '0': '"surveyName" is required'
          example:
            success: false
            message: Validation Error
            errors:
              '0': '"surveyName" is required'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````