> ## Documentation Index
> Fetch the complete documentation index at: https://docs.realitydefender.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create User Feedback

<ParamField body="requestId" type="string">
  The media result identifier (required). This is the `requestId` returned when a file was processed; you can also obtain it from the [Media Detail](/api-reference/endpoint/get_media_detail) response or the web app when viewing a result.
</ParamField>

<ParamField body="label" type="string">
  Your label for the content (required). One of: `REAL`, `SYNTHETIC`, `MANIPULATED`, `UNKNOWN`.
</ParamField>

<ParamField body="feedbackCategory" type="string">
  The type of feedback (required). One of: `FALSE_POSITIVE`, `FALSE_NEGATIVE`, `CONFIRMATION`, `OTHER`.
</ParamField>

<ParamField body="comment" type="string">
  Optional free-text comment. If omitted, no comment is stored.
</ParamField>

Submits user feedback for a completed scan result. The server records who submitted the feedback, links it to the result, and may trigger internal notifications. A successful request returns `201 Created` with the created feedback record.

<Note>
  You may only submit feedback for a result you uploaded, for a result in your same organization, or, for certain roles, on behalf of your organization. If the `requestId` is unknown, the API returns `400`. If you are not allowed to comment on that result, the API returns `403`.
</Note>

### Authorization

You must include the `x-api-key` header in your request. The key must belong to a user with RealScan access to authenticate the request and properly attribute the feedback to the correct user and organization.

### Errors

* **400 Bad Request** — No media result exists for the given `requestId` (`"Media result does not exist!"`).
* **403 Forbidden** — The authenticated user cannot submit feedback for that result (`"You are not authorized to create feedback for this media result!"`).

### Sample request

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST \
    'https://api.prd.realitydefender.xyz/api/v2/user-feedback' \
    -H 'X-API-KEY: your-api-key-here' \
    -H 'Content-Type: application/json' \
    -d '{
      "requestId": "your-request-id",
      "label": "REAL",
      "feedbackCategory": "CONFIRMATION",
      "comment": "Looks correct in context."
    }'
  ```

  ```python python theme={null}
  import requests

  url = "https://api.prd.realitydefender.xyz/api/v2/user-feedback"
  headers = {
      "X-API-KEY": "your-api-key-here",
      "Content-Type": "application/json",
  }
  payload = {
      "requestId": "your-request-id",
      "label": "REAL",
      "feedbackCategory": "CONFIRMATION",
      "comment": "Looks correct in context.",
  }
  response = requests.post(url, json=payload, headers=headers)
  print(response.status_code, response.json())
  ```
</CodeGroup>

### Sample response

`201 Created` — body shape is similar to:

```
{
  "id": "uuid",
  "userId": "user-id",
  "requestId": "your-request-id",
  "institutionId": "institution-id",
  "text": "Looks correct in context.",
  "category": "CONFIRMATION",
  "userName": "Jane Doe",
  "userEmail": "jane@example.com",
  "orgName": "Organization name",
  "mediaType": "VIDEO",
  "mediaViewUrl": "https://...",
  "mediaSource": "API",
  "label": "REAL",
  "createdAt": "2025-01-15T12:00:00.000Z"
}
```

Field presence may vary slightly depending on the user profile and the stored result; the `text` field is only populated if a `comment` is included in the request.
