{"openapi":"3.1.0","info":{"title":"Digital Credit Network API","version":"1.5.0","description":"Developer contract for the Digital Credit Network simulation control layer, including explicitly labeled human-signed Base Sepolia test-USDC workflows. Real funds and real credit remain disabled."},"servers":[{"url":"https://digitalcreditnetwork.ca","description":"Public production host"}],"tags":[{"name":"Authentication"},{"name":"Agents"},{"name":"Machine identity"},{"name":"Approvals"},{"name":"Webhooks"},{"name":"Audit evidence"},{"name":"Verification"},{"name":"Simulation"},{"name":"Merchants"},{"name":"Trust"},{"name":"Digital credit sandbox"}],"components":{"securitySchemes":{"humanSession":{"type":"apiKey","in":"cookie","name":"atn_session","description":"Human session set by login; mutation requests also require same-origin Origin and application/json Content-Type."},"verificationKey":{"type":"http","scheme":"bearer","description":"Read-only, owner-issued key beginning atn_; only active published passport fields for its organization."},"agentIdHeader":{"type":"apiKey","in":"header","name":"X-DCN-Agent-ID"},"agentKeyHeader":{"type":"apiKey","in":"header","name":"X-DCN-Key-ID"},"agentTimestampHeader":{"type":"apiKey","in":"header","name":"X-DCN-Timestamp"},"agentNonceHeader":{"type":"apiKey","in":"header","name":"X-DCN-Nonce"},"agentSignatureHeader":{"type":"apiKey","in":"header","name":"X-DCN-Signature","description":"Base64url Ed25519 signature of the canonical request."}},"schemas":{"EscrowCloseoutQuantity":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"EscrowCloseoutHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"EscrowCloseoutReceipt":{"type":"object","description":"A point-in-time record of a fully repaid and withdrawn Base Sepolia loan. Monetary values are decimal strings in millionths of test USDC.","required":["schema_version","network","asset","contract_address","principal_atomic","total_due_atomic","repaid_atomic","withdrawn_atomic","outstanding_atomic","escrow_balance_atomic","observation","transactions"],"properties":{"schema_version":{"const":1},"network":{"const":"eip155:84532"},"asset":{"type":"object","required":["contract_address","symbol","decimals"],"properties":{"contract_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"symbol":{"const":"USDC"},"decimals":{"const":6}}},"contract_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"principal_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"total_due_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"repaid_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"withdrawn_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"outstanding_atomic":{"const":"0"},"escrow_balance_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity","description":"Token balance at the escrow address, including any unrelated transfers."},"observation":{"type":"object","required":["block_number","block_hash","checked_at"],"properties":{"block_number":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"block_hash":{"$ref":"#/components/schemas/EscrowCloseoutHash"},"checked_at":{"type":"string","format":"date-time"}}},"transactions":{"type":"array","items":{"type":"object","required":["action","amount_atomic","transaction_hash","block_number","block_hash","log_index"],"properties":{"action":{"enum":["funding","drawdown","repayment","withdrawal"]},"amount_atomic":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"transaction_hash":{"$ref":"#/components/schemas/EscrowCloseoutHash"},"block_number":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"},"block_hash":{"$ref":"#/components/schemas/EscrowCloseoutHash"},"log_index":{"$ref":"#/components/schemas/EscrowCloseoutQuantity"}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"Agent":{"type":"object","required":["id","public_agent_id","status"],"properties":{"id":{"type":"string","format":"uuid"},"public_agent_id":{"type":"string","pattern":"^AR-[0-9]{6,}$"},"name":{"type":"string"},"status":{"type":"string"},"trust_score":{"type":["integer","null"],"description":"Latest saved historical simulation assessment, not current authorization."}}},"Verification":{"type":"object","required":["agent_id","identity_verified","owner_verified","risk_level","credit_rating","real_payments_enabled","trust_basis","published_at","shared_fields","disclosure_notice"],"properties":{"agent_id":{"type":"string"},"identity_verified":{"const":false},"owner_verified":{"const":false},"risk_level":{"const":"not_assessed"},"credit_rating":{"const":"unavailable"},"real_payments_enabled":{"const":false},"trust_basis":{"const":"owner_published_snapshot"},"published_at":{"type":"string","format":"date-time"},"shared_fields":{"type":"array","items":{"type":"string"}},"disclosure_notice":{"type":"string"},"status":{"type":"string","description":"Present only when selected by owner."},"platform_identity":{"type":"object","description":"Present only when selected by owner."},"trust_score":{"type":"object","description":"Optional saved historical simulation summary, low confidence, capped at 60/100."}}},"SimulationOperation":{"type":"object","required":["id","status","reason_code","mode","payment_capability"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["funded","settled","declined","pending_review","cancelled","expired"]},"reason_code":{"type":"string"},"mode":{"const":"simulation"},"payment_capability":{"const":false},"effective_status":{"type":"string"}}}}},"paths":{"/api/v1/organizations/{orgId}/audit-exports":{"get":{"tags":["Audit evidence"],"summary":"List immutable audit evidence snapshots.","operationId":"listAuditExports","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Audit evidence export register."}}},"post":{"tags":["Audit evidence"],"summary":"Create a bounded audit evidence snapshot and scoped auditor token.","operationId":"createAuditExport","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Immutable evidence package and one-time auditor token."},"413":{"description":"Range contains more than 500 events."}}}},"/api/v1/organizations/{orgId}/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook destinations and delivery counts.","operationId":"listWebhooks","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook configuration summary."}}},"post":{"tags":["Webhooks"],"summary":"Create a pending HTTPS webhook destination.","operationId":"createWebhook","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Pending destination and one-time signing secret."},"400":{"description":"Unsafe or invalid destination."}}}},"/api/v1/organizations/{orgId}/approvals":{"get":{"tags":["Approvals"],"summary":"List retained human approval cases for an organization.","operationId":"listHumanApprovals","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Role-scoped approval register."},"403":{"description":"Owner or administrator role required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/organizations/{orgId}/approvals/{approvalId}":{"get":{"tags":["Approvals"],"summary":"Read one retained approval case and its immutable timeline.","operationId":"getHumanApproval","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Approval case and event timeline."},"404":{"description":"Approval not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/agent-gateway/whoami":{"get":{"tags":["Machine identity"],"summary":"Authenticate a registered agent's signed machine identity.","description":"The timestamp must be within five minutes and the nonce must be unique. This read-only route grants no autonomous, payment, or credit authority.","operationId":"getAgentGatewayIdentity","security":[{"agentIdHeader":[],"agentKeyHeader":[],"agentTimestampHeader":[],"agentNonceHeader":[],"agentSignatureHeader":[]}],"responses":{"200":{"description":"Authenticated machine identity and explicit capability boundary."},"401":{"description":"Missing, expired, revoked, stale, or invalid signed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request nonce was already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/agents/{publicAgentId}/verification":{"get":{"tags":["Verification"],"summary":"Read owner-published verification projection. Private/foreign/revoked agents return 404.","operationId":"getAgentsPublicagentidVerification","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["verification"],"properties":{"verification":{"$ref":"#/components/schemas/Verification"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"verificationKey":[]}],"parameters":[{"name":"publicAgentId","in":"path","required":true,"schema":{"type":"string","pattern":"^AR-[0-9]{6,}$"}}]}},"/api/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Create human session; Set-Cookie carries atn_session.","operationId":"postAuthLogin","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"additionalProperties":false,"required":["email","password"]}}}}}},"/api/v1/me":{"get":{"tags":["Authentication"],"summary":"Read current human account and organization memberships.","operationId":"getMe","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}]}},"/api/v1/organizations/{orgId}/agents":{"get":{"tags":["Agents"],"summary":"List all agent records in an organization.","operationId":"getOrganizationsOrgidAgents","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Agents"],"summary":"Create organization-owned agent record; owner, admin or manager.","operationId":"postOrganizationsOrgidAgents","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["agent"],"properties":{"agent":{"$ref":"#/components/schemas/Agent"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":2000}},"additionalProperties":false,"required":["name"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/passport":{"get":{"tags":["Verification"],"summary":"Read private passport and preview hash for explicit owner publication.","operationId":"getOrganizationsOrgidAgentsAgentidPassport","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/passport/publication":{"post":{"tags":["Verification"],"summary":"Owner selects public fields and confirms the permanent Agent ID and current preview hash.","operationId":"postOrganizationsOrgidAgentsAgentidPassportPublication","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["name","description","public_agent_id","status","platform_identity","organization_name","trust_score"]}},"confirmAgentId":{"type":"string"},"preview_hash":{"type":"string"}},"additionalProperties":false,"required":["fields","confirmAgentId","preview_hash"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/simulation":{"get":{"tags":["Simulation"],"summary":"List at most 100 recent simulated operations, ledger entries and their event history.","operationId":"getOrganizationsOrgidAgentsAgentidSimulation","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/simulation/funding":{"post":{"tags":["Simulation"],"summary":"Owner adds bounded play money; does not deposit real funds.","operationId":"postOrganizationsOrgidAgentsAgentidSimulationFunding","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"$ref":"#/components/schemas/SimulationOperation"},"replayed":{"type":"boolean"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","CAD"]},"amount_minor":{"type":"integer","minimum":1,"maximum":1000000000},"idempotency_key":{"type":"string","minLength":8,"maxLength":100,"pattern":"^[-a-zA-Z0-9_:]{8,100}$"}},"additionalProperties":false,"required":["currency","amount_minor","idempotency_key"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/simulation/requests":{"post":{"tags":["Simulation"],"summary":"Create a simulated transaction that settles, declines or enters owner review.","operationId":"postOrganizationsOrgidAgentsAgentidSimulationRequests","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"$ref":"#/components/schemas/SimulationOperation"},"replayed":{"type":"boolean"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","CAD"]},"amount_minor":{"type":"integer","minimum":1,"maximum":1000000000},"idempotency_key":{"type":"string","minLength":8,"maxLength":100,"pattern":"^[-a-zA-Z0-9_:]{8,100}$"},"merchant_id":{"type":"string","minLength":1,"maxLength":80},"category":{"type":"string","minLength":1,"maxLength":80}},"additionalProperties":false,"required":["currency","amount_minor","idempotency_key","merchant_id","category"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/simulation/requests/{operationId}/decision":{"post":{"tags":["Simulation"],"summary":"Owner approves, declines or cancels a pending request; policies are rechecked on approval.","operationId":"postOrganizationsOrgidAgentsAgentidSimulationRequestsOperationidDecision","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","decline","cancel","expire"]}},"additionalProperties":false,"required":["action"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}},{"name":"operationId","in":"path","required":true,"description":"Simulation operation UUID from a request.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/trust":{"get":{"tags":["Trust"],"summary":"Calculate current private simulation evidence without saving.","operationId":"getOrganizationsOrgidAgentsAgentidTrust","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/trust/assessments":{"get":{"tags":["Trust"],"summary":"List immutable saved historical assessments.","operationId":"getOrganizationsOrgidAgentsAgentidTrustAssessments","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Trust"],"summary":"Save current server-computed assessment; owner, admin or owning manager.","operationId":"postOrganizationsOrgidAgentsAgentidTrustAssessments","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"description":"Internal agent UUID from agent creation.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/merchant-policy":{"get":{"tags":["Merchants"],"summary":"Read versioned registered-merchant policy.","operationId":"getOrganizationsOrgidMerchant-Policy","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]},"put":{"tags":["Merchants"],"summary":"Owner sets registered-merchant requirement with expected version.","operationId":"putOrganizationsOrgidMerchant-Policy","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"require_registered_merchants":{"type":"boolean"},"expected_version":{"type":"integer","minimum":0}},"additionalProperties":false,"required":["require_registered_merchants","expected_version"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/merchants":{"get":{"tags":["Merchants"],"summary":"List tenant-scoped simulated merchant records and registry policy.","operationId":"getOrganizationsOrgidMerchants","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Merchants"],"summary":"Create an unverified simulated merchant; owner or admin.","operationId":"postOrganizationsOrgidMerchants","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":2000},"category":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{1,63}$"},"min_trust_score":{"type":["integer","null"],"minimum":0,"maximum":60},"max_transaction_minor":{"type":"integer","minimum":1,"maximum":1000000000},"required_scopes":{"type":"array","items":{"type":"string","enum":["api.read","data.market","research.purchase","payment.execute"]}},"require_verified_identity":{"type":"boolean"},"payment_options":{"type":"array","minItems":1,"items":{"type":"string","enum":["simulated_usd","simulated_cad"]}}},"additionalProperties":false,"required":["name","description","category"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/payment-providers":{"get":{"tags":["Simulation"],"summary":"Read the active play-money provider and unavailable future slots; real payments disabled.","operationId":"getOrganizationPaymentProviders","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Server-controlled provider inventory","content":{"application/json":{"schema":{"type":"object","required":["active","future_slots","selection","client_provider_selection","real_payments_enabled","note"],"properties":{"active":{"type":"object","required":["id","mode","status","currencies","real_payment_capability"],"properties":{"id":{"const":"simulated_ledger_v1"},"mode":{"const":"simulation"},"status":{"const":"simulation_only"},"currencies":{"type":"array","items":{"type":"string","enum":["USD","CAD"]}},"real_payment_capability":{"const":false}}},"future_slots":{"type":"array","items":{"type":"object","required":["id","status","enabled","real_payment_capability"],"properties":{"id":{"type":"string","enum":["fiat","stablecoin","usdc","cadc","external_wallet"]},"status":{"const":"not_implemented"},"enabled":{"const":false},"real_payment_capability":{"const":false}}}},"selection":{"const":"server_controlled"},"client_provider_selection":{"const":false},"real_payments_enabled":{"const":false},"note":{"type":"string"}}}}}},"401":{"description":"Sign in required"},"404":{"description":"Organization unavailable"},"405":{"description":"Read-only route"}}}},"/api/v1/organizations/{orgId}/trust-api-keys":{"get":{"tags":["Authentication"],"summary":"List owner-managed verification key summaries; secrets are never returned.","operationId":"getOrganizationsOrgidTrust-Api-Keys","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Authentication"],"summary":"Create a 90-day, read-only verification key. Secret shown once.","operationId":"postOrganizationsOrgidTrust-Api-Keys","responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["key","token","notice"],"properties":{"key":{"type":"object"},"token":{"type":"string","description":"Copy once and store securely."},"notice":{"type":"string"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100}},"additionalProperties":false,"required":["name"]}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/trust-api-keys/{keyId}":{"delete":{"tags":["Authentication"],"summary":"Permanently revoke a verification key.","operationId":"deleteOrganizationsOrgidTrust-Api-KeysKeyid","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable or undisclosed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"humanSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"name":"orgId","in":"path","required":true,"description":"Organization UUID from the authenticated session.","schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"description":"Key ID from creation or listing.","schema":{"type":"string","format":"uuid"}}]}},"/api/v1/organizations/{orgId}/agents/{agentId}/credit":{"get":{"tags":["Digital credit sandbox"],"summary":"Read separate simulated credit accounts and event history","description":"Member-only. No real lending, funds, underwriting, or credit rating. Cursor paginates up to 50 immutable events.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,10}$"}}],"responses":{"200":{"description":"Sandbox accounts, utilization, history, and next_cursor"},"401":{"description":"Sign in required"},"404":{"description":"Organization or agent not found"}}}},"/api/v1/organizations/{orgId}/agents/{agentId}/credit/{currency}/events":{"post":{"tags":["Digital credit sandbox"],"summary":"Record an owner-controlled simulated credit event","description":"Active owner, organization, and agent required. Draw and repayment change only sandbox outstanding amount; no funds move.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"currency","in":"path","required":true,"schema":{"type":"string","enum":["USD","CAD"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action","amount_minor","expected_version","idempotency_key"],"properties":{"action":{"type":"string","enum":["limit_set","draw","repayment"]},"amount_minor":{"type":"integer","minimum":0,"maximum":1000000000},"expected_version":{"type":"integer","minimum":0},"idempotency_key":{"type":"string","minLength":8,"maxLength":100}}}}}},"responses":{"200":{"description":"Idempotent replay"},"201":{"description":"Event recorded with updated sandbox account"},"400":{"description":"Invalid action or amount"},"403":{"description":"Owner role required"},"409":{"description":"Stale version, limit conflict, or key reuse"}}}},"/api/v1/organizations/{orgId}/dashboard/actions":{"get":{"tags":["Operations"],"summary":"List role-aware organization actions","description":"Returns current work the signed-in member can perform, derived from durable simulation, commerce, network, security, and agent-control records. Sensitive evidence is excluded.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Role-aware action queue and priority counts"},"400":{"description":"Query parameters are not accepted"},"401":{"description":"Sign in required"},"404":{"description":"Organization not found"},"405":{"description":"Read only"}}}},"/api/v1/organizations/{orgId}/reputation":{"get":{"tags":["Reputation"],"summary":"List internal reputation attestations and aggregates","description":"Private organization feedback tied to delivered simulated commerce. Reputation does not affect Trust Scores, credit, payments, or authorization.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Immutable attestations and provider aggregates"},"401":{"description":"Sign in required"},"404":{"description":"Organization not found"}}}},"/api/v1/organizations/{orgId}/reputation/attestations":{"post":{"tags":["Reputation"],"summary":"Rate a delivered simulated service","description":"Creates one immutable internal attestation for a delivered commerce order.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["order_id","rating","tags","comment"],"properties":{"order_id":{"type":"string","format":"uuid"},"rating":{"type":"integer","minimum":1,"maximum":5},"tags":{"type":"array","uniqueItems":true,"maxItems":6,"items":{"type":"string","enum":["high_quality","on_time","clear_communication","accurate","good_value","needs_improvement"]}},"comment":{"type":"string","maxLength":1000}}}}}},"responses":{"201":{"description":"Attestation recorded"},"400":{"description":"Invalid feedback"},"403":{"description":"Requester agent management role required"},"404":{"description":"Order or organization not found"},"409":{"description":"Order is not delivered or is already rated"}}}},"/api/v1/organizations/{orgId}/commerce":{"get":{"tags":["Simulation"],"summary":"List same-organization simulated service orders","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Orders and immutable event history"},"401":{"description":"Sign in required"},"404":{"description":"Organization not found"}}},"post":{"tags":["Simulation"],"summary":"Request a service from another agent","description":"Creates a human-controlled, same-organization sandbox order. No autonomous execution or real payment.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["requester_agent_id","provider_agent_id","service","category","currency"],"properties":{"requester_agent_id":{"type":"string","format":"uuid"},"provider_agent_id":{"type":"string","format":"uuid"},"service":{"type":"string","maxLength":500},"category":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{1,63}$"},"currency":{"type":"string","enum":["USD","CAD"]}}}}}},"responses":{"201":{"description":"Service request created"},"400":{"description":"Invalid request"},"403":{"description":"Agent management role required"},"409":{"description":"Inactive organization or agent"}}}},"/api/v1/organizations/{orgId}/commerce/{orderId}/{action}":{"post":{"tags":["Simulation"],"summary":"Advance a simulated service order","description":"Quote, authorize, deliver, or cancel. Authorization rechecks identity, permission, spending, usage, risk evidence, and play-money balance before an atomic two-sided ledger entry.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","enum":["quote","authorize","deliver","cancel"]}}],"responses":{"200":{"description":"Order transition recorded"},"400":{"description":"Invalid transition input"},"403":{"description":"Agent management role required"},"409":{"description":"Stale version or lifecycle conflict"}}}},"/api/v1/organizations/{orgId}/security":{"get":{"tags":["Trust"],"summary":"Read internal security monitors and alerts","description":"Human-submitted internal evidence only. No automated scanner or external feed is connected.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Monitors, alerts, target types, and evidence boundary"},"404":{"description":"Organization not found"}}}},"/api/v1/organizations/{orgId}/security/alerts":{"post":{"tags":["Trust"],"summary":"Record an internal security alert","description":"Agent-attributed alerts feed future Trust evidence with a bounded severity deduction; they do not authorize actions.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Alert recorded"},"400":{"description":"Invalid alert"},"403":{"description":"Contributor role required"},"409":{"description":"Organization suspended"}}}},"/api/v1/organizations/{orgId}/network":{"get":{"tags":["Verification"],"summary":"Read the opt-in organization directory and partner connections","description":"Directory profiles expose only organization name, description, and selected capability labels. Connections grant no private access.","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Profile, opt-in directory, and connection history"},"404":{"description":"Organization not found"}}}},"/api/v1/organizations/{orgId}/network/profile":{"put":{"tags":["Verification"],"summary":"Publish or update an organization network profile","security":[{"humanSession":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Network profile saved"},"403":{"description":"Owner or admin required"},"409":{"description":"Stale version or suspended organization"}}}},"/api/v1/public/simulation":{"post":{"summary":"Evaluate a stateless synthetic purchase","tags":["Simulation"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent","merchant","amount","policy","synthetic_usage"],"additionalProperties":false}}}},"responses":{"200":{"description":"Explainable non-persistent simulation decision"},"400":{"description":"Invalid bounded input"},"429":{"description":"Rate limit exceeded"}}}},"/api/v1/organizations/{organizationId}/escrow-observations/loans/{loanId}/deployments/{deploymentId}":{"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Audit evidence"],"security":[{"humanSession":[]}],"summary":"List the latest 20 observations for the selected escrow deployment","responses":{"200":{"description":"Retained observations in newest-first order"},"403":{"description":"Owner or administrator required"},"404":{"description":"Organization, loan or deployment unavailable"}}}},"/api/v1/organizations/{organizationId}/escrow-observations/loans/{loanId}/deployments/{deploymentId}/check":{"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"tags":["Audit evidence"],"security":[{"humanSession":[]}],"summary":"Check the selected escrow against its recorded terms","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"200":{"description":"Consistent or mismatched observation and next action"},"400":{"description":"Send an empty JSON object"},"403":{"description":"Active organization owner required"},"404":{"description":"Organization, loan or deployment unavailable"},"409":{"description":"Deployment unconfirmed or evidence conflicts with an existing observation"},"428":{"description":"Recent administrative authentication required"},"503":{"description":"RPC unavailable or returned an inconsistent chain view. Retry the check."}}}},"/api/v1/organizations/{organizationId}/agents/{agentId}/testnet-loans":{"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Audit evidence"],"security":[{"humanSession":[]}],"summary":"Read a private agent's Base Sepolia test-loan activity","description":"Returns stored escrow observations and historical receipts for this agent. Each current drawn loan includes verified_withdrawn_atomic when the lender's cumulative withdrawal is known. Aggregate amounts are decimal strings in millionths of test USDC. Null means a total cannot be established.","responses":{"200":{"description":"Agent, loan count, current coverage, verified amounts and per-agreement evidence"},"401":{"description":"Signed-in session required"},"403":{"description":"Owner or administrator required"},"404":{"description":"Organization or agent unavailable"}}}},"/api/v1/organizations/{organizationId}/escrow-accounting/loans/{loanId}/deployments/{deploymentId}":{"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Audit evidence"],"security":[{"humanSession":[]}],"summary":"Check the confirmed balance of one Base Sepolia escrow","description":"Refreshes a due escrow when it can be attributed to the loan. If confirmed loans in the organization share the contract on the same network, status is shared_deployment and balances, last_observation and latest_verified_activity are null. Balances are present only for a current reading. Once a balance check covers a verified receipt's height, latest_verified_activity requires matching block evidence. After a detected replacement of a saved balance block, that evidence must come from a current reading. Receipt history retains earlier checks.","responses":{"200":{"description":"Confirmed deployment, observation time, freshness, status and available testnet balances"},"401":{"description":"Signed-in session required"},"403":{"description":"Owner or administrator required"},"404":{"description":"Confirmed deployment unavailable"}}}},"/api/v1/organizations/{organizationId}/escrow-accounting/loans/{loanId}/deployments/{deploymentId}/closeout":{"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Audit evidence"],"security":[{"humanSession":[]}],"summary":"Verify and export a completed testnet loan","description":"Checks the escrow counters and the recorded transfers against the confirmed Base Sepolia chain. A ready receipt lists funding, drawdown, repayments and lender withdrawals in chain order.","responses":{"200":{"description":"Receipt available or a reason it could not be issued","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["status","receipt"],"properties":{"status":{"const":"ready"},"receipt":{"$ref":"#/components/schemas/EscrowCloseoutReceipt"}}},{"type":"object","required":["status","reason"],"properties":{"status":{"const":"unavailable"},"reason":{"type":"string"}}}]}}}},"401":{"description":"Signed-in session required"},"403":{"description":"Owner or administrator required"},"404":{"description":"Organization, loan or confirmed deployment unavailable"}}}},"/api/v1/organizations/{organizationId}/escrow-receipts/loans/{loanId}/deployments/{deploymentId}":{"get":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Read the latest 20 historical testnet escrow receipt checks","description":"Organization owners and administrators only. Results do not establish current balances or production settlement.","responses":{"200":{"description":"Retained checks, network and explicit simulation boundary"},"403":{"description":"Owner or administrator required"},"404":{"description":"Organization or loan not found"}}}},"/api/v1/organizations/{organizationId}/escrow-receipts/loans/{loanId}/deployments/{deploymentId}/verify":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Verify a historical Base Sepolia escrow transaction","description":"Active owner and recent password/passkey step-up required. Reads the fixed Base Sepolia RPC; never signs or submits a transaction. A successful HTTP response can report verified, pending or rejected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action","transaction_hash"],"properties":{"action":{"type":"string","enum":["funding","drawdown","repayment","withdrawal"]},"transaction_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}}}}},"responses":{"200":{"description":"Immutable check with result, reason, canonical block provenance, amount when verified, evidence hash and ledger_changed false"},"400":{"description":"Invalid action, transaction hash or extra fields"},"403":{"description":"Active owner required"},"404":{"description":"Organization or loan not found"},"409":{"description":"Confirmed escrow deployment required or concurrent state change"},"428":{"description":"Recent administrative authentication required"},"503":{"description":"RPC unavailable, wrong network, or a numbered block changed during verification. Retry the check on a stable Base Sepolia node."}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}":{"get":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"List guided escrow actions and ordered steps","responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}},"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Prepare an expiring human-signed Base Sepolia escrow plan","description":"Active preparing owner and recent password/passkey step-up. The server derives exact wallets, destinations, amounts and bounded token allowances. No server signing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action","amount_atomic","request_key"],"properties":{"action":{"type":"string","enum":["funding","drawdown","repayment","withdrawal"]},"amount_atomic":{"type":["string","null"],"description":"Positive integer string only for repayment, otherwise null"},"request_key":{"type":"string","minLength":8,"maxLength":100}}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"201":{"description":"Prepared immutable plan and ordered wallet steps"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/preflight":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Recheck and simulate the next reviewed wallet step","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/submitted":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Record the exact known wallet transaction hash","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["step_id","transaction_hash","wallet_address","chain_id"],"properties":{"step_id":{"type":"string","format":"uuid"},"transaction_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"wallet_address":{"type":"string"},"chain_id":{"type":"string","const":"0x14a34"}}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/confirm":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Verify the submitted allowance or escrow receipt","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/reject":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Record an unsigned wallet decline","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["step_id","wallet_error_code"],"properties":{"step_id":{"type":"string","format":"uuid"},"wallet_error_code":{"type":"integer","const":4001}}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/uncertain":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Hold an ambiguous wallet submission without resending","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["step_id"],"properties":{"step_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/release":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Retain an owner or client statement releasing an unsigned wallet review","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["step_id","acknowledgement"],"properties":{"step_id":{"type":"string","format":"uuid"},"acknowledgement":{"type":"string","enum":["wallet_activity_checked_no_transaction","client_failed_before_submission"]}}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}},"/api/v1/organizations/{organizationId}/escrow-actions/loans/{loanId}/deployments/{deploymentId}/requests/{requestId}/cancel":{"post":{"security":[{"humanSession":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"loanId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"tags":["Audit evidence"],"summary":"Cancel an unsigned remainder without pending wallet activity","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}},"responses":{"200":{"description":"Scoped action state; real_funds_enabled false and ledger_changed false"},"202":{"description":"Receipt is pending or needs more confirmations"},"400":{"description":"Invalid exact input"},"403":{"description":"Required owner or administrator access missing"},"404":{"description":"Organization, loan or exact escrow not found"},"409":{"description":"State, plan, wallet role, reviewed amount or concurrent revision changed"},"423":{"description":"Escrow pause or financial shutdown blocks signing"},"428":{"description":"Recent password/passkey verification required for preparation, preflight or review release"},"503":{"description":"Testnet RPC unavailable, stale or wrong chain"}}}}}}