{"openapi":"3.1.0","info":{"title":"Rose Bounty M2 API","version":"0.2.0-cf1","description":"Agent-first capability discovery, quoting, execution, independent verification and receipts. Sandbox payments only."},"servers":[{"url":"https://rose.agttglobal.org"}],"tags":[{"name":"Discovery"},{"name":"Marketplace"},{"name":"Agents"}],"paths":{"/health":{"get":{"tags":["Discovery"],"summary":"Service health","operationId":"getHealth","responses":{"200":{"description":"Healthy service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/.well-known/agent-card.json":{"get":{"tags":["Discovery"],"summary":"A2A agent card","operationId":"getAgentCard","responses":{"200":{"description":"Agent card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"summary":"Agent discovery guide","operationId":"getLlmsTxt","responses":{"200":{"description":"Plain-text guide","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/openapi.json":{"get":{"tags":["Discovery"],"summary":"OpenAPI document","operationId":"getOpenApi","responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}}}}},"/capabilities/web.status.check":{"get":{"tags":["Discovery"],"summary":"Website-status capability definition","operationId":"getWebsiteStatusCapability","responses":{"200":{"description":"Capability definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capability"}}}}}}},"/v1/capabilities":{"get":{"tags":["Marketplace"],"summary":"List capabilities","operationId":"listCapabilities","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Capability list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilityList"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/search":{"post":{"tags":["Marketplace"],"summary":"Search capabilities","operationId":"searchCapabilities","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilityList"}}}},"400":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/quotes":{"post":{"tags":["Marketplace"],"summary":"Create an immutable quote","operationId":"createQuote","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilityRequest"}}}},"responses":{"201":{"description":"Quote created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/jobs":{"post":{"tags":["Marketplace"],"summary":"Execute an accepted quote","description":"Repeating the same request with the same Idempotency-Key returns the same job.","operationId":"createJob","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRequest"}}}},"responses":{"200":{"description":"Existing idempotent job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"201":{"description":"Job created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["Marketplace"],"summary":"Read job state and result","operationId":"getJob","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/receipts/{id}":{"get":{"tags":["Marketplace"],"summary":"Read verification and settlement receipt","operationId":"getReceipt","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/mcp":{"post":{"tags":["Agents"],"summary":"MCP JSON-RPC endpoint","operationId":"mcp","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequest"}}}},"responses":{"200":{"description":"MCP response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"400":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/a2a/v1/message:send":{"post":{"tags":["Agents"],"summary":"Send an A2A message","operationId":"sendA2AMessage","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"A2A response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"400":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Typed API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"Object":{"type":"object"},"Health":{"type":"object","required":["status","service","version","database"],"properties":{"status":{"type":"string","example":"ok"},"service":{"type":"string","example":"rose-bounty"},"version":{"type":"string"},"database":{"type":"string","example":"d1"}}},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string"}}}}},"Price":{"type":"object","required":["amount_minor","currency"],"properties":{"amount_minor":{"type":"integer","minimum":0,"example":3},"currency":{"type":"string","example":"USD"}}},"Capability":{"type":"object","required":["id","version","price"],"properties":{"id":{"type":"string","example":"web.status.check"},"version":{"type":"integer","example":1},"description":{"type":"string"},"input_schema":{"type":"object"},"output_schema":{"type":"object"},"price":{"$ref":"#/components/schemas/Price"},"quote_ttl_seconds":{"type":"integer"},"keywords":{"type":"array","items":{"type":"string"}}}},"CapabilityList":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Capability"}},"next_cursor":{"type":["string","null"]}}},"StatusInputs":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","example":"https://example.com/"},"expected_status":{"type":"integer","minimum":100,"maximum":599,"default":200}}},"CapabilityRequest":{"type":"object","required":["capability_id","inputs"],"properties":{"capability_id":{"type":"string","const":"web.status.check"},"inputs":{"$ref":"#/components/schemas/StatusInputs"}}},"SearchRequest":{"type":"object","properties":{"query":{"type":"string","example":"website status uptime"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"}}},"Quote":{"type":"object","required":["id","capability_id","price","created_at","expires_at"],"properties":{"id":{"type":"string"},"capability_id":{"type":"string"},"capability_version":{"type":"integer"},"input_hash":{"type":"string"},"price":{"$ref":"#/components/schemas/Price"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"delivery_seconds":{"type":"integer"},"verification_policy":{"type":"string"},"refund_policy":{"type":"string"},"contract_hash":{"type":"string"},"quote_hash":{"type":"string"}}},"JobRequest":{"type":"object","required":["quote_id","payment_token"],"properties":{"quote_id":{"type":"string"},"payment_token":{"type":"string","description":"Sandbox token: sandbox_ok, sandbox_decline, or sandbox_capture_fail."}}},"Job":{"type":"object","required":["id","quote_id","state"],"properties":{"id":{"type":"string"},"quote_id":{"type":"string"},"state":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","DECLINED","REFUND_PENDING","FAILED"]},"result":{"type":["object","null"]},"failure_code":{"type":["string","null"]},"receipt_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Receipt":{"type":"object","required":["id","job_id","quote_id","outcome"],"properties":{"id":{"type":"string"},"job_id":{"type":"string"},"quote_id":{"type":"string"},"capability_id":{"type":"string"},"capability_version":{"type":"integer"},"amount_minor":{"type":"integer"},"currency":{"type":"string"},"payment_reference":{"type":"string"},"input_hash":{"type":"string"},"output_hash":{"type":"string"},"evidence":{"type":"object"},"verifier_checks":{"type":"object","additionalProperties":{"type":"boolean"}},"confidence":{"type":"string"},"outcome":{"type":"string","example":"CAPTURED"},"created_at":{"type":"string","format":"date-time"},"receipt_hash":{"type":"string"}}},"McpRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{},"method":{"type":"string"},"params":{"type":"object"}}}}}}