{"openapi":"3.0.3","info":{"title":"Disciplr API","version":"0.1.0","description":"Commitment vaults on Stellar: lock funds against milestones; a verifier validates progress; funds release on success or redirect on failure."},"servers":[{"url":"/api"}],"paths":{"/health":{"get":{"summary":"Health check and active data store","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/vaults":{"get":{"summary":"List vaults","parameters":[{"name":"creator","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","completed","failed"]}}],"responses":{"200":{"description":"Vault list","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Create a vault","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["creator","verifier","amount","endDate","milestones"],"properties":{"name":{"type":"string"},"creator":{"type":"string"},"verifier":{"type":"string"},"amount":{"type":"number"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"successDestination":{"type":"string"},"failureDestination":{"type":"string"},"milestones":{"type":"array","items":{"type":"object","required":["title","amount"],"properties":{"title":{"type":"string"},"amount":{"type":"number"},"dueDate":{"type":"string","format":"date-time"}}}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/vaults/{id}":{"get":{"summary":"Get a vault with its activity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Vault","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/vaults/{id}/milestones/{mid}/validate":{"post":{"summary":"Verifier validates a milestone (body: {verifier})","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"mid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated vault","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/vaults/{id}/fail":{"post":{"summary":"Verifier fails a vault; funds redirect (body: {verifier})","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated vault","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/transactions":{"get":{"summary":"Activity feed (create / validate / release / redirect)","parameters":[{"name":"vaultId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Activity","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/stats":{"get":{"summary":"Aggregate statistics","parameters":[{"name":"creator","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}