{"openapi": "3.0.3", "info": {"title": "Default-watch and pinning service", "version": "1.0.0"}, "components": {"securitySchemes": {"BearerAuth": {"type": "http", "scheme": "bearer"}}}, "paths": {"/": {"get": {"summary": "Public product descriptor", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"product": {"type": "string"}}}}}}}}}, "/health": {"get": {"summary": "Health", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"status": {"type": "string"}}}}}}}}}, "/openapi.json": {"get": {"summary": "This spec", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"openapi": {"type": "string"}}}}}}}}}, "/llms.txt": {"get": {"summary": "Product llms.txt", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "string"}}}}}}}, "/.well-known/x402": {"get": {"summary": "x402 payment terms", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"payTo": {"type": "string"}}}}}}}}}, "/package": {"get": {"summary": "Session-start client package (wheel) download", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "string"}}}}}}}, "/register": {"post": {"summary": "Create account + claim token (unauthenticated, rate-limited)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_name": {"type": "string"}, "payer_wallet": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "claim_token": {"type": "string"}}}}}}}}}, "/trial": {"post": {"summary": "Claim one-time Watch trial (once per account AND once per payer wallet)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "claim_token": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"token": {"type": "string"}, "tier": {"type": "string"}, "trial": {"type": "boolean"}}}}}}, "403": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/subscribe": {"post": {"summary": "Subscribe/renew Watch or Fleet via x402 X-PAYMENT (402 challenge without a verified payment; bogus/replayed payments rejected with a named error)", "parameters": [{"name": "X-PAYMENT", "in": "header", "schema": {"type": "string"}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "tier": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"token": {"type": "string"}, "tier": {"type": "string"}}}}}}, "402": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}, "accepts": {"type": "array"}}}}}}}}}, "/tokens/revoke": {"post": {"security": [{"BearerAuth": []}], "summary": "Revoke a token under the caller's account (or itself)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"token_sha256": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"revoked": {"type": "boolean"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/account": {"get": {"security": [{"BearerAuth": []}], "summary": "Caller's account state (identity from token only)", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "tier": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/platforms": {"get": {"security": [{"BearerAuth": []}], "summary": "List the caller's platforms", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"platforms": {"type": "array", "items": {"type": "object"}}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}, "post": {"security": [{"BearerAuth": []}], "summary": "Register a platform (tier cap: Watch 10, Fleet 50) with its initial changelog snapshot and operator-supplied price table", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}, "pin_class": {"type": "string"}, "changelog": {"type": "object", "properties": {"release_id": {"type": "string"}, "default_model": {"type": "string"}}}, "price_table": {"type": "object"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}}}}}}, "400": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "403": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "409": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/changelog": {"post": {"security": [{"BearerAuth": []}], "summary": "Ingest a changelog snapshot (hash-checked; expected_hash optional)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}, "changelog": {"type": "object", "properties": {"release_id": {"type": "string"}, "default_model": {"type": "string"}}}, "expected_hash": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"default_changed_in_changelog": {"type": "boolean"}, "staged_pending_probe": {"type": "boolean"}}}}}}, "400": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/probe": {"post": {"security": [{"BearerAuth": []}], "summary": "Session-start probe: reconcile the effective default against changelog state -> verdict + signed attestation", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}, "effective_model": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"verdict": {"type": "string"}, "attestation": {"type": "object"}}}}}}, "400": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/pin": {"post": {"security": [{"BearerAuth": []}], "summary": "Set or clear (null) the pin for a platform", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}, "model": {"type": "string"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"pin": {"type": "string"}, "pin_class": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/attestations/verify": {"post": {"security": [{"BearerAuth": []}], "summary": "Verify a signed effective-default attestation (forged/tampered attestations return valid: false)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"attestation": {"type": "object"}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"valid": {"type": "boolean"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/alerts": {"get": {"security": [{"BearerAuth": []}], "summary": "Operator alert surface: STAGED/UNANNOUNCED/PIN_VIOLATED events for the caller's platforms", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"alerts": {"type": "array", "items": {"type": "object"}}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}}}}, "/delta-run": {"post": {"security": [{"BearerAuth": []}], "summary": "Golden-task delta run, x402 pay-per-call $0.01/run (402 challenge without a verified payment; bogus/replayed rejected with a named error; golden set capped at 20 tasks)", "parameters": [{"name": "X-PAYMENT", "in": "header", "schema": {"type": "string"}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"platform_id": {"type": "string"}, "old_model": {"type": "string"}, "new_model": {"type": "string"}, "tasks": {"type": "array", "items": {"type": "object"}}, "old_profile": {"type": "object", "properties": {"token_factor": {"type": "number"}, "format": {"type": "string"}}}, "new_profile": {"type": "object", "properties": {"token_factor": {"type": "number"}, "format": {"type": "string"}}}}}}}}, "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"verdict": {"type": "string"}, "flips": {"type": "integer"}}}}}}, "400": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "401": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}}, "402": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}, "accepts": {"type": "array"}}}}}}}}}}}