
## Delete a requisite link

`DELETE /v1/requisite-links/:entityTypeId/:entityId`

Deletes a requisite link to an entity. After deletion, the requisite and bank requisite remain in the system — only the link between them and the owner entity is removed.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `entityTypeId` (path) | number | yes | Link owner type: `2` — deal, `31` — invoice |
| `entityId` (path) | number | yes | Owner entity ID |

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/requisite-links/2/3825" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth app

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/requisite-links/2/3825" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-links/2/3825', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Deleted link for entityId:', data.entityId)
```

### JavaScript — OAuth app

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-links/2/3825', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | Deletion result |
| `data.entityTypeId` | number | Entity type from the request path |
| `data.entityId` | number | Entity ID from the request path |
| `data.unregistered` | boolean | Always `true` on success |

## Response example

HTTP status: `200 OK`

```json
{
  "success": true,
  "data": {
    "entityTypeId": 2,
    "entityId": 3825,
    "unregistered": true
  }
}
```

## Error response example

400 — invalid `entityTypeId` or `entityId` in the path:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_ANCHOR",
    "message": "Path requires entityTypeId and entityId — both positive integers (e.g. /v1/requisite-links/31/42)"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_ANCHOR` | `entityTypeId` or `entityId` in the path are not positive integers |
| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope. Required message: `This endpoint requires 'crm' scope` |
| 401 | `TOKEN_MISSING` | API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

**Idempotent.** Deletion returns `200 {unregistered: true}` even if no link existed for the `(entityTypeId, entityId)` pair — a repeat call is safe, there is no separate "not found" error.

## See also

- [Register a link](/docs/entities/requisite-links/register)
- [List links](/docs/entities/requisite-links/list)
- [Search links](/docs/entities/requisite-links/search)
- [Get a link](/docs/entities/requisite-links/get)
- [Link fields](/docs/entities/requisite-links/fields)
- [Batch](/docs/batch)
