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

# Delete Contact Document

> Permanently deletes an uploaded document, the stored file and the copy held by the voice provider. This cannot be undone.

The `CV` document cannot be deleted here: it is produced from the contact's processed CV, and would be listed again on the next read. Deactivate it instead, or delete the contact's CV. A contact's documents are also deleted, storage and provider copies included, when the contact reaches its GDPR retention date.

Permanently deletes an uploaded contact document, its stored file and the copy held by the voice provider.

## Overview

Works on `UPLOAD` documents, completed or not — deleting a `PENDING` upload releases its slot and its bytes immediately instead of waiting for the 24-hour cleanup.

The `CV` document is refused with a `409`. It is produced from the contact's processed CV, so deleting the document would only have it listed again on the next read. To keep the CV out of calls, [deactivate it](/api-reference/contacts/documents/update-document); to remove it entirely, delete the contact's CV.

<Info>
  Contact documents follow the contact's retention. When a contact reaches its GDPR expiry date, every
  document on it — the `CV` projection and the uploads, their stored files and their provider copies —
  is deleted with the rest of the contact's data. There is no second retention clock to manage.
</Info>

## Example

```bash theme={null}
curl -X DELETE https://api.instaview.sk/contacts/$CONTACT_ID/documents/$DOCUMENT_ID \
  -H "Authorization: Bearer $INSTAVIEW_API_KEY"
```

```json theme={null}
{
  "id": "5d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
  "deleted": true
}
```

## Error Scenarios

* **404 Not Found**: No such document on that contact
* **409 Conflict**: The document is the contact's `CV`

## Related Resources

* [List Contact Documents](/api-reference/contacts/documents/list-documents)
* [Update Contact Document](/api-reference/contacts/documents/update-document)


## OpenAPI

````yaml DELETE /contacts/{id}/documents/{documentId}
openapi: 3.0.0
info:
  title: InstaView API
  description: |-
    InstaView API Documentation

    ## Authentication

    All endpoints require API key authentication using Bearer token:
    ```
    Authorization: Bearer sk_your_api_key_here
    ```

    ## API Key Management

    The API Key module provides comprehensive key management for:
    - **Direct Client Keys**: Company-scoped keys for your applications
    - **ATS Partner Keys**: Resource-scoped keys for ATS integrations

    ### Key Features
    - HMAC-SHA256 hashing for API key storage
    - Configurable rate limiting
    - Comprehensive audit logging
    - Company-level isolation
    - Resource scoping for ATS partners
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.instaview.sk
    description: Production API Gateway
security: []
tags: []
paths:
  /contacts/{id}/documents/{documentId}:
    delete:
      tags:
        - Contacts
      summary: Delete a contact document
      description: >-
        Permanently deletes an uploaded document, the stored file and the copy
        held by the voice provider. This cannot be undone.


        The `CV` document cannot be deleted here: it is produced from the
        contact's processed CV, and would be listed again on the next read.
        Deactivate it instead, or delete the contact's CV. A contact's documents
        are also deleted, storage and provider copies included, when the contact
        reaches its GDPR retention date.
      operationId: PublicContactDocumentsController_deleteDocument_v1
      parameters:
        - name: id
          required: true
          in: path
          description: Contact the document belongs to.
          schema:
            type: string
            format: uuid
        - name: documentId
          required: true
          in: path
          description: Document id.
          schema:
            type: string
            format: uuid
        - name: companyId
          required: false
          in: query
          description: >-
            Required for ATS API keys to specify which company to access.
            Ignored for standard company API keys.
          schema:
            type: string
      responses:
        '200':
          description: Deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDeletedResponseDto'
        '404':
          description: No such document on that contact.
        '409':
          description: The document is the contact's `CV`.
      security:
        - bearer: []
components:
  schemas:
    PublicDeletedResponseDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the deleted resource
        deleted:
          type: boolean
          enum:
            - true
          example: true
          description: Always true; a failed delete answers with an error status
      required:
        - id
        - deleted
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key for authentication using Bearer scheme

````