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

> Removes the option and its child options. Admin access through the admin_hash may delete every option; otherwise the option has to belong to the requesting user, the poll has to still allow changes and the option must not have votes. Options that were paid for through a voting wallet can never be deleted.



## OpenAPI

````yaml /api-reference/openapi.json delete /api/v1/polls/{poll_id}/options/{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}/options/{id}:
    parameters:
      - name: poll_id
        in: path
        description: Poll member_hash or admin_hash
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Option public_id, as returned in the id field
        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:
        - Options
      summary: Delete option
      description: >-
        Removes the option and its child options. Admin access through the
        admin_hash may delete every option; otherwise the option has to belong
        to the requesting user, the poll has to still allow changes and the
        option must not have votes. Options that were paid for through a voting
        wallet can never be deleted.
      responses:
        '204':
          description: option deleted
        '400':
          description: option is referenced by a branching logic
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: The step is used in the branching logic "Skip step 2"
                  status:
                    type: string
                    example: bad_request
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: forbidden (the option belongs to somebody else)
        '404':
          description: option 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.

````