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

# Delete a document

> Delete a stored document now instead of waiting for the 24-hour expiry.

Documents are kept for 24 hours so you can parse them again, then deleted. This deletes one straight away.

## Request

```bash theme={null}
curl -X DELETE https://api.spidra.io/api/parse/files/0b007010-b3f6-4398-a3ba-e5c2518839c8 \
  -H "Authorization: Bearer $SPIDRA_API_KEY"
```

## Response

```json theme={null}
{ "status": "deleted", "fileId": "0b007010-b3f6-4398-a3ba-e5c2518839c8" }
```

Using the `fileId` afterwards returns `404`: `No file with that fileId. Files can be parsed again for 24 hours after upload.` Results already parsed stay in your logs.


## OpenAPI

````yaml DELETE /parse/files/{fileId}
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authenticate with
    `Authorization: Bearer YOUR_API_KEY`.
servers:
  - url: https://api.spidra.io/api
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /parse/files/{fileId}:
    delete:
      tags:
        - Parse
      summary: Delete an Uploaded File
      parameters:
        - name: fileId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  fileId:
                    type: string
        '404':
          description: No such file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
      required:
        - status
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.