# Delete an exam

`DELETE https://api.cademi.com.br/api/v3/products/{product_id}/exams/{exam_id}`

Operation ID: `exams.delete` · API v3

Moves the exam to the trash.

An exam that is displayed by a lesson, required to unlock a certificate, or required by a release rule cannot be deleted. In that case the API returns `state_conflict`, and `details[].reason` indicates the dependency: `lesson`, `certificate`, or `release_rule`.

Required permissions: `exams.delete`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `product_id` | path | string | yes |  |
| `exam_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Responses

### 204

The exam 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 exam was not found in the specified product or is not accessible with the current credentials.

Body: Error.

### 409

The exam is in use by a lesson, a certificate, or a release rule.

Body: Error.

### 412

The exam has changed since the supplied revision was retrieved.

Body: Error.

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