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

# Feedback (v1)

> Record user feedback (thumbs up / thumbs down) for an ad impression

## Authorizations

**Content-Type** `string` *required*

Must be `application/json`

## Body

**bid\_id** `string` *required*

The `bidId` from the original v1 bid response. In v2, `POST` to the bid's `actions.feedback_url` instead: see [Feedback](https://docs.thrad.ai/api/api-reference/feedback-v2.md). Identifies which impression the feedback is for. User, publisher, campaign, and product information is resolved server-side from the impression data.

**feedback\_type** `string` *required*

User's feedback signal. Must be `"positive"` or `"negative"`.

**feedback\_text** `string`

Optional free-text feedback from the user (max 1000 characters). Useful for "tell us why" flows on negative feedback.

```json Thumbs up theme={null}
{
  "bid_id": "bid_abc123",
  "feedback_type": "positive"
}
```

```json Thumbs down with text theme={null}
{
  "bid_id": "bid_abc123",
  "feedback_type": "negative",
  "feedback_text": "Not relevant to my conversation"
}
```

```json 204 - Feedback recorded theme={null}
// No response body (HTTP 204 No Content)
```

```json 404 - Impression not found theme={null}
{
  "detail": "Impression not found or expired"
}
```

## Behavior

* **One feedback per impression** — duplicate submissions for the same `bid_id` return `204` silently (no error, no overwrite).
* **Impression must exist** — the `bid_id` must correspond to a tracked impression. If the impression has expired or was never recorded, the endpoint returns `404`.
* **Server-side enrichment** — user, publisher, campaign, and product information is resolved automatically from the impression. You only need to send the `bid_id`.
* **No authentication required** — this endpoint is called from the client side (browser or mobile app) and does not require an API key.

## Status Codes

| Status Code | Meaning | Scenario |
| - | - | - |
| `204 No Content` | Success | Feedback recorded (or already recorded for this impression) |
| `404 Not Found` | Invalid impression | `bid_id` doesn't match a known impression or has expired |
| `422 Unprocessable Entity` | Validation error | Missing required fields or invalid `feedback_type` |
| `500 Internal Server Error` | Server error | Internal processing failure |

## Integration

Add a thumbs up / thumbs down UI next to each ad. When the user taps, fire a single `POST` request:

```swift theme={null}
// iOS (Swift)
func sendFeedback(bidId: String, type: String) {
    guard let url = URL(string: "https://ssp.thrads.ai/api/v1/tracking/feedback") else { return }
    var request = URLRequest(url: url)
    request.httpMethod = "POST"
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = try? JSONSerialization.data(withJSONObject: [
        "bid_id": bidId,
        "feedback_type": type
    ])
    URLSession.shared.dataTask(with: request).resume()
}
```

```javascript theme={null}
// Web (JavaScript)
async function sendFeedback(bidId, type) {
  await fetch("https://ssp.thrads.ai/api/v1/tracking/feedback", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      bid_id: bidId,
      feedback_type: type,
    }),
  });
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.