## Activate a form

`POST /v1/crm-forms/:id/activate`

Activates a CRM form by ID after checking its configuration and the account's active-form limit.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | integer | yes | Form ID. List: [`GET /v1/crm-forms`](/docs/entities/crm-forms/list) |

The method takes no query string parameters: any such parameter returns `400 INVALID_PARAMS`.

## Request fields (body)

The body can be omitted or passed as an empty object `{}`. Any field other than `updatedTime` returns `400 INVALID_PARAMS`.

| Field | Type | Required | Description |
|------|-----|:-----:|----------|
| `updatedTime` | string | no | Last modification time of the form from [`GET /v1/crm-forms/:id`](/docs/entities/crm-forms/get). If the form was modified after this time, activation is rejected with `409 CRM_FORM_VERSION_MISMATCH`. Without the field, no version check is performed |

## Examples

### curl — personal key

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/crm-forms/75/activate" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### curl — OAuth application

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/crm-forms/75/activate" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-forms/75/activate', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
})
const { data } = await res.json()
console.log(data.active, data.updatedTime)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-forms/75/activate', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
})
const { data } = await res.json()
console.log(data.active, data.updatedTime)
```

Bitrix24 validates the type and value of `updatedTime`.

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on successful activation |
| `data.active` | boolean | Form state after the call |
| `data.updatedTime` | string | Last modification time of the form after activation, ISO 8601 with a time zone offset. Pass it in the next write request |

## Response example

```json
{
  "success": true,
  "data": {
    "active": true,
    "updatedTime": "2026-11-05T08:25:33Z"
  }
}
```

## Error response example

409 — the form was modified after the time passed in `updatedTime`:

```json
{
  "success": false,
  "error": {
    "code": "CRM_FORM_VERSION_MISMATCH",
    "message": "The CRM form version is outdated. Changes were not saved. Get the form again and retry the request",
    "b24Code": "CRM_FORM_VERSION_MISMATCH",
    "currentUpdatedTime": "2026-11-05T08:25:30Z"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `id` is not a positive integer, a query string parameter is passed, the body is not a JSON object, or the body contains a field other than `updatedTime` |
| 402 | `CRM_FORM_ACTIVATION_LIMIT_REACHED` | The account's active-form limit has been reached |
| 402 | `CRM_FORM_WRITE_RESTRICTED` | The Bitrix24 plan does not allow writing CRM forms. Writes are not performed on free and demo plans |
| 403 | `CRM_FORM_SYSTEM_IMMUTABLE` | The form is a system form — `system: true` in the [form list](/docs/entities/crm-forms/list) |
| 404 | `ENTITY_NOT_FOUND` | No form with this `id` |
| 409 | `CRM_FORM_VERSION_MISMATCH` | The form was modified after the passed `updatedTime`. The current modification time is in `error.currentUpdatedTime` |
| 403 | `BITRIX_INSUFFICIENT_SCOPE` | The Bitrix24 token lacks the required scope |
| 409 | `CRM_FORM_REST_NOT_ENABLED` | The CRM form methods are disabled on the Bitrix24 account |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access to the form for the key's user |
| 422 | `BITRIX_ERROR` | Any other Bitrix24 refusal. The refusal text is in `error.message` |
| 500 | `CRM_FORM_SIDE_EFFECT_FAILED` | The change is already saved, but the operation completed with an error. Re-read the form via [`GET /v1/crm-forms/:id`](/docs/entities/crm-forms/get) before retrying |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a response of an unexpected shape. Re-read the form before retrying |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |
| 401 | `MISSING_API_KEY` | `X-Api-Key` is not passed |
| 401 | `TOKEN_MISSING` | The key has no valid Bitrix24 authorization |

Bitrix24 errors include the original code in `error.b24Code` and field violations in `error.validation` when provided. `CRM_FORM_*` codes retain their HTTP status, code and message. 429 and 503 responses are described in [Limits and optimization](/docs/optimization). For the full list of common API errors, see [Errors](/docs/errors).

## Known specifics

- **The active-form limit can be checked in advance.** The account's current number of active forms is `limits.activeForms.current`, and the ceiling is `limits.activeForms.maximum` in the [builder configuration](/docs/entities/crm-forms/configuration). When the ceiling is reached, free up a slot by [deactivating](/docs/entities/crm-forms/deactivate) another form.
- **A repeated call does not return an error.** Activating an already active form returns `200` with `active: true`, and `updatedTime` does not change.

## See also

- [Deactivate a form](/docs/entities/crm-forms/deactivate)
- [Get a form](/docs/entities/crm-forms/get)
- [Form list](/docs/entities/crm-forms/list)
- [Get builder configuration](/docs/entities/crm-forms/configuration)
- [Limits and optimization](/docs/optimization)
