## Update recurring settings

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

Changes a deal's recurrence settings: lets you stop automatic deal creation or change the schedule and limits.

## Parameters

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

## Request fields (body)

Pass at least one writable field at the JSON root. For the `params` replacement rules, see the [section overview](../recurring-deals.md#before-you-start).

| Field | Type | Required | Description |
|---|---|---|---|
| `active` | boolean / string / null | No | Whether automatic repetition is active. A separate request with `false` stops automatic deal creation. String forms: `"true"` / `"false"`, `"yes"` / `"no"`, `"y"` / `"n"`, `"1"` / `"0"` |
| `startDate` | date / null | No | Schedule start date, for example `2027-01-01` |
| `categoryId` | number / string / null | No | Funnel ID for the generated deals. A numeric string is also accepted. Get IDs from [List pipelines](/docs/entities/deal-categories/list) |
| `isLimit` | string | No | Repetition limit: `N` — unlimited, `T` — by the `limitRepeat` count, `D` — by the `limitDate` date |
| `limitRepeat` | number / string / null | No | Integer repetition count for mode `T`. A numeric string is also accepted |
| `limitDate` | date / null | No | Last allowed date for mode `D` |
| `params` | object | No | Complete schedule object. The parameters are listed below |
| `params.mode` | string / number / null | No | Mode: `single` or `multiple`. Numeric codes `1` and `2` are also accepted |
| `params.singleBeforeStartDateValue` | number / string / null | No | Non-negative integer offset before the start date. A numeric string is also accepted |
| `params.singleBeforeStartDateType` | string / number / null | No | Offset unit: `day`, `week`, `month` or `year`. Numeric unit codes are also accepted |
| `params.multipleType` | string / number / null | No | Repetition unit: `day`, `week`, `month` or `year`. Numeric unit codes are also accepted |
| `params.multipleInterval` | number / string / null | No | Non-negative integer repetition interval. A numeric string is also accepted |
| `params.offsetBeginDateType` | string / number / null | No | Start-date offset unit for the new deal: `day`, `week`, `month` or `year`. Numeric unit codes are also accepted |
| `params.offsetBeginDateValue` | number / string / null | No | Non-negative integer start-date offset for the new deal. A numeric string is also accepted |
| `params.offsetCloseDateType` | string / number / null | No | Close-date offset unit for the new deal: `day`, `week`, `month` or `year`. Numeric unit codes are also accepted |
| `params.offsetCloseDateValue` | number / string / null | No | Non-negative integer close-date offset for the new deal. A numeric string is also accepted |

## Examples

### curl — personal key

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/recurring-deals/11" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active":false}'
```

### curl — OAuth application

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/recurring-deals/11" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"active":false}'
```

### JavaScript — personal key

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11', {
  method: 'PATCH',
  headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({"active":false}),
})
const result = await response.json()
if (!result.success) throw new Error(result.error.message)
console.log(result.data)
```

### JavaScript — OAuth application

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11', {
  method: 'PATCH',
  headers: { 'X-Api-Key': 'YOUR_APP_KEY', 'Authorization': 'Bearer USER_SESSION_TOKEN', 'Content-Type': 'application/json' },
  body: JSON.stringify({"active":false}),
})
const result = await response.json()
if (!result.success) throw new Error(result.error.message)
console.log(result.data)
```

## Response fields

| Field | Type | Description |
|---|---|---|
| `success` | boolean | Whether the request succeeded |
| `data` | object | Recurring settings. For the full field list, see [Recurring deal fields](./fields.md) |

## Response example

200 — automatic repetition is disabled:

```json
{
  "success": true,
  "data": {
    "id": 11,
    "dealId": 53,
    "basedId": 51,
    "active": false,
    "categoryId": null,
    "isLimit": "N",
    "counterRepeat": null,
    "limitRepeat": null,
    "limitDate": null,
    "startDate": "2026-10-15",
    "nextExecution": null,
    "lastExecution": null,
    "params": {
      "mode": null,
      "singleBeforeStartDateValue": 0,
      "singleBeforeStartDateType": null,
      "multipleType": null,
      "multipleInterval": 0,
      "offsetBeginDateType": null,
      "offsetBeginDateValue": 0,
      "offsetCloseDateType": null,
      "offsetCloseDateValue": 0
    }
  }
}
```

## Error response example

404 — the settings were not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Recurring deal is not found."
  }
}
```

## Errors

| HTTP | Code | Description |
|---|---|---|
| 400 | `EMPTY_UPDATE_BODY` | No field to change was passed |
| 400 | `INVALID_PARAMS` | Invalid `id`, limit mode, value type or schedule parameter |
| 400 | `READONLY_FIELD` | An attempt to change `dealId` or a read-only field |
| 400 | `NESTED_FIELDS_ENVELOPE` | The fields were passed inside a `fields` object. Pass them at the JSON root |
| 404 | `ENTITY_NOT_FOUND` | The settings were not found. Message: `Recurring deal is not found.` |
| 404 | `ENTITY_NOT_FOUND` | The update succeeded, but the object is absent on the follow-up read. Message: `recurringDeal <id> not found` |
| 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

Writing `params` can enable automatic repetition even when the same request passes `active: false`. To keep repetition off, send a separate request with `active: false` after changing the schedule.

## See also

- [Recurring deal fields](./fields.md)
- [List recurring deals](./list.md)
- [Recurring deals](../recurring-deals.md)
- [MCP](/docs/mcp)
- [Get recurring settings](./get.md)
- [Create recurring settings](./create.md)
- [Delete recurring settings](./delete.md)
