{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Agent Paywire",
    "version": "1.0.0",
    "summary": "Static JSON endpoints for Agent Paywire.",
    "description": "Read-only JSON files. No auth. JSON responses use Cache-Control: public, max-age=3600, stale-while-revalidate=86400 and an ETag. CORS allows any origin. CC BY 4.0 applies to our metadata and summaries. Linked content belongs to its publishers.",
    "contact": {
      "email": "agentpaywire@gmail.com"
    },
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://agentpaywire.com"
    }
  ],
  "paths": {
    "/api/index.json": {
      "get": {
        "operationId": "get_api_index_json",
        "summary": "Discovery document for every machine endpoint.",
        "responses": {
          "200": {
            "description": "Discovery document for every machine endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "endpoints"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "path",
                          "url",
                          "media_type",
                          "description",
                          "update_frequency",
                          "schema_url"
                        ],
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "media_type": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "update_frequency": {
                            "type": "string",
                            "enum": [
                              "on-publish",
                              "on-change",
                              "static",
                              "live"
                            ]
                          },
                          "schema_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "get_openapi_json",
        "summary": "This OpenAPI document.",
        "responses": {
          "200": {
            "description": "This OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/health.json": {
      "get": {
        "operationId": "get_api_health_json",
        "summary": "Static health document.",
        "responses": {
          "200": {
            "description": "Static health document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "generated_at",
                    "counts",
                    "last_verified"
                  ],
                  "properties": {
                    "status": {
                      "const": "ok"
                    },
                    "generated_at": {
                      "type": "string"
                    },
                    "counts": {
                      "type": "object"
                    },
                    "last_verified": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "operationId": "get_well_known_api_catalog",
        "summary": "RFC 9727 API catalog linkset.",
        "responses": {
          "200": {
            "description": "RFC 9727 API catalog linkset.",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "linkset"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/changelog.json": {
      "get": {
        "operationId": "get_changelog_json",
        "summary": "Incremental sync records. Filter on verified_at.",
        "responses": {
          "200": {
            "description": "Incremental sync records. Filter on verified_at.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "updated_since",
                    "entries"
                  ],
                  "properties": {
                    "updated_since": {
                      "type": "object",
                      "required": [
                        "field",
                        "id_field"
                      ],
                      "properties": {
                        "field": {
                          "const": "verified_at"
                        },
                        "id_field": {
                          "const": "id"
                        }
                      }
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "kind",
                          "title",
                          "url",
                          "date_published",
                          "verified_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "article",
                              "library"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "md_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "bitcoin-lightning",
                              "payments",
                              "agent-protocols",
                              "robotics-autonomy",
                              "iot",
                              "datasets-benchmarks",
                              "safety-security",
                              "regulation"
                            ]
                          },
                          "date_published": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "verified_at": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/about.json": {
      "get": {
        "operationId": "get_about_json",
        "summary": "Who runs the site, the sourcing policy, and the license.",
        "responses": {
          "200": {
            "description": "Who runs the site, the sourcing policy, and the license.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "operator",
                    "purpose",
                    "sourcing",
                    "corrections",
                    "license"
                  ],
                  "properties": {
                    "operator": {
                      "type": "string"
                    },
                    "purpose": {
                      "type": "string"
                    },
                    "sourcing": {
                      "type": "string"
                    },
                    "corrections": {
                      "type": "string",
                      "format": "email"
                    },
                    "license": {
                      "type": "string"
                    },
                    "license_note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/articles.json": {
      "get": {
        "operationId": "get_api_articles_json",
        "summary": "Static article catalog.",
        "responses": {
          "200": {
            "description": "Static article catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "articles"
                  ],
                  "properties": {
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/articles/{slug}.json": {
      "get": {
        "operationId": "get_articles_slug_json",
        "summary": "One article record. verified_at is the publication date.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "machine-native-economy"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Article record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "verified_at",
                    "url",
                    "md_url"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "verified_at": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "md_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/skills/index.json": {
      "get": {
        "operationId": "get_skills_index_json",
        "summary": "Agent Skills index. Each skill has a SKILL.md URL and a sha256 digest.",
        "responses": {
          "200": {
            "description": "Agent Skills index. Each skill has a SKILL.md URL and a sha256 digest.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "skills"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "skills": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/skills/{name}/SKILL.md": {
      "get": {
        "operationId": "get_skills_name_SKILL_md",
        "summary": "One Agent Skill document.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "use-agentpaywire-library",
                "pay-l402-endpoint",
                "pay-x402-endpoint",
                "donate-to-agentpaywire"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SKILL.md with YAML frontmatter.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/protocol-facts.json": {
      "get": {
        "operationId": "get_api_protocol_facts_json",
        "summary": "Checked protocol facts. Bitcoin and Lightning protocols are first.",
        "responses": {
          "200": {
            "description": "Checked protocol facts. Bitcoin and Lightning protocols are first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "protocols"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "protocols": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/library.json": {
      "get": {
        "operationId": "get_api_library_json",
        "summary": "Knowledge library.",
        "responses": {
          "200": {
            "description": "Knowledge library.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://agentpaywire.com/schemas/library.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/api/library/{category}.json": {
      "get": {
        "operationId": "get_api_library_category_json",
        "summary": "Library entries in one category. bitcoin-lightning is the featured category.",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "bitcoin-lightning",
                "payments",
                "agent-protocols",
                "robotics-autonomy",
                "iot",
                "datasets-benchmarks",
                "safety-security",
                "regulation"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category document. Static slice of the search index.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://agentpaywire.com/schemas/library.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/api/search-index.json": {
      "get": {
        "operationId": "get_api_search_index_json",
        "summary": "Compact library search index. Static snapshot; a worker applies x-agentpaywire-filter.",
        "x-agentpaywire-filter": {
          "mode": "static",
          "note": "These files are pre-built. A later API or MCP worker applies the same filter to this index.",
          "parameters": {
            "q": "Case-insensitive substring of id, title, summary, or publisher.",
            "category": "Exact category id. Static file: /api/library/{category}.json.",
            "tag": "Exact tag. Static file: /api/library/tag/{tag}.json. Tag list: /api/library/tags.json.",
            "type": "Exact library type.",
            "featured": "When true, keep records with featured true.",
            "updated_since": "YYYY-MM-DD. Keep records whose verified_at is greater than this date. Day files list records verified on that date: /api/updated-since/{date}.json. The date index is /api/updated-since/index.json."
          }
        },
        "responses": {
          "200": {
            "description": "Search index. entries use the library order, Bitcoin and Lightning first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "entries",
                    "filter"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "filter": {
                      "type": "object"
                    },
                    "entries": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/library/tags.json": {
      "get": {
        "operationId": "get_api_library_tags_json",
        "summary": "Tag index. Each tag links to its JSON file.",
        "responses": {
          "200": {
            "description": "Tag index. Each tag links to its JSON file.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "tags"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "tags": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/library/tag/{tag}.json": {
      "get": {
        "operationId": "get_api_library_tag_json",
        "summary": "Library entries with one tag.",
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "a2a",
                "acp",
                "agent-wallets",
                "agents",
                "ai-risk",
                "ai-standards",
                "ap2",
                "autonomy-safety",
                "benchmark",
                "bitcoin",
                "bolt12",
                "card-networks",
                "dataset",
                "directory",
                "eu-ai-act",
                "http",
                "identity",
                "industrial-iot",
                "interop",
                "iot",
                "l402",
                "leaderboard",
                "lightning",
                "llms-txt",
                "m2m",
                "m2m-payments",
                "macaroons",
                "market-data",
                "matter",
                "mcp",
                "micropayments",
                "mqtt",
                "nostr",
                "nwc",
                "opc-ua",
                "openapi",
                "owasp",
                "prompt-injection",
                "regulation",
                "research",
                "robotics",
                "ros2",
                "security",
                "stablecoins",
                "standards",
                "streaming-payments",
                "tokenization",
                "tools",
                "web-agents",
                "wot",
                "x402"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag document. entries match the library entry shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag",
                    "count",
                    "entries"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/updated-since/index.json": {
      "get": {
        "operationId": "get_api_updated_since_index_json",
        "summary": "Dates with changelog records. Read day files after your cursor.",
        "responses": {
          "200": {
            "description": "Dates with changelog records. Read day files after your cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "field",
                    "dates"
                  ],
                  "properties": {
                    "field": {
                      "const": "verified_at"
                    },
                    "dates": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/updated-since/{date}.json": {
      "get": {
        "operationId": "get_api_updated_since_date_json",
        "summary": "Records verified on one date. Library, article, and support ids.",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "enum": [
                "2026-10-20"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Day file. entries match changelog records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "date",
                    "count",
                    "entries"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "operationId": "get_feed_json",
        "summary": "Article JSON Feed 1.1.",
        "responses": {
          "200": {
            "description": "Article JSON Feed 1.1.",
            "content": {
              "application/feed+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/library/feed.json": {
      "get": {
        "operationId": "get_library_feed_json",
        "summary": "Library JSON Feed 1.1.",
        "responses": {
          "200": {
            "description": "Library JSON Feed 1.1.",
            "content": {
              "application/feed+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/support.json": {
      "get": {
        "operationId": "get_support_json",
        "summary": "Voluntary Bitcoin tip descriptor.",
        "responses": {
          "200": {
            "description": "Voluntary Bitcoin tip descriptor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://agentpaywire.com/schemas/support.schema.json"
                },
                "example": {
                  "methods": [
                    {
                      "type": "bitcoin-onchain",
                      "address": "bc1qz6p0nwkl69gcm8cjaxayvnv2rf7e2tj03uzyku",
                      "address_type": "p2wpkh",
                      "format": "native segwit",
                      "network": "mainnet",
                      "bip21_uri": "bitcoin:bc1qz6p0nwkl69gcm8cjaxayvnv2rf7e2tj03uzyku",
                      "note": "The previous BTC on-chain donation address should no longer be used."
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/support.json": {
      "get": {
        "operationId": "get_well_known_support_json",
        "summary": "The same support descriptor.",
        "responses": {
          "200": {
            "description": "The same support descriptor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://agentpaywire.com/schemas/support.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/ai-catalog.json": {
      "get": {
        "operationId": "get_well_known_ai_catalog_json",
        "summary": "SEP-2127 AI catalog. The MCP server card is inline. Status: live.",
        "responses": {
          "200": {
            "description": "SEP-2127 AI catalog. The MCP server card is inline. Status: live.",
            "content": {
              "application/ai-catalog+json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "specVersion",
                    "entries"
                  ],
                  "properties": {
                    "specVersion": {
                      "const": "1.0"
                    },
                    "entries": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/schemas/library.schema.json": {
      "get": {
        "operationId": "get_schemas_library_schema_json",
        "summary": "JSON Schema for the library.",
        "responses": {
          "200": {
            "description": "JSON Schema for the library.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/schemas/support.schema.json": {
      "get": {
        "operationId": "get_schemas_support_schema_json",
        "summary": "JSON Schema for support.",
        "responses": {
          "200": {
            "description": "JSON Schema for support.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
