# Delete a form

`DELETE /v1/crm-forms/:id`

Bitrix24 method: `crm.form.delete` (REST v3).

Scope: `crm`. Requires a READWRITE key.

## Behavior and parameters

Permanently deletes a form. Removal is irreversible. An active form requires an explicit `confirm=true` query parameter; the wrapper never confirms on your behalf. An optional `updatedTime` query parameter enables optimistic locking. System forms cannot be deleted. HTTP 200 returns `{deleted:true}`. Do not blindly retry an ambiguous write; read the form first.

Bitrix24 does not perform writes on free or demo plans. Permissions, quota and business rules are checked by Bitrix24.

## Example

```bash
curl -X DELETE 'https://vibecode.bitrix24.com/v1/crm-forms/8?confirm=true' \
  -H 'X-Api-Key: YOUR_API_KEY'
```

For an OAuth application, use its key and the `Authorization: Bearer USER_SESSION_TOKEN` header.

```json
{"success":true,"data":{"deleted":true}}
```

## Errors

| HTTP | Code | Reason |
|---|---|---|
| 400 | `INVALID_PARAMS` | Invalid id, body or query shape |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | READONLY key |
| 402 | `CRM_FORM_WRITE_RESTRICTED` | Bitrix24 plan does not allow writing CRM forms |
| 403 | `SCOPE_DENIED` | Missing crm scope |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 permission refusal |
| 403 | `CRM_FORM_SYSTEM_IMMUTABLE` | System form cannot be changed |
| 404 | `ENTITY_NOT_FOUND` | Form does not exist |
| 409 | `CRM_FORM_VERSION_MISMATCH` | Version is stale; error.currentUpdatedTime contains the current version |
| 409 | `CRM_FORM_DELETE_CONFIRMATION_REQUIRED` | Active form requires confirm=true |
| 422 | `BITRIX_ERROR` | Other Bitrix24 refusal, original message retained |
| 500 | `CRM_FORM_SIDE_EFFECT_FAILED` | Write already happened; read the form before retrying. On creation error.id identifies the saved form |
| 502 | `BITRIX_UNAVAILABLE` | Invalid or unavailable upstream response; re-read the form before retrying a write |

Bitrix24 codes, statuses and messages are retained. See [common limits](/docs/optimization) for shared 429, 502 and 503 responses.
