---
title: "Rate or comment on a file"
method: POST
path: "/files/{id}/feedback"
tags: ["Files"]
---

# Rate or comment on a file

`POST /files/{id}/feedback`

## Request

- Base URL: `https://api.varg.ai/v2`
- URL: `https://api.varg.ai/v2/files/{id}/feedback`
- Auth: HTTP bearer

`like`/`dislike` upserts your rating (one per account per file).
`comment` is append-only.

## Path parameters

- `id` string, required

## Request body

- object
  - `kind` 'like' | 'dislike' | 'comment', required
  - `comment` string: Required when kind=comment. Trimmed; must not be empty.

## Response `200`

Rating saved

- FileFeedback
  - `id` string
  - `file_id` string
  - `kind` 'like' | 'dislike' | 'comment'
  - `comment` string, nullable
  - `created_at` string, date-time

## Other responses

- `201`: Comment added
- `400`: Invalid JSON, invalid `kind`, or a missing, empty or oversized comment
- `401`: Missing or invalid API key / JWT
- `404`: Unknown file (or not owned by the caller)

## Changes

- **2026-10-20** `43bcf5ea398d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/varg/apis/varg-api/changes/files/:id/feedback/post.md)

---

[API](https://skmtc.dev/varg/apis/varg-api.md) · [All operations](https://skmtc.dev/varg/apis/varg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/varg/apis/varg-api/revisions/09d49a6d852f?raw)
