## Delete recurring settings

`DELETE /v1/recurring-deals/:id`

Deletes settings for automatic deal repetition by ID. Deleted settings cannot be restored through the API.

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` (path) | number | Yes | Settings ID, a non-negative safe integer. Get IDs from [List recurring deals](./list.md) |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/recurring-deals/11" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
if (response.status !== 204) throw new Error(await response.text())
```

### JavaScript — OAuth application

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_APP_KEY', 'Authorization': 'Bearer USER_SESSION_TOKEN' },
})
if (response.status !== 204) throw new Error(await response.text())
```

## Response

A successful deletion returns HTTP status `204 No Content` with an empty body. The response code is the success indicator.

## Response example

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

## Error response example

422 — a connected template deal exists:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Deleting is impossible. Connected recurring deal exists."
  }
}
```

## Errors

| HTTP | Code | Description |
|---|---|---|
| 400 | `INVALID_PARAMS` | `id` is not a non-negative safe integer |
| 404 | `ENTITY_NOT_FOUND` | The settings were not found. Message: `Recurring deal is not found.` |
| 422 | `BITRIX_ERROR` | A connected template deal exists. Message: `Deleting is impossible. Connected recurring deal exists.` |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | No Bitrix24 access tokens are configured |
| 403 | `MANAGEMENT_KEY_NO_ENTITY_ACCESS` | A management key has no access to entity methods |
| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | After the scope check, writing is blocked because the key is in read-only mode |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the operation or a plan restriction applies. See `error.message` |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time |
| 502 | `BITRIX_UNAVAILABLE` | A network failure, or a Bitrix24 server error with HTTP status 500 or above |
| 429 | `RATE_LIMITED` | The request rate limit was exceeded. Retry after the interval in the `Retry-After` header |

For the full list of common API errors, see [Errors](/docs/errors).

## Known specifics

- To stop automatic repetition, [update the settings](./update.md) with `active: false`.
- For the order in which to delete the template, the source deal and the generated deals, see the [typical scenario](../recurring-deals.md#typical-scenario).

## See also

- [Recurring deal fields](./fields.md)
- [List recurring deals](./list.md)
- [Recurring deals](../recurring-deals.md)
- [MCP](/docs/mcp)
- [Update recurring settings](./update.md)
- [Delete deal](/docs/entities/deals/delete)
