
## Delete dictionary record

`DELETE /v1/statuses/:id`

Deletes a CRM dictionary record by ID. System records (`system: true`) cannot be deleted.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Dictionary record ID |

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/statuses/42" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/statuses/42" \
  -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/statuses/42', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

if (res.status === 204) {
  console.log('Record deleted')
}
```

### JavaScript — OAuth application

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

if (res.status === 204) {
  console.log('Deleted')
}
```

## Response

On successful deletion, the API returns HTTP status `204 No Content` with an empty body — check the status code to confirm success.

## Response example

```
HTTP/1.1 204 No Content
```

## Error response example

422 — the record is not found or is a system record:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Status is not found."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 422 | `BITRIX_ERROR` | The record is not found, is a system record (`system: true`), or the ID is invalid |
| 422 | `BITRIX_ERROR` | The stage still has items, with the message `There are active items in this status.` Move the items to another stage and retry the deletion |
| 403 | `SCOPE_DENIED` | API key does not have the `crm` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |

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

## See also

- [List of dictionaries](/docs/entities/statuses/list)
- [CRM dictionaries](/docs/entities/statuses)
