API Reference

API Reference

Complete documentation for every endpoint. All responses are JSON. CORS is enabled for all origins.

Discovery Endpoints

GET/.well-known/brand-capsule.json

Brand Capsule Registry

Returns a JSON-LD ItemList of all verified Brand Capsules. No authentication required. Cached for 5 minutes.

Response
{ "@context": "https://schema.org", "@type": "ItemList",
  "numberOfItems": 42, "itemListElement": [...] }
GET/.well-known/agent.json

A2A Agent Card

Agent-to-Agent protocol discovery. Returns capabilities, endpoints, and authentication requirements.

Response
{ "name": "RegisteredBrands.AI Verification Agent",
  "version": "2.0.0", "capabilities": [...], "endpoints": {...} }
GET/.well-known/agent-payment.json

Payment Manifest

Machine-readable payment configuration. Lists accepted tokens, networks, and subscription endpoints.

Response
{ "merchant": {...}, "accepted_tokens": [...],
  "subscription_endpoints": {...} }
GET/.well-known/rb-merchant.json

Merchant Identity

Platform merchant identity with payment addresses and key fingerprints.

Response
{ "capsule_id": "cap_registeredbrands_platform",
  "payment_addresses": {...}, "key_fingerprints": {...} }
GET/pricing.json

Machine-Readable Pricing

Current pricing for all agent plans including credits, rate limits, and upgrade rules.

Response
{ "agent_plans": [{ "plan_id": "starter",
  "price_usd": 0, "credits": 1000, ... }] }

Verification Endpoints

POST/api/v1/verify/capsule

Verify Brand Capsule

Verifies a Brand Capsule's identity, trust score, and domain anchoring. Optionally verifies an Ed25519 signature if provided.

Request Body
{ "capsuleId": "cap_7xK9mN2p",
  "signature": "base64... (optional)",
  "publicKey": "base64... (optional)" }
Response
{ "verified": true, "capsuleId": "cap_7xK9mN2p",
  "trustScore": 87500, "dunsVerified": true,
  "domainAnchored": true, "signatureValid": true }
POST/api/v1/verify/receipt

Verify Transaction Receipt

Verifies a receipt's schema validity, signature, and checks that both buyer and seller capsules exist and are verified.

Request Body
{ "receiptId": "rcpt_Q4wR7xK9",
  "signature": "base64... (optional)",
  "publicKey": "base64... (optional)" }
Response
{ "verified": true, "receiptId": "rcpt_Q4wR7xK9",
  "schemaValid": true, "buyer": {...}, "seller": {...},
  "amount": "29.00", "currency": "USDC" }

Subscription Endpoints

POST/api/v1/subscriptions/quote

Get Subscription Quote

Returns pricing details and creates a payment intent for the specified plan. Intent expires in 30 minutes.

Request Body
{ "plan_id": "professional" }
Response
{ "plan_id": "professional", "price_usd": 29,
  "credits": 25000, "payment_intent_id": "pi_...",
  "payment_address": "0x...", "expires_at": "..." }
POST/api/v1/subscriptions/pay_intent

Confirm Payment

Confirms a payment intent with an on-chain transaction hash. In mock mode, auto-confirms.

Request Body
{ "payment_intent_id": "pi_...",
  "tx_hash": "0x... (optional in mock mode)" }
Response
{ "payment_intent_id": "pi_...",
  "status": "confirmed", "tx_hash": "0x..." }
POST/api/v1/subscriptions/activate

Activate Entitlement

Activates a confirmed payment intent and issues a signed entitlement token with credit caps and rate limits.

Request Body
{ "payment_intent_id": "pi_..." }
Response
{ "entitlement_id": "ent_...", "credits": 5000,
  "signature": "base64...",
  "issuer_public_key": "base64..." }

Capsule & Search Endpoints

GET/api/v1/capsules/search?q=&status=&limit=&offset=

Search Capsules

Full-text search across brand names and descriptions. Filter by status, trust score range.

Response
{ "results": [...], "total": 42,
  "limit": 50, "offset": 0 }
GET/api/v1/capsules/:capsuleId

Lookup Capsule

Returns a single capsule as a JSON-LD Brand document.

Response
{ "@context": "https://schema.org", "@type": "Brand",
  "name": "...", "trustScore": 87500, ... }
POST/api/v1/badges/verify

Verify Badge Key

Validates a badge token and returns the associated permissions and brand information.

Request Body
{ "token": "badge_token_string" }
Response
{ "valid": true, "badge": {...}, "brand": {...} }

Protocol Endpoints

POST/api/v1/protocol/a2a

A2A Protocol

Agent-to-Agent protocol endpoint. Supports tasks: verify-brand, verify-receipt, search-brands.

Request Body
{ "task": "verify-brand",
  "message": { "capsuleId": "cap_..." } }
Response
{ "status": "completed",
  "result": { "verified": true, ... } }
POST/api/v1/protocol/tap

TAP Protocol

Transaction Authorization Protocol endpoint for agent-to-agent transaction verification.

Request Body
{ "capsuleId": "cap_...",
  "action": "verify" }
Response
{ "protocol": "tap", "verified": true,
  "brandIdentity": {...}, "agentAuthorization": {...} }
GET/api/v1/protocol/ucp

UCP Catalog

Universal Commerce Protocol compatible brand catalog.

Response
{ "protocol": "ucp", "catalog": {
  "totalBrands": 42, "brands": [...] } }
GET/api/v1/status

API Status

Health check endpoint returning service status.

Response
{ "status": "operational",
  "services": { "api": "operational", ... } }