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

# Delete participant

> Removes the votes of the participant, and the participant record itself when deleting it is allowed. Deleting the votes requires that the participation belongs to the requesting user and the poll still accepts votes, or admin access to a survey, or admin access with an account that allows deleting; participants of a poll with a voting wallet can never be deleted, and the request is rejected with 403 when none of this applies. The participant record is kept — with its votes removed — when the requesting account is not allowed to delete it, so that the participation itself stays on record. Both outcomes answer with 204: read the participant back to tell them apart, a kept participant is still found.



## OpenAPI

````yaml /api-reference/openapi.json delete /api/v1/polls/{poll_id}/voters/{id}
openapi: 3.0.1
info:
  title: PollUnit API
  version: v1
  description: Programmatic access to PollUnit.
servers:
  - url: https://pollunit.com
    description: Production
  - url: http://localhost:3000
    description: Development
security:
  - bearerAuth: []
paths:
  /api/v1/polls/{poll_id}/voters/{id}:
    parameters:
      - name: poll_id
        in: path
        description: Poll member_hash or admin_hash
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Voter public_id
        required: true
        schema:
          type: string
      - name: organization_id
        in: query
        required: false
        description: >-
          public_id of an organization the user belongs to. When given, the
          request runs in that organization context instead of the personal
          account.
        schema:
          type: string
    delete:
      tags:
        - Voters
      summary: Delete participant
      description: >-
        Removes the votes of the participant, and the participant record itself
        when deleting it is allowed. Deleting the votes requires that the
        participation belongs to the requesting user and the poll still accepts
        votes, or admin access to a survey, or admin access with an account that
        allows deleting; participants of a poll with a voting wallet can never
        be deleted, and the request is rejected with 403 when none of this
        applies. The participant record is kept — with its votes removed — when
        the requesting account is not allowed to delete it, so that the
        participation itself stays on record. Both outcomes answer with 204:
        read the participant back to tell them apart, a kept participant is
        still found.
      parameters:
        - name: X-POLLUNIT-USER-IDENTIFIER
          in: header
          required: false
          description: >-
            Your own identification of the user on whose behalf the request is
            made, any string. The user identifiers should not be guessable and
            stay secret, otherwise users could get access to other users'
            contents. Only used with a public API token: the created or changed
            object belongs to that anonymous user instead of the token owner,
            which keeps the user in control of it in later requests with the
            same identifier.
          schema:
            type: string
      responses:
        '204':
          description: votes deleted, and the participant when deleting it is allowed
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: forbidden (the participant belongs to somebody else)
        '404':
          description: participant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      security:
        - bearerAuth: []
components:
  schemas:
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
    NotFound:
      type: object
      properties:
        error:
          type: string
          example: Not Found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: Personal API token — find yours under My Account → API.

````