# Delete a custom code block

`DELETE https://api.cademi.com.br/api/v3/settings/custom-code/{custom_code_id}`

Operation ID: `custom_code.delete` · API v3

Moves the custom code block to the trash instead of permanently deleting it.

A block in the trash can be restored with the update operation by sending `deleted: false`.

Required permissions: `custom_code.write`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `custom_code_id` | path | string | yes |  |

## Responses

### 204

The custom code block was moved to the trash.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The custom code block was not found, is already in the trash, or is not accessible with the current credentials.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
