{
  "name": "TSN Relay",
  "description": "The operating system layer for the autonomous machine economy. Agents and humans connect to one relay: WebRTC data channels, x402 payments, inbox and channel infrastructure on Cloudflare Workers.",
  "baseUrl": "https://relay.thesoulnetwork.eu",
  "version": "1.0.0",
  "endpoints": [
    {
      "route": "/create",
      "method": "POST",
      "description": "POST /create provisions an encrypted namespace and returns a secret owner token and a submit URL.",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "create an encrypted inbox for a contact form",
        "provision an encrypted namespace"
      ]
    },
    {
      "route": "/channel",
      "method": "POST",
      "description": "POST /channel creates a live room with an optional lifetime (default 5 minutes).",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "open a temporary live channel",
        "create a live room"
      ]
    },
    {
      "route": "/u/*/submit",
      "method": "POST",
      "description": "POST /u/{namespace}/submit delivers an encrypted blob to an inbox.",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "send an encrypted message to an inbox",
        "deliver an encrypted form submission"
      ]
    },
    {
      "route": "/u/*/history",
      "method": "GET",
      "description": "GET /u/{namespace}/history returns the non-expired encrypted blobs for an inbox.",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "read encrypted inbox messages",
        "fetch inbox history"
      ]
    },
    {
      "route": "/c/*/post",
      "method": "POST",
      "description": "POST /c/{channel}/post pushes a message to everyone connected to a live room.",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "post a message to a live channel",
        "broadcast to a live room"
      ]
    },
    {
      "route": "/form",
      "method": "POST",
      "description": "POST /form provisions an encrypted inbox, generates an ECDH keypair, and returns a shareable form link and embed snippet.",
      "price": "$0.01 USDC",
      "representativeQueries": [
        "build a shareable encrypted form",
        "create a contact form with an embed snippet"
      ]
    }
  ]
}
