{"openapi":"3.1.0","info":{"title":"Conto API","description":"Agentic payments control center - API for managing AI agent transactions, policies, and wallets. Conto provides programmatic controls for AI agents to make onchain payments with policy guardrails, spend limits, and approval workflows.","version":"1.1.0","contact":{"name":"Conto Support","url":"https://conto.finance","email":"support@conto.finance"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://conto.finance","description":"Production"},{"url":"http://localhost:3006","description":"Development"}],"tags":[{"name":"Authentication","description":"User registration and authentication"},{"name":"Agents","description":"AI agent management"},{"name":"Wallets","description":"Wallet management, provisioning, and funding"},{"name":"Policies","description":"Spending policy configuration and rules"},{"name":"Transactions","description":"Transaction history and management"},{"name":"SDK Payments","description":"SDK endpoints for agent payment flow (request, execute, status)"},{"name":"SDK Agent","description":"SDK endpoints for agent self-service"},{"name":"SDK Wallets","description":"SDK endpoints for agent wallet access"},{"name":"SDK Transactions","description":"SDK endpoints for agent transaction history"},{"name":"SDK Policies","description":"SDK endpoints for agent policy inspection"},{"name":"Counterparties","description":"Counterparty management and trust"},{"name":"API Keys","description":"Organization API key management"},{"name":"Alerts","description":"Alert management"},{"name":"x402","description":"x402 protocol pre-authorization, recording, and analytics"},{"name":"mpp","description":"Machine Payment Protocol pre-authorization, recording, and analytics"},{"name":"SDK A2A Payments","description":"Agent-to-agent payment requests and resolution"},{"name":"SDK Cards","description":"Card payment approval and confirmation (BYOC flow)"},{"name":"SDK Counterparties","description":"SDK endpoints for counterparty and network trust management"},{"name":"SDK Alerts & Analytics","description":"SDK endpoints for alerts, analytics, audit logs, approval requests, spending limits, and rate limits"}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"NextAuth session cookie (browser login)"},"orgApiKey":{"type":"http","scheme":"bearer","description":"Organization API key. Format: Bearer conto_xxx. Supports scoped permissions (agents:read, wallets:write, etc)."},"sdkKeyAuth":{"type":"http","scheme":"bearer","description":"Agent SDK key for payment operations. Format: Bearer conto_agent_xxx. Generated per-agent."}},"schemas":{"RegisterResponse":{"type":"object","properties":{"message":{"type":"string"},"requiresEmailVerification":{"type":"boolean","description":"Whether the user must verify their email before receiving privileged access."},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}},"required":["message","requiresEmailVerification","user","organization"]},"RegisterRequest":{"type":"object","properties":{"name":{"type":"string","description":"User full name"},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":12,"description":"Must contain uppercase, lowercase, number, and special character"},"organizationName":{"type":"string","description":"Organization name"}},"required":["name","email","password","organizationName"]},"AgentType":{"type":"string","enum":["OPENAI_ASSISTANT","ANTHROPIC_CLAUDE","LANGCHAIN","AUTOGPT","CUSTOM"]},"AgentEnvironment":{"type":"string","enum":["DEV","STAGING","PROD"]},"AgentRiskTier":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"AgentStatus":{"type":"string","enum":["ACTIVE","PAUSED","SUSPENDED","REVOKED"]},"AgentAttestationMode":{"type":"string","enum":["KEY_ONLY","SIGNED_REQUEST","SIGNED_REQUEST_WITH_CONTEXT"]},"Agent":{"type":"object","properties":{"id":{"type":"string","description":"CUID"},"name":{"type":"string"},"description":{"type":["string","null"]},"agentIdSlug":{"type":["string","null"]},"purpose":{"type":["string","null"]},"agentType":{"$ref":"#/components/schemas/AgentType"},"environment":{"$ref":"#/components/schemas/AgentEnvironment"},"riskTier":{"$ref":"#/components/schemas/AgentRiskTier"},"status":{"$ref":"#/components/schemas/AgentStatus"},"publicKey":{"type":["string","null"]},"externalId":{"type":["string","null"]},"attestationMode":{"$ref":"#/components/schemas/AgentAttestationMode"},"identityTags":{"type":"array","items":{"type":"string"}},"ownerMembershipId":{"type":["string","null"]},"owner":{"type":["object","null"],"properties":{"membershipId":{"type":"string"},"role":{"type":"string"},"userId":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["membershipId","role"]},"identityIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"severity":{"type":"string","enum":["critical","warning"]}},"required":["code","label","description","severity"]}},"requiresIdentityReview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","agentType","environment","riskTier","status","attestationMode","createdAt","updatedAt"]},"AgentListResponse":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["agents","total","limit","offset"]},"AgentIdSlug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Stable slug used for agent identity and policy targeting"},"CreateAgentRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Agent name","example":"Customer Support Agent"},"description":{"type":"string","maxLength":500,"description":"Agent description"},"agentType":{"allOf":[{"$ref":"#/components/schemas/AgentType"},{"description":"Agent framework type. Use CUSTOM for generic agents."}]},"publicKey":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional Ethereum address for verification. Auto-generated if not provided.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2e3a1"},"agentIdSlug":{"$ref":"#/components/schemas/AgentIdSlug"},"purpose":{"type":"string","maxLength":200,"description":"Short summary of what the agent is responsible for"},"externalId":{"type":"string","maxLength":100,"description":"External reference ID from your system"},"environment":{"allOf":[{"$ref":"#/components/schemas/AgentEnvironment"},{"default":"DEV","description":"Environment this agent belongs to"}]},"riskTier":{"allOf":[{"$ref":"#/components/schemas/AgentRiskTier"},{"default":"MEDIUM","description":"Internal risk classification for the agent"}]},"ownerMembershipId":{"type":"string","description":"Organization member responsible for this agent. Required for programmatic org API key creation; browser-session requests can default to the current member."},"attestationMode":{"allOf":[{"$ref":"#/components/schemas/AgentAttestationMode"},{"default":"KEY_ONLY","description":"How strongly requests from this agent must be attested"}]},"identityTags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20,"description":"Optional labels used for policy targeting and search"},"allowedContexts":{"type":"array","items":{"type":"string"},"description":"Optional list of allowed execution contexts"}},"required":["name","agentType"]},"BulkRemediateAgentsRequest":{"type":"object","properties":{"action":{"type":"string","enum":["assign_owner","backfill_agent_ids","backfill_purpose_from_description"]},"agentIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"ownerMembershipId":{"type":"string"}},"required":["action","agentIds"]},"DelegationType":{"type":"string","enum":["FULL","LIMITED","VIEW_ONLY","PREAPPROVED","ALLOWLIST"]},"WalletType":{"type":"string","enum":["EOA","SMART_WALLET","MULTISIG"]},"ChainType":{"type":"string","enum":["EVM","SOLANA"]},"CustodyType":{"type":"string","enum":["SPONGE","PRIVY","EXTERNAL","SMART_CONTRACT"]},"WalletStatus":{"type":"string","enum":["ACTIVE","FROZEN","CLOSED","ARCHIVED"]},"Wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"walletType":{"$ref":"#/components/schemas/WalletType"},"chainType":{"$ref":"#/components/schemas/ChainType"},"chainId":{"type":["string","null"]},"custodyType":{"$ref":"#/components/schemas/CustodyType"},"externalWalletId":{"type":["string","null"]},"usdcBalance":{"type":"number"},"status":{"$ref":"#/components/schemas/WalletStatus"},"isWatchOnly":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","walletType","chainType","custodyType","usdcBalance","status","isWatchOnly","createdAt"]},"AgentWallet":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"walletId":{"type":"string"},"delegationType":{"$ref":"#/components/schemas/DelegationType"},"spendLimitPerTx":{"type":["number","null"]},"spendLimitDaily":{"type":["number","null"]},"spendLimitWeekly":{"type":["number","null"]},"spendLimitMonthly":{"type":["number","null"]},"spentToday":{"type":"number"},"spentThisWeek":{"type":"number"},"spentThisMonth":{"type":"number"},"allowedHoursStart":{"type":"integer","minimum":0,"maximum":23},"allowedHoursEnd":{"type":"integer","minimum":1,"maximum":24},"allowedDays":{"type":"string","description":"JSON-encoded array of day names, e.g. [\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\"]"},"isActive":{"type":"boolean"},"wallet":{"$ref":"#/components/schemas/Wallet"}},"required":["id","agentId","walletId","delegationType","spentToday","spentThisWeek","spentThisMonth","allowedHoursStart","allowedHoursEnd","allowedDays","isActive"]},"AgentDetails":{"allOf":[{"$ref":"#/components/schemas/Agent"},{"type":"object","properties":{"wallets":{"type":"array","items":{"$ref":"#/components/schemas/AgentWallet"}},"policies":{"type":"array","items":{"type":"object","properties":{}}},"_count":{"type":"object","properties":{"sentTransactions":{"type":"integer"}},"required":["sentTransactions"]}},"required":["wallets","policies"]}]},"UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"status":{"$ref":"#/components/schemas/AgentStatus"},"publicKey":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (0x + 40 hex chars)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2e3a1"},"agentIdSlug":{"$ref":"#/components/schemas/AgentIdSlug"},"purpose":{"type":["string","null"],"maxLength":200},"externalId":{"type":"string","maxLength":100},"environment":{"$ref":"#/components/schemas/AgentEnvironment"},"riskTier":{"$ref":"#/components/schemas/AgentRiskTier"},"ownerMembershipId":{"type":["string","null"]},"attestationMode":{"$ref":"#/components/schemas/AgentAttestationMode"},"identityTags":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"allowedContexts":{"type":"array","items":{"type":"string"}}}},"AgentWalletListResponse":{"type":"object","properties":{"wallets":{"type":"array","items":{"$ref":"#/components/schemas/AgentWallet"}}},"required":["wallets"]},"LinkWalletRequest":{"type":"object","properties":{"walletId":{"type":"string","minLength":1,"description":"Wallet ID to link (CUID format)"},"delegationType":{"allOf":[{"$ref":"#/components/schemas/DelegationType"},{"default":"LIMITED","description":"Delegation type"}]},"spendLimitPerTx":{"type":"number","minimum":0,"default":100,"description":"Per-transaction spend limit"},"spendLimitDaily":{"type":"number","minimum":0,"default":1000,"description":"Daily spend limit"},"spendLimitWeekly":{"type":"number","minimum":0,"description":"Weekly spend limit"},"spendLimitMonthly":{"type":"number","minimum":0,"description":"Monthly spend limit"},"allowedHoursStart":{"type":"integer","minimum":0,"maximum":23,"default":0,"description":"Start hour (0-23). 0 = midnight."},"allowedHoursEnd":{"type":"integer","minimum":1,"maximum":24,"default":24,"description":"End hour (1-24). 24 = end of day."},"allowedDays":{"type":"array","items":{"type":"string"},"default":["Mon","Tue","Wed","Thu","Fri"],"description":"Days of the week the agent can transact."}},"required":["walletId"]},"UpdateAgentWalletRequest":{"type":"object","properties":{"delegationType":{"$ref":"#/components/schemas/DelegationType"},"spendLimitPerTx":{"type":"number","minimum":0},"spendLimitDaily":{"type":"number","minimum":0},"spendLimitWeekly":{"type":"number","minimum":0},"spendLimitMonthly":{"type":"number","minimum":0},"allowedHoursStart":{"type":"integer","minimum":0,"maximum":23},"allowedHoursEnd":{"type":"integer","minimum":1,"maximum":24},"allowedDays":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}}},"SdkKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","description":"Full SDK key (conto_agent_xxx). Shown only once."},"keyType":{"type":"string","enum":["standard","admin"]},"message":{"type":"string","description":"Human-readable reminder that the full key is only returned once."}},"required":["id","name","key","keyType","message"]},"CreateSdkKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Human-readable key name"},"expiresInDays":{"type":"number","exclusiveMinimum":0,"maximum":730,"description":"Key lifetime in days. Defaults to 365 and cannot exceed 730."},"keyType":{"type":"string","enum":["standard","admin"],"default":"standard","description":"SDK key type. Standard keys use Conto’s default least-privilege agent preset. Admin keys add delegated org-management scopes for agents, wallets, and policies."}},"required":["name"]},"WalletListResponse":{"type":"object","properties":{"wallets":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}},"required":["wallets"]},"CreateWalletRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"walletType":{"allOf":[{"$ref":"#/components/schemas/WalletType"},{"default":"EOA"}]},"chainType":{"allOf":[{"$ref":"#/components/schemas/ChainType"},{"default":"EVM"}]},"chainId":{"type":"string","description":"Chain identifier (e.g. \"42431\" for Tempo, \"8453\" for Base)"},"custodyType":{"allOf":[{"$ref":"#/components/schemas/CustodyType"},{"default":"PRIVY","description":"Custody provider. PRIVY is recommended for enterprise-grade security."}]},"address":{"type":"string","description":"Attach an existing wallet address instead of minting a new one. For PRIVY custody, pair this with externalWalletId."},"externalWalletId":{"type":"string","description":"Existing provider wallet ID. For PRIVY custody, Conto reuses this wallet instead of creating a new one."},"importAddress":{"type":"string","description":"Import an existing wallet address instead of generating a new one"},"isWatchOnly":{"type":"boolean","default":false,"description":"Watch-only wallets cannot send transactions"}},"required":["name"]},"ProvisionResponse":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Wallet"},"provisioned":{"type":"boolean"},"chain":{"type":"object","properties":{"name":{"type":"string"},"chainId":{"type":"string"},"explorer":{"type":"string"}},"required":["name","chainId","explorer"]}},"required":["wallet","provisioned","chain"]},"RuleType":{"type":"string","enum":["MAX_AMOUNT","DAILY_LIMIT","WEEKLY_LIMIT","MONTHLY_LIMIT","ALLOWED_CATEGORIES","BLOCKED_CATEGORIES","ALLOWED_COUNTERPARTIES","BLOCKED_COUNTERPARTIES","TIME_WINDOW","DAY_OF_WEEK","VELOCITY_LIMIT","REQUIRE_APPROVAL_ABOVE","GEOGRAPHIC_RESTRICTION","AGENT_ENVIRONMENT","TRUST_SCORE","COUNTERPARTY_STATUS","COUNTERPARTY_APPROVAL_STATUS","BUDGET_CAP","DATE_RANGE","CONTRACT_ALLOWLIST","ALLOWED_CONTRACTS","PROTOCOL_ALLOWLIST","BLACKOUT_PERIOD","MAINTENANCE_WINDOW","BLOCKED_TIME_WINDOW","X402_MAX_PER_REQUEST","X402_PRICE_CEILING","X402_MAX_PER_ENDPOINT","X402_MAX_PER_SERVICE","X402_ALLOWED_SERVICES","X402_BLOCKED_SERVICES","X402_ALLOWED_FACILITATORS","X402_VELOCITY_PER_ENDPOINT","X402_SESSION_BUDGET"]},"RuleOperator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","GTE","LTE","IN","NOT_IN","IN_LIST","NOT_IN_LIST","BETWEEN","NOT_BETWEEN","DENY"]},"RuleAction":{"type":"string","enum":["ALLOW","DENY","REQUIRE_APPROVAL"]},"PolicyRuleResponse":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"ruleType":{"$ref":"#/components/schemas/RuleType"},"operator":{"$ref":"#/components/schemas/RuleOperator"},"value":{"type":"string","description":"JSON-encoded rule value"},"action":{"$ref":"#/components/schemas/RuleAction"}},"required":["id","policyId","ruleType","operator","value","action"]},"Policy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"policyType":{"type":"string"},"priority":{"type":"integer"},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","policyType","priority","isActive","createdAt","updatedAt"]},"PolicyWithRules":{"allOf":[{"$ref":"#/components/schemas/Policy"},{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/PolicyRuleResponse"}}},"required":["rules"]}]},"PolicyListResponse":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/PolicyWithRules"}}},"required":["policies"]},"PolicyType":{"type":"string","enum":["SPEND_LIMIT","TIME_WINDOW","MERCHANT","CATEGORY","VELOCITY","GEOGRAPHIC","APPROVAL_THRESHOLD","AGENT_IDENTITY","COUNTERPARTY","COUNTERPARTY_IDENTITY","BUDGET_ALLOCATION","WHITELIST","EXPIRATION","COMPOSITE","CONTRACT_ALLOWLIST","BLACKOUT_PERIOD"]},"CreatePolicyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Policy name"},"description":{"type":"string","maxLength":500,"description":"Policy description"},"policyType":{"$ref":"#/components/schemas/PolicyType"},"priority":{"type":"integer","minimum":0,"maximum":100,"default":50,"description":"Higher priority policies are evaluated first."},"isActive":{"type":"boolean","default":true}},"required":["name","policyType"]},"UpdatePolicyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"priority":{"type":"integer","minimum":0,"maximum":100},"isActive":{"type":"boolean"}}},"CreatePolicyRulesRequest":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/RuleType"},"operator":{"allOf":[{"$ref":"#/components/schemas/RuleOperator"},{"description":"Comparison operator. For spend limits use LTE. Aliases: GREATER_THAN_OR_EQUAL=GTE, LESS_THAN_OR_EQUAL=LTE."}]},"value":{"type":"string","description":"JSON-encoded rule value. For numeric limits: \"500\". For lists: '[\"addr1\",\"addr2\"]'. For time windows: '{\"start\":\"09:00\",\"end\":\"17:00\"}'."},"action":{"allOf":[{"$ref":"#/components/schemas/RuleAction"},{"default":"ALLOW","description":"What to do when the rule matches. ALLOW = permit if condition met. DENY = block if condition met."}]}},"required":["ruleType","operator","value"]},"minItems":1,"maxItems":50}},"required":["rules"]},"PaymentRequestResponse":{"type":"object","properties":{"requestId":{"type":"string","description":"Use this ID to execute or check status"},"status":{"type":"string","enum":["APPROVED","DENIED","REQUIRES_APPROVAL","EXECUTED"]},"idempotent":{"type":"boolean"},"wallet":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"chainId":{"type":"string"},"custodyType":{"type":"string"},"availableBalance":{"type":"number"}},"required":["id","address","availableBalance"]},"expiresAt":{"type":"string","format":"date-time","description":"Approval expires after 5 minutes"},"reasons":{"type":"array","items":{"type":"string"},"description":"Explanation of why the payment was approved/denied"},"currency":{"type":"string"},"sessionId":{"type":["string","null"]},"executeUrl":{"type":"string"},"walletSelectionReason":{"type":"string"},"chain":{"type":"object","properties":{"chainId":{"type":"string"},"chainName":{"type":"string"},"chainType":{"type":"string"},"explorerUrl":{"type":"string"}},"required":["chainId","chainName","chainType"]},"execution":{"type":"object","properties":{"transactionId":{"type":"string"},"txHash":{"type":"string"},"explorerUrl":{"type":"string"},"status":{"type":"string"}},"required":["transactionId","txHash","explorerUrl","status"]},"autoExecuteError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]},"hint":{"type":"string"},"context":{"type":"object","properties":{"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"chainId":{"type":["string","null"]},"custodyType":{"type":["string","null"]},"balance":{"type":"number"}},"required":["id","address","balance"]}},"nextSteps":{"type":"array","items":{"type":"string"}}}},"violations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"limit":{"type":"number"},"current":{"type":"number"},"policyName":{"type":"string"},"source":{"type":"string","enum":["wallet_limit","policy_rule"]}},"required":["type","message"]},"description":"Policy violations (if denied)"}},"required":["requestId","status","reasons"]},"Urgency":{"type":"string","enum":["LOW","NORMAL","HIGH","CRITICAL"],"default":"NORMAL"},"PaymentInvoiceContext":{"type":"object","properties":{"vendorId":{"type":"string","maxLength":255},"vendorAddress":{"type":"string","maxLength":255},"id":{"type":"string","maxLength":255},"hash":{"type":"string","maxLength":255},"sourceUrl":{"type":"string","maxLength":2048},"payload":{},"expectedAmount":{"anyOf":[{"type":"number"},{"type":"string","maxLength":255}]},"currency":{"type":"string","maxLength":50},"dueDate":{"type":"string","maxLength":255}}},"PaymentContext":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/PaymentInvoiceContext"}},"additionalProperties":{}},"PaymentRequest":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount in USDC","example":50},"recipientAddress":{"type":"string","description":"Recipient wallet address (EVM or Solana)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2e3a1"},"recipientName":{"type":"string","maxLength":100,"description":"Human-readable recipient name"},"purpose":{"type":"string","maxLength":500,"description":"Payment reason"},"category":{"type":"string","maxLength":50,"description":"Spend category (e.g. VENDOR, API_PROVIDER, SAAS)"},"urgency":{"$ref":"#/components/schemas/Urgency"},"context":{"$ref":"#/components/schemas/PaymentContext"},"walletId":{"type":"string"},"sessionId":{"type":"string","description":"Session ID for tracking"},"autoExecute":{"type":"boolean","description":"Auto-execute if approved"},"targetContractAddress":{"type":"string","description":"Target contract address for contract allowlist policy checks"},"functionSelector":{"type":"string","description":"4-byte function selector for contract interaction policy checks"},"idempotencyKey":{"type":"string","description":"Client-supplied key for safe retries"}},"required":["amount","recipientAddress"]},"PaymentStatusResponse":{"type":"object","properties":{"requestId":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","DENIED","COMPLETED","EXPIRED"]},"transaction":{"type":["object","null"],"properties":{"txHash":{"type":"string"},"status":{"type":"string"},"confirmedAt":{"type":["string","null"],"format":"date-time"}},"required":["txHash","status"]}},"required":["requestId","status"]},"PaymentExecuteResponse":{"type":"object","properties":{"transactionId":{"type":"string"},"txHash":{"type":"string"},"status":{"type":"string","enum":["CONFIRMING","CONFIRMED","FAILED"]},"amount":{"type":"number"},"recipient":{"type":"string"},"wallet":{"type":"object","properties":{"address":{"type":"string"}},"required":["address"]},"explorerUrl":{"type":"string","description":"Block explorer URL to verify the transaction"}},"required":["transactionId","txHash","status","amount","recipient","wallet"]},"SpendLimitInfo":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"},"remaining":{"type":"number"}},"required":["used","limit","remaining"]},"SdkAgentProfile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","SUSPENDED"]},"agentType":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"summary":{"type":"object","properties":{"totalTransactions":{"type":"integer"},"totalVolume":{"type":"number"},"activeWallets":{"type":"integer"},"pendingAlerts":{"type":"integer"},"spendLimits":{"type":"object","properties":{"daily":{"$ref":"#/components/schemas/SpendLimitInfo"},"weekly":{"$ref":"#/components/schemas/SpendLimitInfo"},"monthly":{"$ref":"#/components/schemas/SpendLimitInfo"}},"required":["daily","weekly","monthly"]}},"required":["totalTransactions","totalVolume","activeWallets","pendingAlerts","spendLimits"]}},"required":["id","name","status","agentType","createdAt","summary"]},"SdkWalletList":{"type":"object","properties":{"agentId":{"type":"string"},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"chain":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED"]},"balance":{"type":"number"},"currency":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","address","chain","status","balance","currency","isDefault","createdAt"]}}},"required":["agentId","wallets"]},"SdkWalletDetails":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"chain":{"type":"string"},"status":{"type":"string"},"balance":{"type":"number"},"currency":{"type":"string"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"limits":{"type":"object","properties":{"perTransaction":{"type":"number"},"daily":{"$ref":"#/components/schemas/SpendLimitInfo"},"weekly":{"$ref":"#/components/schemas/SpendLimitInfo"},"monthly":{"$ref":"#/components/schemas/SpendLimitInfo"}},"required":["perTransaction","daily","weekly","monthly"]},"recentTransactions":{"type":"array","items":{"type":"object","properties":{}}}},"required":["id","name","address","chain","status","balance","currency","isDefault","createdAt"]},"SdkTransaction":{"type":"object","properties":{"id":{"type":"string"},"txHash":{"type":["string","null"]},"amount":{"type":"number"},"currency":{"type":"string"},"fromAddress":{"type":"string"},"toAddress":{"type":"string"},"merchantName":{"type":["string","null"]},"merchantCategory":{"type":["string","null"]},"status":{"type":"string","enum":["PENDING","CONFIRMING","CONFIRMED","FAILED"]},"purpose":{"type":["string","null"]},"initiatedAt":{"type":"string","format":"date-time"},"confirmedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","amount","currency","fromAddress","toAddress","status","initiatedAt"]},"Pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]},"SdkTransactionList":{"type":"object","properties":{"agentId":{"type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SdkTransaction"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["agentId","transactions","pagination"]},"TransactionType":{"type":"string","enum":["A2E","A2M","A2A","A2S"]},"SdkTransactionDetails":{"allOf":[{"$ref":"#/components/schemas/SdkTransaction"},{"type":"object","properties":{"transactionType":{"$ref":"#/components/schemas/TransactionType"},"blockNumber":{"type":["integer","null"]},"gasUsed":{"type":["number","null"]},"failureReason":{"type":["string","null"]},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"required":["id","name","address"]},"counterparty":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"trustScore":{"type":["number","null"]}},"required":["id","name"]}},"required":["transactionType"]}]},"SdkPolicyList":{"type":"object","properties":{"agentId":{"type":"string"},"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"policyType":{"type":"string"},"priority":{"type":"integer"},"enabled":{"type":"boolean"},"rules":{"type":"object","properties":{}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","policyType","priority","enabled","rules","createdAt"]}},"effectiveLimits":{"type":"object","properties":{"perTransaction":{"type":"number"},"daily":{"type":"number"},"weekly":{"type":"number"},"monthly":{"type":"number"},"allowedCategories":{"type":["array","null"],"items":{"type":"string"}},"blockedCategories":{"type":["array","null"],"items":{"type":"string"}},"requiresApprovalAbove":{"type":["number","null"]}},"required":["perTransaction","daily","weekly","monthly"]}},"required":["agentId","policies","effectiveLimits"]},"ApiKeyListResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"usageCount":{"type":"integer"},"expiresAt":{"type":["string","null"],"format":"date-time"},"isExpired":{"type":"boolean"}},"required":["id","name","keyPrefix","scopes","createdAt","usageCount","isExpired"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"availableScopes":{"type":"object","properties":{}},"scopePresets":{"type":"object","properties":{}}},"required":["apiKeys","total","limit","offset","availableScopes","scopePresets"]},"ApiKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","description":"Full key. Shown only once."},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","key","keyPrefix","scopes"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string"},"description":"Permission scopes. Available: agents:read, agents:write, wallets:read, wallets:write, transactions:read, transactions:write, policies:read, policies:write, counterparties:read, counterparties:write, alerts:read, alerts:write, analytics:read, audit:read, team:read, team:write, org:read, org:write, admin"},"scopePreset":{"type":"string","enum":["READ_ONLY","STANDARD","ADMIN"],"description":"Use a preset instead of listing individual scopes."},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"required":["name"]},"FullTransactionStatus":{"type":"string","enum":["PENDING","APPROVED","DENIED","CONFIRMING","CONFIRMED","FAILED"]},"Transaction":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"toAddress":{"type":"string"},"toName":{"type":["string","null"]},"transactionType":{"$ref":"#/components/schemas/TransactionType"},"status":{"$ref":"#/components/schemas/FullTransactionStatus"},"policyResult":{"type":"string"},"txHash":{"type":["string","null"]},"initiatedAt":{"type":"string","format":"date-time"}},"required":["id","amount","currency","toAddress","transactionType","status","initiatedAt"]},"TransactionListResponse":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"total":{"type":"integer"}},"required":["transactions","total"]},"CounterpartyType":{"type":"string","enum":["VENDOR","MERCHANT","AGENT","SERVICE","PLATFORM"]},"CounterpartyTrustLevel":{"type":"string","enum":["BLOCKED","UNKNOWN","VERIFIED","TRUSTED"]},"Counterparty":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/CounterpartyType"},"address":{"type":["string","null"]},"domain":{"type":["string","null"]},"category":{"type":["string","null"]},"description":{"type":["string","null"]},"trustScore":{"type":["number","null"]},"trustLevel":{"$ref":"#/components/schemas/CounterpartyTrustLevel"},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"],"default":"PENDING"},"verified":{"type":"boolean"}},"required":["id","name","type","trustLevel","verified"]},"CounterpartyListResponse":{"type":"object","properties":{"counterparties":{"type":"array","items":{"$ref":"#/components/schemas/Counterparty"}}},"required":["counterparties"]},"CreateCounterpartyRequest":{"type":"object","properties":{"name":{"type":"string","description":"Counterparty name"},"type":{"allOf":[{"$ref":"#/components/schemas/CounterpartyType"},{"default":"VENDOR"}]},"address":{"type":"string","description":"Wallet address"},"domain":{"type":"string","description":"Website domain"},"category":{"type":"string","description":"Business category"},"description":{"type":"string"},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"],"default":"PENDING","description":"Approval status for policy enforcement"}},"required":["name"]},"AlertSeverity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","WARNING"]},"AlertDetailStatus":{"type":"string","enum":["PENDING","ACKNOWLEDGED","RESOLVED","DISMISSED"]},"Alert":{"type":"object","properties":{"id":{"type":"string"},"alertType":{"type":"string"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"status":{"$ref":"#/components/schemas/AlertDetailStatus"},"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","alertType","severity","status","message","createdAt"]},"AlertListResponse":{"type":"object","properties":{"alerts":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}}},"required":["alerts"]}},"parameters":{}},"paths":{"/api/auth/register":{"post":{"tags":["Authentication"],"summary":"Register a new account","description":"Create a new user account and organization, then send an email verification link. Privileged API credentials are not issued until the account is verified.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}}},"responses":{"201":{"description":"Account created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"400":{"description":"Validation error (missing fields or weak password)"},"409":{"description":"Email already registered"}}}},"/api/agents":{"get":{"tags":["Agents"],"summary":"List all agents","description":"Retrieve all agents for the current organization.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentStatus"},{"description":"Filter by agent status"}]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Search by name or description"},"required":false,"name":"search","in":"query"},{"schema":{"type":"boolean","description":"Filter agents by whether their identity profile needs review"},"required":false,"name":"requiresIdentityReview","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}}},"401":{"description":"Authentication required"}}},"post":{"tags":["Agents"],"summary":"Create a new agent","description":"Create an AI agent that can be linked to wallets and policies for controlled payments. Requests made with org API keys should include `ownerMembershipId`; browser-session requests can default to the current member.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"201":{"description":"Agent created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"}}}},"/api/agents/remediation":{"post":{"tags":["Agents"],"summary":"Run bulk identity remediation for agents","description":"Assign owners or backfill safe identity fields like missing agent IDs and purposes based on existing descriptions.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRemediateAgentsRequest"}}}},"responses":{"200":{"description":"Bulk remediation results","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string"},"summary":{"type":"object","properties":{"requested":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"}},"required":["requested","updated","skipped"]},"results":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"name":{"type":"string"},"outcome":{"type":"string","enum":["updated","skipped"]},"updatedFields":{"type":"array","items":{"type":"string"}},"reason":{"type":["string","null"]}},"required":["agentId","name","outcome","updatedFields","reason"]}}},"required":["action","summary","results"]}}}},"400":{"description":"Validation error"},"404":{"description":"No matching agents found"}}}},"/api/agents/{id}":{"get":{"tags":["Agents"],"summary":"Get agent by ID","description":"Get full agent details including linked wallets, policies, and transaction counts.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetails"}}}},"404":{"description":"Resource not found"}}},"patch":{"tags":["Agents"],"summary":"Update agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"responses":{"200":{"description":"Agent updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Validation error"},"404":{"description":"Resource not found"}}},"delete":{"tags":["Agents"],"summary":"Delete agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent deleted"},"404":{"description":"Resource not found"}}}},"/api/agents/{id}/wallets":{"get":{"tags":["Agents","Wallets"],"summary":"List wallets linked to agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of linked wallets with spend limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWalletListResponse"}}}}}},"post":{"tags":["Agents","Wallets"],"summary":"Link wallet to agent","description":"Link a wallet to an agent with delegation type, spend limits, and time window controls.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWalletRequest"}}}},"responses":{"201":{"description":"Wallet linked to agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWallet"}}}},"400":{"description":"Validation error"}}}},"/api/agents/{id}/wallets/{walletId}":{"patch":{"tags":["Agents","Wallets"],"summary":"Update agent-wallet link","description":"Update spend limits, delegation type, or time window for an agent-wallet link.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"walletId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentWalletRequest"}}}},"responses":{"200":{"description":"Agent-wallet link updated"},"404":{"description":"Resource not found"}}},"delete":{"tags":["Agents","Wallets"],"summary":"Unlink wallet from agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"walletId","in":"path"}],"responses":{"200":{"description":"Wallet unlinked"},"404":{"description":"Resource not found"}}}},"/api/agents/{id}/policies":{"get":{"tags":["Agents","Policies"],"summary":"List policies assigned to agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of assigned policies"}}},"post":{"tags":["Agents","Policies"],"summary":"Assign policy to agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policyId":{"type":"string","description":"Policy ID to assign"}},"required":["policyId"]}}}},"responses":{"201":{"description":"Policy assigned to agent"},"400":{"description":"Policy already assigned or validation error"}}},"delete":{"tags":["Agents","Policies"],"summary":"Unassign policy from agent","description":"Uses query parameter: DELETE /api/agents/{id}/policies?policyId={policyId}","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Policy ID to unassign"},"required":true,"name":"policyId","in":"query"}],"responses":{"200":{"description":"Policy unassigned"},"404":{"description":"Resource not found"}}}},"/api/agents/{id}/sdk-keys":{"get":{"tags":["Agents"],"summary":"List SDK keys for agent","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of SDK keys (prefix only, not full key)"}}},"post":{"tags":["Agents"],"summary":"Generate SDK key for agent","description":"Generate a new SDK API key for the agent. The full key is returned only once. Request body supports `name`, optional `expiresInDays`, and optional `keyType`. Standard keys use Conto’s default least-privilege SDK preset; admin keys add delegated organization-management scopes for agents, wallets, and policies.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSdkKeyRequest"}}}},"responses":{"201":{"description":"SDK key created. The full key is shown only once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkKeyResponse"}}}},"400":{"description":"Key name is required"}}}},"/api/agents/{id}/freeze":{"post":{"tags":["Agents","Safety"],"summary":"Freeze an agent","description":"Immediately suspend an agent and block all transactions. Optionally freeze associated wallets. Creates a FreezeEvent audit record.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"freezeWallets":{"type":"boolean","default":false}},"required":["reason"]}}}},"responses":{"200":{"description":"Agent frozen","content":{"application/json":{"schema":{"type":"object","properties":{"freezeEventId":{"type":"string"}},"required":["freezeEventId"]}}}},"400":{"description":"Validation error"},"404":{"description":"Agent not found"},"409":{"description":"Agent is already frozen"}}},"get":{"tags":["Agents","Safety"],"summary":"Get freeze status and configuration","description":"Returns the agent freeze status, behavioral counters, stored freeze config, and the effective config (stored merged with defaults).","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Freeze status and effective configuration","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/AgentStatus"},"autoFreezeEnabled":{"type":"boolean"},"freezeConfig":{"type":["string","null"]},"frozenAt":{"type":["string","null"],"format":"date-time"},"frozenBy":{"type":["string","null"]},"freezeReason":{"type":["string","null"]},"consecutiveViolationCount":{"type":"integer"},"consecutiveFailureCount":{"type":"integer"},"lastViolationAt":{"type":["string","null"],"format":"date-time"},"lastFailureAt":{"type":["string","null"],"format":"date-time"},"effectiveConfig":{"type":"object","properties":{"maxConsecutiveViolations":{"type":"integer"},"maxConsecutiveFailures":{"type":"integer"},"spendVelocityMultiplier":{"type":"number"},"largeTxMultiplier":{"type":"number"},"minTrustScore":{"type":"number"},"trustScoreDropThreshold":{"type":"number"},"maxNewCounterpartiesPerHour":{"type":"integer"}},"required":["maxConsecutiveViolations","maxConsecutiveFailures","spendVelocityMultiplier","largeTxMultiplier","minTrustScore","trustScoreDropThreshold","maxNewCounterpartiesPerHour"]}},"required":["id","status","autoFreezeEnabled","freezeConfig","frozenAt","frozenBy","freezeReason","consecutiveViolationCount","consecutiveFailureCount","lastViolationAt","lastFailureAt","effectiveConfig"]}}}},"404":{"description":"Agent not found"}}}},"/api/agents/{id}/unfreeze":{"post":{"tags":["Agents","Safety"],"summary":"Unfreeze an agent","description":"Restore a frozen agent to ACTIVE status. Optionally unfreeze associated wallets and reset behavioral counters.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"unfreezeWallets":{"type":"boolean","default":false},"resetCounters":{"type":"boolean","default":true}},"required":["reason"]}}}},"responses":{"200":{"description":"Agent unfrozen","content":{"application/json":{"schema":{"type":"object","properties":{"freezeEventId":{"type":"string"}},"required":["freezeEventId"]}}}},"400":{"description":"Validation error"},"404":{"description":"Agent not found"},"409":{"description":"Agent is not frozen"}}}},"/api/agents/{id}/freeze-config":{"patch":{"tags":["Agents","Safety"],"summary":"Update freeze configuration","description":"Update auto-freeze thresholds for an agent. Omitted fields keep their current values. Thresholds define when automatic freezing triggers fire.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxConsecutiveViolations":{"type":"integer","minimum":1,"maximum":100},"maxConsecutiveFailures":{"type":"integer","minimum":1,"maximum":100},"spendVelocityMultiplier":{"type":"number","minimum":1.1,"maximum":100},"largeTxMultiplier":{"type":"number","minimum":1.1,"maximum":1000},"minTrustScore":{"type":"number","minimum":0,"maximum":1},"trustScoreDropThreshold":{"type":"number","minimum":0.01,"maximum":1},"maxNewCounterpartiesPerHour":{"type":"integer","minimum":1,"maximum":1000},"autoFreezeEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Configuration updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"autoFreezeEnabled":{"type":"boolean"},"freezeConfig":{"type":"string"},"effectiveConfig":{"type":"object","properties":{"maxConsecutiveViolations":{"type":"integer"},"maxConsecutiveFailures":{"type":"integer"},"spendVelocityMultiplier":{"type":"number"},"largeTxMultiplier":{"type":"number"},"minTrustScore":{"type":"number"},"trustScoreDropThreshold":{"type":"number"},"maxNewCounterpartiesPerHour":{"type":"integer"}},"required":["maxConsecutiveViolations","maxConsecutiveFailures","spendVelocityMultiplier","largeTxMultiplier","minTrustScore","trustScoreDropThreshold","maxNewCounterpartiesPerHour"]}},"required":["id","autoFreezeEnabled","freezeConfig","effectiveConfig"]}}}},"400":{"description":"Validation error"},"404":{"description":"Agent not found"}}}},"/api/agents/{id}/freeze-history":{"get":{"tags":["Agents","Safety"],"summary":"Get agent freeze event history","description":"Paginated list of freeze and unfreeze events for this agent.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Paginated freeze events","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"triggerType":{"type":"string"},"action":{"type":"string","enum":["FROZEN","UNFROZEN"]},"reason":{"type":["string","null"]},"initiatedBy":{"type":["string","null"]},"previousStatus":{"type":"string"},"isAutomatic":{"type":"boolean"},"walletsFrozen":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","agentId","triggerType","action","reason","initiatedBy","previousStatus","isAutomatic","walletsFrozen","createdAt"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["items","total","limit","offset"]}}}}}}},"/api/freeze-events":{"get":{"tags":["Safety"],"summary":"List organization-wide freeze events","description":"Paginated list of all freeze and unfreeze events across all agents in the organization.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"integer","maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Paginated freeze events","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"triggerType":{"type":"string"},"action":{"type":"string","enum":["FROZEN","UNFROZEN"]},"reason":{"type":["string","null"]},"initiatedBy":{"type":["string","null"]},"previousStatus":{"type":"string"},"isAutomatic":{"type":"boolean"},"walletsFrozen":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","agentId","triggerType","action","reason","initiatedBy","previousStatus","isAutomatic","walletsFrozen","createdAt"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["items","total","limit","offset"]}}}}}}},"/api/wallets":{"get":{"tags":["Wallets"],"summary":"List all wallets","description":"List all wallets for the organization with linked agents and policies.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/WalletStatus"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ChainType"},"required":false,"name":"chainType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"chainId","in":"query"}],"responses":{"200":{"description":"List of wallets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletListResponse"}}}}}},"post":{"tags":["Wallets"],"summary":"Create a new wallet","description":"Create a new wallet. By default creates a PRIVY-custodied EOA wallet on EVM. You can also attach an existing Privy-backed wallet by providing custodyType=PRIVY with externalWalletId and address, or register a self-custodied wallet with custodyType=EXTERNAL and address/importAddress. Requests are idempotent per externalWalletId + chainId or address + chainId within the organization.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletRequest"}}}},"responses":{"200":{"description":"Existing wallet reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"201":{"description":"Wallet created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"400":{"description":"Validation error"}}}},"/api/wallets/{id}":{"get":{"tags":["Wallets"],"summary":"Get wallet by ID","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Wallet details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Resource not found"}}},"patch":{"tags":["Wallets"],"summary":"Update wallet","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"status":{"$ref":"#/components/schemas/WalletStatus"}}}}}},"responses":{"200":{"description":"Wallet updated"},"404":{"description":"Resource not found"}}}},"/api/wallets/{id}/provision":{"post":{"tags":["Wallets"],"summary":"Provision wallet onchain","description":"Provision a Sponge-custodied wallet: links to the platform Sponge account, syncs a real blockchain address and balance, and marks the wallet ready for SDK-initiated payments. No request body required.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Wallet provisioned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"404":{"description":"Resource not found"},"500":{"description":"Provisioning failed"}}}},"/api/policies":{"get":{"tags":["Policies"],"summary":"List all policies","description":"List all policies for the organization with their rules and assignments.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"responses":{"200":{"description":"List of policies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyListResponse"}}}}}},"post":{"tags":["Policies"],"summary":"Create a new policy","description":"Create a policy with optional inline rules and agent assignments. When `rules` and/or `agentIds` are provided, everything is created in a single atomic transaction — if any step fails, nothing is created. You can also create a policy shell first and add rules separately via POST /api/policies/{id}/rules.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}},"responses":{"201":{"description":"Policy created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"400":{"description":"Validation error"}}}},"/api/policies/{id}":{"get":{"tags":["Policies"],"summary":"Get policy by ID","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Policy details with rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyWithRules"}}}},"404":{"description":"Resource not found"}}},"patch":{"tags":["Policies"],"summary":"Update policy","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}}},"responses":{"200":{"description":"Policy updated"},"404":{"description":"Resource not found"}}},"delete":{"tags":["Policies"],"summary":"Delete policy","description":"Permanently delete a policy and remove it from all agents. Consider deactivating (PATCH with isActive: false) instead if you want to preserve the policy configuration.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Policy deleted"},"404":{"description":"Resource not found"}}}},"/api/policies/{id}/rules":{"get":{"tags":["Policies"],"summary":"List rules for a policy","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of policy rules","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/PolicyRuleResponse"}}},"required":["rules"]}}}}}},"post":{"tags":["Policies"],"summary":"Add rules to a policy","description":"Add one or more rules to a policy. Rules are evaluated using AND logic — all must pass for a payment to be approved.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRulesRequest"}}}},"responses":{"201":{"description":"Rules added","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/PolicyRuleResponse"}},"count":{"type":"integer"}},"required":["rules","count"]}}}},"400":{"description":"Validation error"},"404":{"description":"Resource not found"}}}},"/api/sdk/payments/request":{"post":{"tags":["SDK Payments"],"summary":"Request payment authorization","description":"Request authorization for a payment from an AI agent. Evaluates all assigned policies and wallet-level spend limits. Returns APPROVED, DENIED, or REQUIRES_APPROVAL.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}},"responses":{"200":{"description":"Payment authorization result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestResponse"}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"},"429":{"description":"Rate limit exceeded"}}}},"/api/sdk/payments/{requestId}":{"get":{"tags":["SDK Payments"],"summary":"Get payment request status","description":"Check the status of a payment request.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Payment request ID"},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Payment request status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusResponse"}}}},"404":{"description":"Resource not found"}}}},"/api/sdk/payments/{requestId}/execute":{"post":{"tags":["SDK Payments"],"summary":"Execute approved payment","description":"Execute a previously approved payment request. The request must have status APPROVED and not be expired. Executes the onchain transaction via Sponge wallet.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Payment request ID"},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Payment executed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExecuteResponse"}}}},"400":{"description":"Payment cannot be executed (expired, already executed, or not approved)"},"404":{"description":"Payment request not found"}}}},"/api/sdk/all":{"get":{"tags":["SDK Agent"],"summary":"Get complete agent data","description":"Returns everything about the authenticated agent in a single call: profile, wallets, policies, counterparties, transactions, alerts, analytics, and capabilities. Use the `include` query parameter to cherry-pick specific sections.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Comma-separated list of sections to include. Available: agent, wallets, policies, counterparties, transactions, alerts, analytics, capabilities, endpoints. Omit to include all.","example":"wallets,policies,transactions"},"required":false,"name":"include","in":"query"},{"schema":{"type":"string","enum":["day","week","month","year"],"default":"month","description":"Time period for analytics data"},"required":false,"name":"analyticsPeriod","in":"query"}],"responses":{"200":{"description":"Complete agent data","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"agentType":{"type":"string"},"status":{"type":"string"},"lastActiveAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","agentType","status","lastActiveAt","createdAt"]},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"balance":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"limits":{"type":"object","properties":{"perTransaction":{"type":["number","null"]},"daily":{"type":["number","null"]},"weekly":{"type":["number","null"]},"monthly":{"type":["number","null"]}},"required":["perTransaction","daily","weekly","monthly"]},"spent":{"type":"object","properties":{"today":{"type":"number"},"thisWeek":{"type":"number"},"thisMonth":{"type":"number"}},"required":["today","thisWeek","thisMonth"]}},"required":["id","name","address","balance","currency","status","limits","spent"]}},"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"policyType":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"},"action":{"type":"string"}},"required":["type","operator","value","action"]}}},"required":["id","name","policyType","rules"]}},"counterparties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"address":{"type":"string"},"trustScore":{"type":"number"}},"required":["id","name","address","trustScore"]}},"transactions":{"type":"object","properties":{"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"status":{"type":"string"},"toAddress":{"type":"string"}},"required":["id","amount","status","toAddress"]}},"total":{"type":"number"}},"required":["recent","total"]},"alerts":{"type":"object","properties":{"activeCount":{"type":"number"},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"alertType":{"type":"string"},"severity":{"type":"string"},"title":{"type":"string"}},"required":["id","alertType","severity","title"]}}},"required":["activeCount","recent"]},"analytics":{"type":"object","properties":{"period":{"type":"string"},"summary":{"type":"object","properties":{"totalVolume":{"type":"number"},"transactionCount":{"type":"number"}},"required":["totalVolume","transactionCount"]}},"required":["period","summary"]},"capabilities":{"type":"object","properties":{"canRequestPayments":{"type":"boolean"},"canExecutePayments":{"type":"boolean"},"canAutoExecute":{"type":"boolean"},"maxSinglePayment":{"type":["number","null"]},"remainingDailyBudget":{"type":["number","null"]},"spentToday":{"type":"number"}},"required":["canRequestPayments","canExecutePayments","canAutoExecute","maxSinglePayment","remainingDailyBudget","spentToday"]},"scopes":{"type":"array","items":{"type":"string"}}},"required":["scopes"]}}}},"401":{"description":"Authentication required"}}}},"/api/sdk/agents/me":{"get":{"tags":["SDK Agent"],"summary":"Get agent profile","description":"Get the authenticated agent profile and summary statistics.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"Agent profile with spend summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkAgentProfile"}}}},"401":{"description":"Authentication required"}}}},"/api/sdk/wallets":{"get":{"tags":["SDK Wallets"],"summary":"List agent wallets","description":"List all wallets assigned to the authenticated agent.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["ACTIVE","PAUSED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List of wallets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkWalletList"}}}},"401":{"description":"Authentication required"}}}},"/api/sdk/wallets/{id}":{"get":{"tags":["SDK Wallets"],"summary":"Get wallet details","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Wallet details with limits and recent transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkWalletDetails"}}}},"404":{"description":"Resource not found"}}}},"/api/sdk/transactions":{"get":{"tags":["SDK Transactions"],"summary":"List agent transactions","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"walletId","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Start date filter"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End date filter"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"List of transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkTransactionList"}}}}}}},"/api/sdk/transactions/{id}":{"get":{"tags":["SDK Transactions"],"summary":"Get transaction details","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transaction details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkTransactionDetails"}}}},"404":{"description":"Resource not found"}}}},"/api/sdk/policies":{"get":{"tags":["SDK Policies"],"summary":"List agent policies","description":"List policies that govern the authenticated agent, with effective limits.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"List of policies with effective limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkPolicyList"}}}}}}},"/api/sdk/a2a/request":{"post":{"tags":["SDK A2A Payments"],"summary":"Create an A2A payment request","description":"Request payment from another Conto agent. The requesting agent is asking the target agent to send them funds. Target can be specified by agent ID or wallet address.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetAgentId":{"type":"string","description":"ID of the agent to request payment from"},"targetWalletAddress":{"type":"string","description":"Wallet address of the target agent (alternative to targetAgentId)"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Payment amount"},"currency":{"type":"string","default":"USDC","description":"Currency (default: USDC)"},"purpose":{"type":"string","description":"Reason for the payment request"},"invoiceId":{"type":"string","description":"Optional invoice identifier"},"invoiceData":{"description":"Structured invoice data"},"dueDate":{"type":"string","format":"date-time","description":"Payment due date (ISO 8601)"},"expiresAt":{"type":"string","format":"date-time","description":"Request expiration time (ISO 8601)"},"metadata":{"description":"Additional metadata"}},"required":["amount"]}}}},"responses":{"200":{"description":"Payment request created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"paymentRequest":{"description":"Payment request details"},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Validation error (invalid amount, missing target)"},"401":{"description":"Authentication required"},"404":{"description":"Target agent not found"}}}},"/api/sdk/a2a/requests":{"get":{"tags":["SDK A2A Payments"],"summary":"List A2A payment requests","description":"List payment requests for the authenticated agent. Filter by direction (incoming/outgoing) and status.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["incoming","outgoing","all"],"default":"all","description":"Filter by request direction"},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","description":"Filter by status"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of A2A payment requests","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["requests","pagination"]}}}},"401":{"description":"Authentication required"}}}},"/api/sdk/a2a/requests/{id}":{"get":{"tags":["SDK A2A Payments"],"summary":"Get A2A payment request details","description":"Get details of a specific A2A payment request, including direction and status.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Payment request ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Payment request details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"amount":{"type":"number"},"currency":{"type":"string"},"purpose":{"type":["string","null"]},"requestingAgent":{},"requestedFromAgent":{},"transaction":{},"invoiceData":{},"metadata":{},"createdAt":{"type":"string"},"expiresAt":{"type":["string","null"]}},"required":["id","status","direction","amount","currency","purpose","createdAt","expiresAt"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Not authorized to view this request"},"404":{"description":"Payment request not found"}}}},"/api/sdk/a2a/requests/{id}/execute":{"post":{"tags":["SDK A2A Payments"],"summary":"Execute an approved A2A payment request","description":"Execute a previously approved A2A payment request. The request must be in an approved state.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Payment request ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Payment execution initiated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Not authorized to execute this request"},"404":{"description":"Payment request not found"}}}},"/api/sdk/a2a/resolve":{"get":{"tags":["SDK A2A Payments"],"summary":"Resolve a wallet address to a Conto agent","description":"Check if a wallet address belongs to a registered Conto agent. Useful for verifying recipients before sending A2A payment requests.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Wallet address to resolve"},"required":true,"name":"address","in":"query"}],"responses":{"200":{"description":"Resolution result","content":{"application/json":{"schema":{"type":"object","properties":{"isAgent":{"type":"boolean"},"address":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"Agent info if resolved"},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"Organization info if resolved"},"message":{"type":"string"}},"required":["isAgent","address"]}}}},"400":{"description":"Address query parameter required"},"401":{"description":"Authentication required"}}}},"/api/sdk/a2a/stats":{"get":{"tags":["SDK A2A Payments"],"summary":"Get A2A payment statistics","description":"Get aggregate A2A payment statistics for the authenticated agent.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"A2A payment statistics","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"}},"required":["agentId"]}}}},"401":{"description":"Authentication required"}}}},"/api/sdk/alerts":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"List agent alerts","description":"List alerts for the authenticated agent. Requires `alerts:read` scope. Filter by status and severity.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["ACTIVE","ACKNOWLEDGED","RESOLVED"],"description":"Filter by alert status"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"],"description":"Filter by severity"},"required":false,"name":"severity","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of alerts with pagination","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"activeCount":{"type":"number"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"alertType":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"transaction":{"type":["object","null"],"properties":{"id":{"type":"string"},"amount":{"type":"number"},"toAddress":{"type":"string"},"merchantName":{"type":["string","null"]}},"required":["id","amount","toAddress","merchantName"]},"metadata":{},"createdAt":{"type":"string"},"acknowledgedAt":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]}},"required":["id","alertType","severity","status","title","message","transaction","createdAt","acknowledgedAt","resolvedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["agentId","activeCount","alerts","pagination"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: alerts:read required"}}}},"/api/sdk/alerts/{id}":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"Get alert details","description":"Get details of a specific alert. Requires `alerts:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Alert ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Alert details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"alertType":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"transaction":{},"metadata":{},"createdAt":{"type":"string"},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]}},"required":["id","alertType","severity","status","title","message","createdAt","acknowledgedAt","acknowledgedBy","resolvedAt"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: alerts:read required"},"404":{"description":"Alert not found"}}},"patch":{"tags":["SDK Alerts & Analytics"],"summary":"Acknowledge or resolve an alert","description":"Update an alert status by acknowledging or resolving it. Requires `alerts:write` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Alert ID"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["acknowledge","resolve"],"description":"Action to perform"},"resolution":{"type":"string","description":"Resolution note (for resolve action)"}},"required":["action"]}}}},"responses":{"200":{"description":"Alert updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"alertId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"}},"required":["success","alertId","status","message"]}}}},"400":{"description":"Invalid action or alert status"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: alerts:write required"},"404":{"description":"Alert not found"}}}},"/api/sdk/analytics":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"Get spending analytics","description":"Get spending analytics for the authenticated agent including volume trends, category breakdowns, and top merchants. Requires `analytics:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["day","week","month","year"],"default":"month","description":"Time period for analytics"},"required":false,"name":"period","in":"query"}],"responses":{"200":{"description":"Spending analytics","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"period":{"type":"string"},"dateRange":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"]},"summary":{"type":"object","properties":{"totalVolume":{"type":"number"},"transactionCount":{"type":"number"},"avgTransactionSize":{"type":"number"},"volumeChange":{"type":"number"},"previousVolume":{"type":"number"}},"required":["totalVolume","transactionCount","avgTransactionSize","volumeChange","previousVolume"]},"categoryBreakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"count":{"type":"number"},"volume":{"type":"number"},"percentage":{"type":"number"}},"required":["category","count","volume","percentage"]}},"typeBreakdown":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"number"},"volume":{"type":"number"},"percentage":{"type":"number"}},"required":["type","count","volume","percentage"]}},"topMerchants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"},"volume":{"type":"number"}},"required":["name","count","volume"]}},"volumeTrend":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"volume":{"type":"number"}},"required":["date","volume"]}}},"required":["agentId","period","dateRange","summary","categoryBreakdown","typeBreakdown","topMerchants","volumeTrend"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: analytics:read required"}}}},"/api/sdk/audit-logs":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"List audit logs","description":"Get audit logs of actions performed by or affecting this agent. Requires `audit:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by action type"},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","description":"Filter by resource type"},"required":false,"name":"resource","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Start date filter (ISO 8601)"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End date filter (ISO 8601)"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"List of audit log entries","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"logs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"resource":{"type":"string"},"resourceId":{"type":["string","null"]},"actorType":{"type":"string"},"actorId":{"type":"string"},"metadata":{},"ipAddress":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","action","resource","resourceId","actorType","actorId","ipAddress","createdAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["agentId","logs","pagination"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: audit:read required"}}}},"/api/sdk/approval-requests":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"List pending approval requests","description":"List pending approval requests for the agent, including payments awaiting human approval and incoming A2A payment requests.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["payment","a2a_incoming","a2a_outgoing"],"description":"Filter by request type"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["PENDING","APPROVED","DENIED","EXPIRED"],"description":"Filter by status"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of approval requests","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"pendingCount":{"type":"number"},"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"recipient":{"type":"string"},"requester":{"type":"string"},"purpose":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","type","status","amount","currency","createdAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["agentId","pendingCount","requests","pagination"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope"}}}},"/api/sdk/spending-limits":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"Get spending limits and usage","description":"Get per-wallet spending limits and current usage for the authenticated agent. Requires `wallets:read` scope.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"Spending limits and current usage per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"agentName":{"type":"string"},"wallets":{"type":"array","items":{"type":"object","properties":{"walletId":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"balance":{"type":"number"},"limits":{"type":"object","properties":{"perTransaction":{"type":["number","null"]},"daily":{"type":["number","null"]},"weekly":{"type":["number","null"]},"monthly":{"type":["number","null"]}},"required":["perTransaction","daily","weekly","monthly"]},"spent":{"type":"object","properties":{"today":{"type":"number"},"thisWeek":{"type":"number"},"thisMonth":{"type":"number"}},"required":["today","thisWeek","thisMonth"]},"remaining":{"type":"object","properties":{"daily":{"type":["number","null"]},"weekly":{"type":["number","null"]},"monthly":{"type":["number","null"]}},"required":["daily","weekly","monthly"]}},"required":["walletId","name","address","balance","limits","spent","remaining"]}}},"required":["agentId","agentName","wallets"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: wallets:read required"}}}},"/api/sdk/rate-limits":{"get":{"tags":["SDK Alerts & Analytics"],"summary":"Get rate limit status","description":"Get current rate limit status, usage counts, and per-endpoint rate limits for the authenticated agent.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"Rate limit status and endpoint limits","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]},"rateLimit":{"type":"object","properties":{"limit":{"type":"number"},"remaining":{"type":"number"},"used":{"type":"number"},"resetAt":{"type":"string"},"resetInSeconds":{"type":"number"}},"required":["limit","remaining","used","resetAt","resetInSeconds"]},"usage":{"type":"object","properties":{"transactionsToday":{"type":"number"},"transactionsThisMonth":{"type":"number"},"pendingPaymentRequests":{"type":"number"}},"required":["transactionsToday","transactionsThisMonth","pendingPaymentRequests"]},"plan":{"type":"string"}},"required":["agent","rateLimit","usage","plan"]}}}},"401":{"description":"Authentication required"},"404":{"description":"Agent not found"}}}},"/api/sdk/cards/approve":{"post":{"tags":["SDK Cards"],"summary":"Request card payment approval","description":"Request policy approval before charging a card (BYOC flow step 1). Evaluates per-transaction limits, daily/weekly/monthly limits, time windows, and merchant restrictions. Requires `payments:approve` scope.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cardId":{"type":"string","description":"Card identifier"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Charge amount"},"currency":{"type":"string","default":"USD","description":"Currency (default: USD)"},"merchantName":{"type":"string","description":"Merchant name"},"merchantId":{"type":"string","description":"Merchant ID"},"merchantCategory":{"type":"string","description":"Merchant category code"},"merchantCountry":{"type":"string","description":"Merchant country code"},"purpose":{"type":"string","description":"Purpose of the payment"},"context":{"description":"Additional context for policy evaluation"}},"required":["cardId","amount"]}}}},"responses":{"200":{"description":"Approval result (approved or denied with policy violations)","content":{"application/json":{"schema":{"type":"object","properties":{"approved":{"type":"boolean"},"requestId":{"type":"string"},"approvalToken":{"type":"string"},"expiresAt":{"type":"string"},"reason":{"type":"string"},"policyViolations":{"type":"array","items":{"type":"string"}},"card":{"type":"object","properties":{"last4":{"type":"string"},"brand":{"type":"string"},"cardholderName":{"type":"string"}},"required":["last4","brand","cardholderName"]},"limits":{"type":"object","properties":{"remainingDaily":{"type":"number"},"remainingPerTx":{"type":"number"}},"required":["remainingDaily","remainingPerTx"]}},"required":["approved","requestId"]}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: payments:approve required"},"404":{"description":"Card not found"},"429":{"description":"Rate limit exceeded"}}}},"/api/sdk/cards/{id}/confirm":{"post":{"tags":["SDK Cards"],"summary":"Confirm card payment execution","description":"Confirm that a card payment was charged externally (BYOC flow step 2). Requires the approval token from the approve step. Requires `payments:confirm` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Card approval request ID"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvalToken":{"type":"string","description":"Token from the approve response"},"externalTxId":{"type":"string","description":"External transaction reference ID"},"authorizationCode":{"type":"string","description":"Card authorization code"},"actualAmount":{"type":"number","description":"Actual charged amount (if different from approved)"},"merchantDetails":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"category":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postalCode":{"type":"string"}},"description":"Merchant details from the charge"}},"required":["approvalToken"]}}}},"responses":{"200":{"description":"Card payment confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"confirmed":{"type":"boolean"},"transactionId":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"card":{"type":"object","properties":{"last4":{"type":"string"},"brand":{"type":"string"}},"required":["last4","brand"]},"merchant":{"type":"object","properties":{"name":{"type":["string","null"]},"category":{"type":["string","null"]}},"required":["name","category"]}},"required":["confirmed","transactionId","status","amount","currency","card","merchant"]}}}},"400":{"description":"Validation error, expired, or already confirmed"},"401":{"description":"Authentication required"},"403":{"description":"Invalid approval token"},"404":{"description":"Approval request not found"}}}},"/api/sdk/counterparties":{"get":{"tags":["SDK Counterparties"],"summary":"List agent counterparties","description":"List counterparties the agent has interacted with, including trust levels and transaction history. Requires `counterparties:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["HIGH","MEDIUM","LOW","UNKNOWN"],"description":"Filter by trust level"},"required":false,"name":"trustLevel","in":"query"},{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of counterparties with trust data","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"counterparties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"address":{"type":"string"},"category":{"type":["string","null"]},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"]},"verified":{"type":"boolean"},"riskLevel":{"type":"string"},"trustScore":{"type":"number"},"relationship":{"type":"object","properties":{"trustScore":{"type":"number"},"trustLevel":{"type":"string"},"transactionCount":{"type":"number"},"totalVolume":{"type":"number"},"firstTransactionAt":{"type":["string","null"]},"lastTransactionAt":{"type":["string","null"]}},"required":["trustScore","trustLevel","transactionCount","totalVolume","firstTransactionAt","lastTransactionAt"]}},"required":["id","name","address","category","approvalStatus","verified","riskLevel","trustScore","relationship"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["agentId","counterparties","pagination"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: counterparties:read required"}}},"post":{"tags":["SDK Counterparties"],"summary":"Create a counterparty","description":"Register a new counterparty (payment recipient). Requires `counterparties:write` scope.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Counterparty name"},"address":{"type":"string","minLength":1,"maxLength":200,"description":"Wallet address"},"type":{"type":"string","maxLength":50,"default":"VENDOR","description":"Counterparty type (default: VENDOR)"},"category":{"type":"string","maxLength":100,"description":"Category"},"description":{"type":"string","maxLength":500,"description":"Description"},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"],"default":"PENDING","description":"Approval status for counterparty policies"}},"required":["name","address"]}}}},"responses":{"200":{"description":"Counterparty created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"type":{"type":"string"},"category":{"type":["string","null"]},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"]},"trustScore":{"type":"number"},"trustLevel":{"type":"string"},"riskLevel":{"type":"string"},"created":{"type":"boolean"}},"required":["id","name","address","type","category","approvalStatus","trustScore","trustLevel","riskLevel","created"]}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: counterparties:write required"}}}},"/api/sdk/counterparties/{id}":{"get":{"tags":["SDK Counterparties"],"summary":"Get counterparty details","description":"Get detailed counterparty info including trust relationship and recent transactions. Requires `counterparties:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Counterparty ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Counterparty details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"address":{"type":"string"},"category":{"type":["string","null"]},"approvalStatus":{"type":"string","enum":["PENDING","APPROVED"]},"verified":{"type":"boolean"},"riskLevel":{"type":"string"},"trustScore":{"type":"number"},"website":{"type":["string","null"]},"description":{"type":["string","null"]},"relationship":{"type":["object","null"],"properties":{"trustScore":{"type":"number"},"trustLevel":{"type":"string"},"transactionCount":{"type":"number"},"totalVolume":{"type":"number"},"firstTransactionAt":{"type":["string","null"]},"lastTransactionAt":{"type":["string","null"]}},"required":["trustScore","trustLevel","transactionCount","totalVolume","firstTransactionAt","lastTransactionAt"]},"recentTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"initiatedAt":{"type":"string"},"purpose":{"type":["string","null"]}},"required":["id","amount","currency","status","initiatedAt","purpose"]}}},"required":["id","name","address","category","approvalStatus","verified","riskLevel","trustScore","website","description","relationship","recentTransactions"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: counterparties:read required"},"404":{"description":"Counterparty not found"}}},"patch":{"tags":["SDK Counterparties"],"summary":"Update a counterparty","description":"Update counterparty details. Requires `counterparties:write` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Counterparty ID"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"}}}}}},"responses":{"200":{"description":"Counterparty updated"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: counterparties:write required"},"404":{"description":"Counterparty not found"}}}},"/api/sdk/network/trust/{address}":{"get":{"tags":["SDK Counterparties"],"summary":"Get network trust for an address","description":"Look up trust information for any wallet address on the Conto network. Returns entity type, trust scores, relationship history, and any flags. Requires `network:read` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Wallet address to look up"},"required":true,"name":"address","in":"path"}],"responses":{"200":{"description":"Network trust information","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"entityType":{"type":"string","enum":["agent","counterparty","unknown"]},"entityInfo":{},"trust":{"type":"object","properties":{"globalScore":{"type":["number","null"]},"isVerified":{"type":"boolean"},"riskLevel":{"type":"string"},"networkRelationships":{"type":"number"}},"required":["globalScore","isVerified","riskLevel","networkRelationships"]},"agentRelationship":{"type":["object","null"],"properties":{"trustScore":{"type":"number"},"trustLevel":{"type":"string"},"transactionCount":{"type":"number"},"totalVolume":{"type":"number"},"firstTransactionAt":{"type":["string","null"]},"lastTransactionAt":{"type":["string","null"]}},"required":["trustScore","trustLevel","transactionCount","totalVolume","firstTransactionAt","lastTransactionAt"]},"transactionHistory":{"type":"object","properties":{"count":{"type":"number"},"totalVolume":{"type":"number"}},"required":["count","totalVolume"]},"flags":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"severity":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["type","severity","reason","createdAt"]}},"hasFlags":{"type":"boolean"}},"required":["address","entityType","trust","agentRelationship","transactionHistory","flags","hasFlags"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: network:read required"}}}},"/api/sdk/setup":{"get":{"tags":["SDK Agent"],"summary":"Get agent bootstrap configuration","description":"Returns comprehensive agent configuration including profile, wallets, policies, counterparties, scopes, available endpoints, and capabilities. Designed for initial SDK bootstrap.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"Complete agent bootstrap data","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"agentType":{"type":"string"},"status":{"type":"string"},"lastActiveAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","agentType","status","lastActiveAt","createdAt"]},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"custodyType":{"type":"string"},"chainId":{"type":["string","null"]},"chainName":{"type":["string","null"]},"chainType":{"type":["string","null"]},"balance":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"limits":{"type":"object","properties":{"perTransaction":{"type":["number","null"]},"daily":{"type":["number","null"]},"weekly":{"type":["number","null"]},"monthly":{"type":["number","null"]}},"required":["perTransaction","daily","weekly","monthly"]},"spent":{"type":"object","properties":{"today":{"type":"number"},"thisWeek":{"type":"number"},"thisMonth":{"type":"number"}},"required":["today","thisWeek","thisMonth"]},"isExecutable":{"type":"boolean"}},"required":["id","address","custodyType","chainId","chainName","chainType","balance","currency","status","limits","spent","isExecutable"]}},"policies":{"type":"array","items":{}},"counterparties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"address":{"type":"string"},"category":{"type":["string","null"]},"trustScore":{"type":"number"},"trustLevel":{"type":"string"},"transactionCount":{"type":"number"},"totalVolume":{"type":"number"}},"required":["id","name","address","category","trustScore","trustLevel","transactionCount","totalVolume"]}},"scopes":{"type":"array","items":{"type":"string"}},"endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string"},"note":{"type":"string"}},"required":["method","path","description"]}},"capabilities":{"type":"object","properties":{"canRequestPayments":{"type":"boolean"},"canExecutePayments":{"type":"boolean"},"canAutoExecute":{"type":"boolean"},"maxSinglePayment":{"type":["number","null"]},"remainingDailyBudget":{"type":["number","null"]},"spentToday":{"type":"number"}},"required":["canRequestPayments","canExecutePayments","canAutoExecute","maxSinglePayment","remainingDailyBudget","spentToday"]}},"required":["agent","wallets","policies","counterparties","scopes","endpoints","capabilities"]}}}},"401":{"description":"Authentication required"},"404":{"description":"Agent not found"}}}},"/api/sdk/payments/approve":{"post":{"tags":["SDK Payments"],"summary":"Approve an external wallet payment","description":"Request policy approval for a payment the agent will execute via its own external wallet. Returns an approval token to use when confirming. Requires `payments:approve` scope.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Payment amount"},"recipientAddress":{"type":"string","description":"Recipient wallet address"},"senderAddress":{"type":"string","description":"Sender wallet address (agent wallet)"},"recipientName":{"type":"string","description":"Recipient name"},"purpose":{"type":"string","description":"Payment purpose"},"category":{"type":"string","description":"Payment category"},"context":{"description":"Additional context for policy evaluation"},"chainId":{"type":"number","description":"Chain ID (required). 8453=Base, 42431=Tempo Testnet, 84532=Base Sepolia, 1=Ethereum."}},"required":["amount","recipientAddress","senderAddress","chainId"]}}}},"responses":{"200":{"description":"Approval result","content":{"application/json":{"schema":{"type":"object","properties":{"approved":{"type":"boolean"},"approvalId":{"type":"string"},"approvalToken":{"type":"string"},"expiresAt":{"type":"string"},"confirmUrl":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"violations":{"type":"array","items":{}},"requiresHumanApproval":{"type":"boolean"},"limits":{"type":"object","properties":{"dailyUsed":{"type":"number"},"dailyLimit":{"type":["number","null"]},"dailyRemaining":{"type":["number","null"]},"weeklyUsed":{"type":"number"},"weeklyLimit":{"type":["number","null"]},"monthlyUsed":{"type":"number"},"monthlyLimit":{"type":["number","null"]}},"required":["dailyUsed","dailyLimit","dailyRemaining","weeklyUsed","weeklyLimit","monthlyUsed","monthlyLimit"]},"message":{"type":"string"}},"required":["approved","approvalId"]}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: payments:approve required"}}}},"/api/sdk/payments/{requestId}/confirm":{"post":{"tags":["SDK Payments"],"summary":"Confirm external wallet payment execution","description":"Confirm that an externally approved payment was executed by providing the transaction hash and approval token. Requires `payments:confirm` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Payment approval ID"},"required":true,"name":"requestId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","description":"Onchain transaction hash"},"approvalToken":{"type":"string","description":"Approval token from the approve response"}},"required":["txHash","approvalToken"]}}}},"responses":{"200":{"description":"Payment confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"confirmed":{"type":"boolean"},"transactionId":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"recipient":{"type":"string"},"recipientName":{"type":["string","null"]},"txHash":{"type":"string"},"explorerUrl":{"type":"string"},"message":{"type":"string"}},"required":["confirmed","transactionId","status","amount","currency","recipient","recipientName","txHash","explorerUrl","message"]}}}},"400":{"description":"Validation error, expired, or already confirmed"},"401":{"description":"Authentication required"},"403":{"description":"Invalid approval token"},"404":{"description":"Payment approval not found"}}}},"/api/sdk/transactions/{id}/retry":{"post":{"tags":["SDK Transactions"],"summary":"Retry a failed transaction","description":"Queue a failed transaction for retry. Only transactions with FAILED status can be retried. Requires `transactions:write` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Transaction ID"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transaction queued for retry","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"transactionId":{"type":"string"},"status":{"type":"string","enum":["PENDING"]},"message":{"type":"string"}},"required":["success","transactionId","status","message"]}}}},"400":{"description":"Transaction cannot be retried (not in FAILED status)"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: transactions:write required"},"404":{"description":"Transaction not found"}}}},"/api/sdk/policies/exceptions":{"get":{"tags":["SDK Policies"],"summary":"List policy exception requests","description":"List policy exception requests submitted by this agent. Requires `policies:exceptions` scope.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of exception requests","content":{"application/json":{"schema":{"type":"object","properties":{"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"},"details":{},"createdAt":{"type":"string"},"resolvedAt":{"type":["string","null"]}},"required":["id","type","status","severity","title","reason","createdAt","resolvedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"]}},"required":["exceptions","pagination"]}}}},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: policies:exceptions required"}}},"post":{"tags":["SDK Policies"],"summary":"Request a policy exception","description":"Submit a request for a policy exception (e.g., whitelist a counterparty, increase spend limit). Requires `policies:exceptions` scope.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["ADD_TO_WHITELIST","INCREASE_SPEND_LIMIT","EXTEND_TIME_WINDOW","ADD_CATEGORY","CUSTOM"],"description":"Exception type"},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Reason for the exception"},"urgency":{"type":"string","enum":["LOW","NORMAL","HIGH","CRITICAL"],"default":"NORMAL","description":"Request urgency"},"details":{"type":"object","properties":{"counterpartyAddress":{"type":"string"},"counterpartyName":{"type":"string"},"policyId":{"type":"string"},"requestedLimit":{"type":"number"},"requestedCategory":{"type":"string"},"requestedTimeWindow":{"type":"string"},"amount":{"type":"number"}},"description":"Exception-specific details"}},"required":["type","reason"]}}}},"responses":{"200":{"description":"Exception request created","content":{"application/json":{"schema":{"type":"object","properties":{"exceptionId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["PENDING"]},"severity":{"type":"string"},"createdAt":{"type":"string"},"message":{"type":"string"}},"required":["exceptionId","type","status","severity","createdAt","message"]}}}},"400":{"description":"Validation error"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope: policies:exceptions required"}}}},"/api/sdk/x402/pre-authorize":{"post":{"tags":["x402"],"summary":"Pre-authorize an x402 payment","description":"Check policy approval before signing an x402 payment.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Payment amount in USDC"},"recipientAddress":{"type":"string","description":"Recipient wallet address"},"resourceUrl":{"type":"string","description":"Target API endpoint URL"},"facilitator":{"type":"string","description":"x402 facilitator address"},"scheme":{"type":"string","description":"Payment scheme"},"paymentId":{"type":"string","description":"Unique payment identifier for idempotency"},"walletId":{"type":"string","description":"Specific wallet to use"},"sessionId":{"type":"string","description":"Session ID for session-budget tracking"},"category":{"type":"string","description":"Spend category override"}},"required":["amount","recipientAddress","resourceUrl"]}}}},"responses":{"200":{"description":"Pre-authorization result (approved/denied)"},"401":{"description":"Authentication required"}}}},"/api/sdk/x402/record":{"post":{"tags":["x402"],"summary":"Record x402 payment(s)","description":"Record a single x402 payment or a batch of micropayments.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Total payment amount"},"currency":{"type":"string","description":"Payment currency symbol"},"recipientAddress":{"type":"string","description":"Recipient wallet address"},"txHash":{"type":"string","description":"Onchain transaction hash"},"resourceUrl":{"type":"string","description":"API endpoint URL"},"paymentId":{"type":"string","description":"Payment identifier"},"facilitator":{"type":"string","description":"x402 facilitator address"},"scheme":{"type":"string","description":"Payment scheme"},"responseCode":{"type":"integer","description":"HTTP response code"},"walletId":{"type":"string","description":"Specific wallet to use"},"sessionId":{"type":"string","description":"Session ID for session-budget tracking"},"category":{"type":"string","description":"Spend category override"},"purpose":{"type":"string","description":"Purpose string for audit logs"},"responseTimeMs":{"type":"integer","description":"Response time in milliseconds"},"chainType":{"type":"string","enum":["EVM","SOLANA"],"description":"Settlement chain type"},"chainId":{"type":"string","description":"Settlement chain ID"},"batchItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number"},"resourceUrl":{"type":"string"},"paymentId":{"type":"string"},"responseCode":{"type":"integer"},"responseTimeMs":{"type":"integer"},"calledAt":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["amount","resourceUrl"]},"description":"Optional batch of individual x402 calls"}},"required":["amount","recipientAddress","resourceUrl"]}}}},"responses":{"200":{"description":"Payment(s) recorded"},"401":{"description":"Authentication required"}}}},"/api/sdk/x402/services":{"get":{"tags":["x402"],"summary":"List x402 services used by agent","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"List of x402 services with spend stats"}}}},"/api/sdk/x402/budget":{"get":{"tags":["x402"],"summary":"Check x402 budget remaining","description":"Get x402 budget remaining, burn rate, and projections.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Optional session ID for session-budget tracking"},"required":false,"name":"sessionId","in":"query"}],"responses":{"200":{"description":"Budget status with burn rate and projections"}}}},"/api/sdk/mpp/pre-authorize":{"post":{"tags":["mpp"],"summary":"Pre-authorize an MPP payment","description":"Check policy approval before creating an MPP credential. The agent sends the WWW-Authenticate: Payment challenge contents and Conto evaluates policies without executing anything.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Payment amount in the wallet chain stablecoin"},"recipientAddress":{"type":"string","description":"Recipient wallet address"},"resourceUrl":{"type":"string","description":"Target API endpoint URL"},"scheme":{"type":"string","description":"MPP payment scheme"},"credentialId":{"type":"string","description":"Unique credential identifier for idempotency"},"sessionId":{"type":"string","description":"MPP session ID"},"intent":{"type":"string","enum":["charge","session"],"description":"Payment intent: charge (one-time) or session (streaming)"},"paymentMethod":{"type":"string","description":"Payment method (tempo, stripe, lightning, card)"},"depositAmount":{"type":"number","description":"Session deposit amount (for session intent)"}},"required":["amount","recipientAddress","resourceUrl"]}}}},"responses":{"200":{"description":"Pre-authorization result (approved/denied)"},"401":{"description":"Authentication required"}}}},"/api/sdk/mpp/record":{"post":{"tags":["mpp"],"summary":"Record MPP payment(s)","description":"Record a single MPP payment or a batch of micropayments. Used by agents that handle MPP payments directly and want to report them to Conto for spend tracking and policy enforcement.","security":[{"sdkKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Total payment amount"},"currency":{"type":"string","description":"Currency symbol. If omitted, Conto resolves it from the wallet chain (for example USDC.e on Tempo mainnet or pathUSD on Tempo testnet)."},"recipientAddress":{"type":"string","description":"Recipient wallet address"},"resourceUrl":{"type":"string","description":"API endpoint URL"},"credentialId":{"type":"string","description":"MPP credential ID"},"scheme":{"type":"string","description":"MPP payment scheme"},"responseCode":{"type":"integer","description":"HTTP response code"},"paymentReceipt":{"type":"string","description":"Payment-Receipt header value"},"txHash":{"type":"string","description":"Onchain transaction hash"},"sessionId":{"type":"string","description":"MPP session ID"},"intent":{"type":"string","enum":["charge","session"],"description":"Payment intent: charge or session"},"paymentMethod":{"type":"string","description":"Payment method used (tempo, stripe, lightning, card)"},"chainId":{"type":"string","description":"Chain ID (e.g. \"42431\" for Tempo, \"8453\" for Base). Defaults to wallet chain if omitted."},"batchItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number"},"resourceUrl":{"type":"string"},"credentialId":{"type":"string"},"responseCode":{"type":"integer"},"responseTimeMs":{"type":"integer"}},"required":["amount","resourceUrl"]},"description":"Batch of individual MPP calls"}},"required":["amount","recipientAddress","resourceUrl"]}}}},"responses":{"201":{"description":"MPP payment(s) recorded"},"401":{"description":"Authentication required"},"409":{"description":"Duplicate credential ID"}}}},"/api/sdk/mpp/services":{"get":{"tags":["mpp"],"summary":"List MPP services used by agent","description":"List all MPP services the agent has interacted with, including spend summaries, price trends, and known endpoints.","security":[{"sdkKeyAuth":[]}],"responses":{"200":{"description":"List of MPP services with spend stats"}}}},"/api/sdk/mpp/budget":{"get":{"tags":["mpp"],"summary":"Check MPP budget remaining","description":"Get MPP budget remaining, burn rate, and projections. Includes daily/weekly/monthly spend, policy limits, and hours until budget exhaustion.","security":[{"sdkKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Optional session ID for session-budget tracking"},"required":false,"name":"sessionId","in":"query"}],"responses":{"200":{"description":"Budget status with burn rate and projections"}}}},"/api/api-keys":{"get":{"tags":["API Keys"],"summary":"List organization API keys","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"responses":{"200":{"description":"List of API keys (prefixes only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}}}}},"post":{"tags":["API Keys"],"summary":"Create organization API key","description":"Create an org-level API key with scoped permissions. The full key is returned only once. Omit `expiresInDays` to create a non-expiring org API key.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"API key created. Full key shown only once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"400":{"description":"Validation error"},"403":{"description":"Only owners can create admin keys"}}}},"/api/transactions":{"get":{"tags":["Transactions"],"summary":"List transactions","description":"List payment transactions for the organization. Filter by status, agent, or amount. Transaction statuses: PENDING, APPROVED, DENIED, CONFIRMED, FAILED.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["PENDING","APPROVED","DENIED","CONFIRMED","FAILED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"integer","default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionListResponse"}}}}}}},"/api/counterparties":{"get":{"tags":["Counterparties"],"summary":"List counterparties","description":"List counterparties (payment recipients) with their trust levels and transaction history. Trust levels: TRUSTED, VERIFIED, UNKNOWN, BLOCKED.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"trustLevel","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"List of counterparties","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyListResponse"}}}}}},"post":{"tags":["Counterparties"],"summary":"Create a counterparty","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCounterpartyRequest"}}}},"responses":{"201":{"description":"Counterparty created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Counterparty"}}}}}}},"/api/alerts":{"get":{"tags":["Alerts"],"summary":"List alerts","description":"List alerts and notifications for the organization. Alert types include: SPEND_LIMIT_WARNING, SPEND_LIMIT_EXCEEDED, UNUSUAL_ACTIVITY, FAILED_TRANSACTION, POLICY_VIOLATION, NEW_COUNTERPARTY, HIGH_VALUE_TRANSACTION, AGENT_SUSPENDED, WALLET_LOW_BALANCE, BLOCKED_ADDRESS. Severities: INFO, WARNING, CRITICAL.","security":[{"sessionAuth":[]},{"orgApiKey":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/AlertDetailStatus"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/AlertSeverity"},"required":false,"name":"severity","in":"query"}],"responses":{"200":{"description":"List of alerts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertListResponse"}}}}}}},"/api/health":{"get":{"tags":[],"summary":"Health check","description":"Check API health status.","security":[],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"healthy"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}},"required":["status","timestamp","version"]}}}}}}}},"webhooks":{}}