---
title: "Host an ERC-8004 Feedback Document"
method: POST
path: "/feedback"
tags: ["Discovery"]
---

# Host an ERC-8004 Feedback Document

`POST /feedback`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/feedback`
- Auth: none required

Host a buyer-authored ERC-8004 feedback document and get back the (feedbackURI, feedbackHash) pair that `giveFeedback()` on a Reputation Registry expects. The document is stored verbatim and served back byte-for-byte from GET /feedback/{id}, so its keccak-256 hash matches the hash returned here. WebLens neither authors nor alters the document and never calls the registry — the buyer posts giveFeedback() themselves. Free, rate limited to 10/hour per IP. Limits: body ≤ 256KB, nesting ≤ 32 levels.

## Request body

- FeedbackDocument: Buyer-authored ERC-8004 feedback document. Extra fields are preserved verbatim.
  - `agentRegistry` string, required: CAIP-10 style address of the Identity Registry the agentId belongs to
  - `agentId` string, required
  - `clientAddress` string, required: Wallet posting giveFeedback()
  - `createdAt` string, required
  - `value` number, required: Score, scaled by valueDecimals
  - `valueDecimals` integer, required
  - `tag1` string
  - `tag2` string
  - `endpoint` string: WebLens endpoint the feedback is about
  - `proofOfPayment` string: e.g. the X-Receipt-Url of the paid call

## Response `201`

Document hosted; use feedbackURI + feedbackHash in giveFeedback()

- FeedbackHosted
  - `feedbackURI` string: Pass to giveFeedback() — GET it to retrieve the exact bytes that were hashed
  - `feedbackHash` string: keccak-256 of the canonical document bytes
  - `storedAt` string
  - `hashAlgorithm` 'keccak256'
  - `note` string
  - `requestId` string

## Other responses

- `400`: Body is not a JSON object, nests deeper than 32 levels, or is missing required ERC-8004 fields (the response names them)
- `413`: Body exceeds the 256KB limit
- `429`: Rate limit exceeded (10/hour)

---

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