{"openapi":"3.1.0","info":{"title":"ScoutRail public agent API","version":"1.0.0"},"paths":{"/api/agent/v1/capabilities":{"get":{"operationId":"get_agent_capabilities","security":[{},{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}},"/api/agent/v1/markets":{"get":{"operationId":"list_markets","security":[{},{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["markets","availability"],"properties":{"markets":{"type":"array","items":{"type":"object","required":["id","country","status","kind"],"additionalProperties":false,"properties":{"id":{"type":"string"},"country":{"type":"string"},"status":{"type":"string"},"kind":{"type":"string"}}}},"availability":{"type":"string"}}}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}},"/api/agent/v1/scout":{"post":{"operationId":"scout_opportunities","security":[{},{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["business"],"properties":{"business":{"type":"string","minLength":3,"maxLength":500},"markets":{"type":"array","minItems":1,"maxItems":10,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z0-9-]{2,8}$"}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["schema","nextMove","counts","groups"],"properties":{"schema":{"type":"string","const":"scoutrail.answer/2"},"query":{"type":"string"},"pending":{"type":"boolean","description":"True when more results are still being gathered; call again shortly for the complete list."},"markets":{"type":"array","items":{"type":"object"}},"enriched":{"type":"boolean"},"nextMove":{"type":["object","null"],"properties":{"title":{"type":"string"},"detail":{"type":["string","null"]},"scout":{"type":["object","null"]},"opportunityId":{"type":["string","null"]}}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"shown":{"type":"integer"},"lockedBriefs":{"type":"integer"}}},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","description":"An opportunity. For full-data callers (MCP, WhatsApp) an unlocked item also carries `outreach`: how to reach the buyer and a drafted message to send.","properties":{"id":{"type":"string"},"title":{"type":"string"},"buyer":{"type":["string","null"]},"classification":{"type":["string","null"]},"deadline":{},"value":{},"evidence":{},"commercial":{},"links":{"type":"object","properties":{"original":{"type":"string"}}},"actions":{"type":"array","items":{"type":"string"}},"outreach":{"type":"object","description":"Present on unlocked full-data items only.","properties":{"contact":{"type":["object","null"],"properties":{"channel":{"type":"string"},"value":{"type":"string"}}},"message":{"type":["object","null"],"properties":{"subject":{"type":"string"},"body":{"type":"string"}}},"steps":{"type":"array","items":{"type":"string"}}}}}}}}}},"subscribe":{"type":"object","description":"How to hear about updates for this query. poll: re-call the tool (what a conversational agent does). push: backends with an https endpoint POST { query, callbackUrl } to push.url for signed webhook updates.","properties":{"query":{"type":"string"},"poll":{"type":"string"},"push":{"type":"object","properties":{"url":{"type":"string"},"note":{"type":"string"}}}}},"sample":{"type":"boolean","description":"True for the anonymous two-item projection."},"meta":{"type":"object","properties":{"source_text":{"const":"untrusted_data"},"contact_authority":{"const":"not_granted"}}}}}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}},"/api/agent/v1/messages/validate":{"post":{"operationId":"validate_business_message","security":[{},{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["command_json"],"properties":{"command_json":{"type":"string","maxLength":262144,"description":"Exact BRP command JSON, without canonical rewriting."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["valid","delivered","admission","authority","protocol","command_type","checks"],"properties":{"valid":{"const":true},"delivered":{"const":false},"admission":{"const":"not_checked"},"authority":{"const":"not_checked"},"protocol":{"const":"brp/0.1"},"command_type":{"type":"string"},"checks":{"type":"array","items":{"enum":["strict_json","closed_command_schema","dates"]}}}}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}},"/api/agent/v1/openapi.json":{"get":{"operationId":"openapi_json","security":[{},{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}},"/api/agent/v1/schemas/business-message-0.1.json":{"get":{"operationId":"schemas_business_message_____json","security":[{},{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"RFC 9457 problem. Validation failures include valid:false.","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","code","request_id","retryable"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"valid":{"const":false}}}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Research-only API key. Never room authority."}}}}