---
title: "Unlink documents from their lead or workflow"
method: POST
path: "/documents/unlink"
tags: ["Documents"]
---

# Unlink documents from their lead or workflow

`POST /documents/unlink`

## Request

- Base URL: `https://api.surense.com/api/v1`
- URL: `https://api.surense.com/api/v1/documents/unlink`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.surense.com/oauth/token`

## Request body

- UnlinkDocumentsRequest
  - `documents` string[], required

## Response `200`

OK

- DocumentValue[]
  - `tenantId` string, uuid
  - `createdDate` string, date-time
  - `createdBy` string, uuid
  - `creatorName` string
  - `lastModifiedDate` string, date-time
  - `lastModifiedBy` string, uuid
  - `version` integer
  - `id` string, uuid
  - `employerId` string, uuid
  - `customerId` string, uuid
  - `leadId` string, uuid
  - `leadInterestId` string, uuid
  - `workflowId` string, uuid
  - `workflowTypeId` string, uuid
  - `meetingId` string, uuid
  - `typeId` string, uuid
  - `name` string
  - `nameWithExtension` string
  - `mime` string
  - `fileExtension` string
  - `size` integer
  - `source` 'system' | 'appmail' | 'polirobot' | 'manual' | 'openfinance' | 'harel'
  - `backupImport` 'bafi' | 'roeto' | 'atid' | 'polywizz' | 'other'
  - `systemGenerated` boolean
  - `companyId` integer
  - `notes` string
  - `appmailReceived` boolean
  - `linkedProducts` ProductReference[]
    - `id` string, uuid
    - `companyId` integer
    - `accountPolicyNumber` string
  - `deletable` boolean
  - `editable` boolean
  - `bafiFileCat` string

---

[API](https://skmtc.dev/surense/apis/document-api.md) - [All operations](https://skmtc.dev/surense/apis/document-api/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/document-api/revisions/92cbf89acb6f?raw)
