> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.resemble.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.resemble.ai/_mcp/server.

# Submit detection feedback

POST https://app.resemble.ai/api/v2/detect/{uuid}/feedback
Content-Type: application/json

Tell Resemble whether a detection verdict was right — and when it wasn't, what it
should have been. The answer is stored with a snapshot of what the model said at the
time of submission (verdict, score, media type, raw metrics), so it stays interpretable
even if the detect is later re-run or deleted.

Upserts on `(detect, user)`: re-posting edits your existing answer rather than adding a
second one. There is no separate update call. Feedback is per user, not per team — a
teammate's answer on the same detect is invisible to you.

The detect must have completed processing; feedback on a pending or failed detect is
rejected with 400. Teams without Detect access also receive 400 (not 403).


Reference: https://docs.resemble.ai/api-reference/deepfake-detection/create-detect-feedback

## Authentication

- `Authorization` header (bearer token, required) — API key from https://app.resemble.ai/hub/api

## Request

### Path parameters

- `uuid` (string, required) — UUID of the completed detect.

### Body (application/json)

This endpoint expects an object.

- `type` (enum, required) — What the verdict should have been. - `correct` — the verdict was right. - `should_be_ai_generated` — we said authentic; it is AI-generated. - `should_be_authentic` — we said AI-generated; it is genuine and unaltered. - `should_be_non_ai` — no model generated it, but it may still be edited, spliced, or a human impersonation. - `should_be_neutral` — neither call is right; the media is genuinely ambiguous. - `skipped` — the verdict was wrong, but the reviewer didn't say how.
  - Allowed values: `correct`, `should_be_ai_generated`, `should_be_authentic`, `should_be_non_ai`, `should_be_neutral`, `skipped`
- `comment` (string, optional) — Free text, up to 1000 characters. Trimmed; blank becomes `null`.
- `source` (string, optional, default: api) — Where the answer came from. Use a stable, aggregatable value such as a product or queue name — not a per-request identifier. Truncated to 64 characters rather than rejected.

## Response

### 200

Feedback recorded

- `success` (boolean, optional)
- `item` (DetectFeedback, optional) — A reviewer's answer about a detection verdict, stored with a snapshot of what the model said at the time the answer was submitted. Returned by `POST /detect/{uuid}/feedback` and `GET /detect/{uuid}/feedback`.

## Errors

### 400 Bad Request Error

Unknown or missing `type`, `comment` over 1000 characters, the detect has not completed processing, or the team does not have Detect access.

- `success` (boolean, optional)
- `error` (string, optional)
- `errors` (map from string to list of string, optional)
- `message` (string, optional)

### 404 Not Found Error

No such detect for the authenticated team.

- `success` (boolean, optional)
- `error` (string, optional)
- `errors` (map from string to list of string, optional)
- `message` (string, optional)

## Types

### DetectFeedback

A reviewer's answer about a detection verdict, stored with a snapshot of what the model said at the time the answer was submitted. Returned by `POST /detect/{uuid}/feedback` and `GET /detect/{uuid}/feedback`.

- `detect_uuid` (string, optional) — The detect this answer is attached to.
- `type` (enum, optional) — What the verdict should have been.
  - Allowed values: `correct`, `should_be_ai_generated`, `should_be_authentic`, `should_be_non_ai`, `should_be_neutral`, `skipped`
- `vote` (enum, optional) — Derived from `type` — `correct` is `up`, everything else is `down`. Never independent of `type`.
  - Allowed values: `up`, `down`
- `verdict` (enum, optional, nullable) — What the model said, snapshotted when the feedback was submitted. `null` when the detection landed somewhere indeterminate. `should_be_neutral` and `should_be_non_ai` have no counterpart here — this field records only the two decided model outcomes.
  - Allowed values: `ai_generated`, `authentic`
- `score` (double, optional, nullable) — The model's headline confidence, 0.0–1.0, or `null`. For video, the higher of the audio and video confidences.
- `media_type` (enum, optional) — Media type of the detect.
  - Allowed values: `audio`, `video`, `image`, `text`
- `comment` (string, optional, nullable) — The reviewer's free-text comment, or `null`.
- `credit` (integer, optional) — Credits awarded for this answer. Written by Resemble, never by the submitter; `0` on a fresh row.
- `source` (string, optional) — Attribution string recorded for this answer. Defaults to `api`.
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional) — Moves when the answer is revised; `created_at` does not.

## Examples

**Request**

```json
{
  "type": "correct"
}
```

**Response**

```json
{
  "success": true,
  "item": {
    "detect_uuid": "string",
    "type": "correct",
    "vote": "up",
    "verdict": "ai_generated",
    "score": 1.1,
    "media_type": "audio",
    "comment": "string",
    "credit": 1,
    "source": "string",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.resemble.ai/api/v2/detect/uuid/feedback"

payload = { "type": "correct" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.resemble.ai/api/v2/detect/uuid/feedback';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"type":"correct"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.resemble.ai/api/v2/detect/uuid/feedback"

	payload := strings.NewReader("{\n  \"type\": \"correct\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.resemble.ai/api/v2/detect/uuid/feedback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": \"correct\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.resemble.ai/api/v2/detect/uuid/feedback")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": \"correct\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.resemble.ai/api/v2/detect/uuid/feedback', [
  'body' => '{
  "type": "correct"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.resemble.ai/api/v2/detect/uuid/feedback");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"type\": \"correct\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["type": "correct"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.resemble.ai/api/v2/detect/uuid/feedback")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```