Vouch
API reference
Authenticate with Authorization: Bearer API key. Base URL: https://agent-trust-tawny.vercel.app/api/v1 (custom domain not yet registered).
Full machine-readable schema: docs/openapi.yaml in this repository.
GET /api/v1/agents/:agentId/score
Score by ERC-8004 agent ID. Pass ?wallet=0x... to verify the agent's registered wallet.
Response
{
"agentId": "42",
"wallet": "0x1234...",
"trustScore": 78,
"recommendation": "ALLOW",
"signals": { "identity": {...}, "reputation": {...}, "wallet": {...}, "x402": {...}, "sybil": {...}, "manual": {...} },
"scoredAt": "2026-07-14T00:00:00Z",
"cacheExpiresAt": "2026-07-14T00:05:00Z",
"disclaimer": "Scores are informational only and do not constitute a guarantee, credit assessment, or investment advice."
}GET /api/v1/wallets/:address/score
Score by wallet address. Primary integration path for x402 API middleware.
Response
{
"agentId": "0",
"wallet": "0x1234...",
"trustScore": 61,
"recommendation": "WARN",
"signals": { ... },
"scoredAt": "2026-07-14T00:00:00Z",
"cacheExpiresAt": "2026-07-14T00:05:00Z",
"disclaimer": "Scores are informational only and do not constitute a guarantee, credit assessment, or investment advice."
}POST /api/v1/scores/batch
Score up to 25 agents in a single request.
Request body
{
"agents": [
{ "agentId": "1" },
{ "agentId": "2", "wallet": "0x..." }
]
}Response
{
"results": [
{ "agentId": "1", "trustScore": 78, "recommendation": "ALLOW", ... },
{ "agentId": "2", "error": "invalid_agent_id" }
]
}POST /api/v1/payments/x402
Attest an x402 payment settlement after payment verification. Idempotent on txHash.
Request body
{
"wallet": "0xpayer...",
"txHash": "0xabc...",
"amount": "1000000",
"network": "base",
"resource": "/api/premium/data"
}Response
// 201 Created (first attestation)
// 200 OK (already recorded — idempotent replay on txHash)
{
"ok": true,
"created": true,
"id": "b3f1...",
"wallet": "0xpayer...",
"txHash": "0xabc..."
}GET /api/v1/agents/:agentId/history
Score history snapshots. Requires Pro or Scale plan. Supports ?limit= (1-100, default 20).
Response
{
"agentId": "42",
"history": [
{ "trustScore": 78, "recommendation": "ALLOW", "scoredAt": "2026-07-13T00:00:00Z", ... },
{ "trustScore": 74, "recommendation": "ALLOW", "scoredAt": "2026-07-12T00:00:00Z", ... }
]
}Error codes
| Status | Meaning | Detail |
|---|---|---|
| 400 | Bad request | Malformed body/params (e.g. invalid wallet format, empty batch). |
| 401 | Unauthorized | Missing or invalid API key on the Authorization: Bearer header. |
| 403 | Forbidden / plan upgrade required | e.g. score history on a plan below Pro. |
| 429 | Rate limited | Monthly/burst limit exceeded. Response includes "retryAfter" (seconds). |
Error bodies are shaped as { "error": string, "details"?: object }.