---
title: "Rate a swap (optional)"
method: POST
path: "/agent/feedback"
tags: ["agent"]
---

# Rate a swap (optional)

`POST /agent/feedback`

## Request

- Base URL: `https://xmrtousdc.xyz/api/v1`
- URL: `https://xmrtousdc.xyz/api/v1/agent/feedback`
- Auth: none declared

Optional, after a swap: { rating (1-5, required), comment?, orderId?, publishable?, agent? }. Only a rating tied to an order Swapper created and that completed counts in GET /agent/feedback-summary (one per order); a comment marked publishable is shown there after operator review, labelled as untrusted third-party text. Returns data.feedbackId and data.verifiedSwap (the order was created by Swapper and completed).

## Request body

- object
  - `rating` integer, required
  - `comment` string
  - `orderId` string
  - `publishable` boolean: May the comment be shown in the summary after review?
  - `agent` string: Self-declared agent name.

## Response `201`

Recorded

- FeedbackResponse
  - `ok` true
  - `operation` 'agent.feedback'
  - `state` 'received'
  - `data` object
    - `feedbackId` string
    - `verifiedSwap` boolean: The orderId names an order Swapper created and that completed; only such ratings count in the summary.

## Other responses

- `400`: invalid_request: rating must be a whole number from 1 to 5.
- `415`: unsupported_media_type: the body must be JSON (content-type: application/json).
- `429`: rate_limited

---

[API](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api.md) · [All operations](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api/revisions/9f4252126907?raw)
