> For AI agents: the documentation index is at https://platform.detectif.ai/llms.txt. Every page is also available as Markdown by adding `.md` to its path.

# Say whether a result was right

`POST /v1/operations/{operation_id}/feedback`

Tells us whether an AI-speech check (`deepfake.detect`) got it right. Send `correct`, and optionally what the recording really is (`label`: `real` or `fake`) and a short note. Only for checks of your own account; sending again replaces your earlier answer. No credits are used. We store your answer with the result, not the audio: keeping recordings for review would need your explicit consent and is not offered yet. Requires the scope of the check (`deepfake:detect`).

## Authentication

Send your API key as `Authorization: Bearer <your API key>`.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `Authorization` | string | yes | `Bearer <your API key>`. Keys are created in the dashboard; see [Authentication](https://platform.detectif.ai/docs/authentication/). |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `operation_id` | string | yes | The `operation_id` of the check (`op_...`). |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `correct` | boolean | yes | Was the result right? |
| `label` | string or null | no | Optional: what the recording really is. (one of `real`, `fake`) |
| `note` | string or null | no | Optional note, at most 500 characters. (at most 500 characters) |

Example request body:

```json
{
  "correct": false,
  "label": "real",
  "note": "My own voice, recorded on a phone."
}
```

## Response

`200`: Your answer was saved.

| Field | Type | Required | Description |
|---|---|---|---|
| `request_id` | string | yes |  |
| `object` | string | yes | (always `"operation.feedback"`) |
| `operation_id` | string | yes |  |
| `correct` | boolean | yes |  |
| `label` | string or null | yes | (one of `real`, `fake`) |
| `note` | string or null | yes |  |
| `created_at` | string | yes |  |
| `updated_at` | string | yes |  |

### Example response

```json
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "object": "operation.feedback",
  "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
  "correct": false,
  "label": "real",
  "note": "My own voice, recorded on a phone.",
  "created_at": "2026-10-13T09:30:00Z",
  "updated_at": "2026-10-13T09:30:00Z"
}
```

## Errors

| Status | Meaning |
|---|---|
| `400` | The request is invalid, for example a missing or malformed field. |
| `401` | The API key is missing, invalid or revoked. |
| `403` | The key lacks the required scope, the email address is not verified, or the account is suspended. |
| `404` | Not found. Also returned for resources that belong to another account. |
| `409` | Conflict, for example a request with the same Idempotency-Key is still running, or the speaker already has the maximum number of samples. |
| `429` | Too many requests or too many operations at the same time. Wait for the number of seconds in Retry-After. |
| `500` | Something went wrong on our side. No credits were used. |

Error bodies use the shape described in [Errors](https://platform.detectif.ai/docs/errors/), with a stable `error.code`.

## Code samples

```bash
curl -X POST "https://platform.detectif.ai/v1/operations/op_0123456789abcdef0123456789abcdef/feedback" \
  -H "Authorization: Bearer $DETECTIF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"correct":false,"label":"real","note":"My own voice, recorded on a phone."}'
```

```python
import os

import requests

resp = requests.post(
    "https://platform.detectif.ai/v1/operations/op_0123456789abcdef0123456789abcdef/feedback",
    headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
    json={
        "correct": False,
        "label": "real",
        "note": "My own voice, recorded on a phone.",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
```

```javascript
const res = await fetch("https://platform.detectif.ai/v1/operations/op_0123456789abcdef0123456789abcdef/feedback", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DETECTIF_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "correct": false,
    "label": "real",
    "note": "My own voice, recorded on a phone."
  }),
});
console.log(res.status, await res.json());
```
