
## Delete currency

`DELETE /v1/currencies/:id`

Deletes a currency from CRM by code. The Bitrix24 account's base currency cannot be deleted.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | string | yes | Currency code (for example `CNY`, `USD`) |

## Examples

### curl — personal key

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

### curl — OAuth application

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

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

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/currencies/CNY', {
  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 an HTTP status `204 No Content` is returned with an empty body — success is checked by the status.

## Response example

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

## Error response example

422 — attempt to delete the base currency:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "The base currency cannot be deleted."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 422 | `BITRIX_ERROR` | Cannot delete (base currency or currency not found) |
| 403 | `SCOPE_DENIED` | API key does not have the `crm` scope |
| 401 | `TOKEN_MISSING` | No API key provided |

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

## See also

- [List currencies](/docs/entities/currencies/list) — find currencies before deletion
- [Currencies](/docs/entities/currencies) — entity overview
