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

# Delete a File

> Mixin for organization access validation.

Automatically resolves and validates organization access on every request,
making the organization available as self.organization.

For API key auth:  organization is derived from the key (no org_id param needed).
For user auth:     organization_id must be provided in the request
                   (kwargs / headers / body / query params).

Usage:
    class MyView(BaseOrganizationAccessMixin, APIView):
        def get(self, request):
            # self.organization is automatically available
            return Response({"org": self.organization.name})

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url "https://api.roe-ai.com/v1/datasets/YOUR_DATASET_ID/files/YOUR_FILE_ID/?organization_id=YOUR_ORG_ID" \
    --header "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>


## OpenAPI

````yaml DELETE /v1/datasets/{dataset_id}/files/{id}/
openapi: 3.1.0
info:
  title: Roe AI API
  version: 1.0.0
  description: Complete API documentation for Roe AI platform
servers:
  - url: https://api.roe-ai.com
    description: Production API
security: []
paths:
  /v1/datasets/{dataset_id}/files/{id}/:
    delete:
      tags:
        - v1
      description: >-
        Mixin for organization access validation.


        Automatically resolves and validates organization access on every
        request,

        making the organization available as self.organization.


        For API key auth:  organization is derived from the key (no org_id param
        needed).

        For user auth:     organization_id must be provided in the request
                           (kwargs / headers / body / query params).

        Usage:
            class MyView(BaseOrganizationAccessMixin, APIView):
                def get(self, request):
                    # self.organization is automatically available
                    return Response({"org": self.organization.name})
      operationId: v1_datasets_files_destroy
      parameters:
        - in: path
          name: dataset_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
        - name: organization_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Organization ID. This is required for access control. It can be
            provided via query or request body depending on the endpoint.
      responses:
        '204':
          description: No response body

````