{"openapi":"3.1.0","info":{"title":"Cofferline API","version":"0.1.0","description":"Treasury infrastructure for autonomous agents. Identity is your wallet (SIWE); no email, no CAPTCHA. Structured errors: {code, message, remediation, docs_url, request_id}. Mutations accept Idempotency-Key."},"servers":[{"url":"https://api.dev.cofferline.com"}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","description":"cl_sess_… session token or cl_key_… API key"}},"schemas":{},"parameters":{}},"paths":{"/v1/auth/challenge":{"post":{"tags":["auth"],"summary":"Start SIWE authentication: returns a single-use challenge","requestBody":{"description":"Wallet address to authenticate","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"chain_id":{"type":"integer"}},"required":["address"]}}}},"responses":{"200":{"description":"SIWE challenge (10-minute, single-use nonce)","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"nonce":{"type":"string"},"domain":{"type":"string"},"uri":{"type":"string"},"version":{"type":"string","enum":["1"]},"chain_id":{"type":"integer"},"issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"expiration_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]}},"required":["message","nonce","domain","uri","version","chain_id","issued_at","expiration_time"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Complete SIWE authentication: exchanges a signed challenge for a session","requestBody":{"description":"The signed SIWE message","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"required":["message","signature"]}}}},"responses":{"200":{"description":"Bearer session token (returned once)","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]}},"required":["token","address","expires_at"]}}}},"401":{"description":"Expired/used nonce or invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/quotes":{"post":{"tags":["quotes"],"summary":"Free live quote comparison: best full-size venue quote vs a sliced execution estimate","description":"Unauthenticated and free (edge rate-limited). Every number derives from live venue quote APIs at request time; the sliced figure is a real per-slice quote extrapolated linearly and labeled an estimate.","requestBody":{"description":"Pair and size to quote","content":{"application/json":{"schema":{"type":"object","properties":{"chain_id":{"type":"integer","default":8453},"sell_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"buy_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"sell_amount":{"type":"string","pattern":"^[1-9]\\d*$"}},"required":["sell_token","buy_token","sell_amount"]}}}},"responses":{"200":{"description":"Live comparison","content":{"application/json":{"schema":{"type":"object","properties":{"chain_id":{"type":"integer"},"sell_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"buy_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"sell_amount":{"type":"string"},"quoted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"full_size":{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string"},"buy_amount":{"type":"string"},"fee_amount":{"type":"string"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]}},"required":["venue","buy_amount","fee_amount","expires_at"]},"minItems":1},"best_venue":{"type":"string"},"best_buy_amount":{"type":"string"}},"required":["quotes","best_venue","best_buy_amount"]},"sliced_plan":{"type":"object","properties":{"slice_count":{"type":"integer","minimum":1},"slice_sell_amount":{"type":"string"},"per_slice_buy_amount":{"type":"string"},"estimated_buy_total":{"type":"string"},"venue":{"type":"string"}},"required":["slice_count","slice_sell_amount","per_slice_buy_amount","estimated_buy_total","venue"]},"expected_savings":{"type":"object","properties":{"buy_amount":{"type":"string"},"bps":{"type":"number"}},"required":["buy_amount","bps"]}},"required":["chain_id","sell_token","buy_token","sell_amount","quoted_at","full_size","sliced_plan","expected_savings"]}}}},"400":{"description":"Invalid request or unsupported chain","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}},"502":{"description":"No venue answered","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/me":{"get":{"tags":["auth"],"summary":"Identify the authenticated account","security":[{"Bearer":[]}],"responses":{"200":{"description":"The wallet address and credential kind","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"auth_kind":{"type":"string","enum":["session","api_key"]}},"required":["address","auth_kind"]}}}},"401":{"description":"Missing or invalid credential","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/keys":{"post":{"tags":["keys"],"summary":"Create an API key (raw token returned exactly once)","security":[{"Bearer":[]}],"requestBody":{"description":"Optional name and scopes","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1}}}}}},"responses":{"201":{"description":"The new key; store the token now","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token":{"type":"string"},"name":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]}},"required":["id","token","name","scopes","created_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}},"403":{"description":"Requires session or admin-scoped key","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}},"get":{"tags":["keys"],"summary":"List this account's API keys (never returns token material)","security":[{"Bearer":[]}],"responses":{"200":{"description":"All keys including revoked ones","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","scopes","created_at","last_used_at","revoked_at"]}}},"required":["keys"]}}}},"403":{"description":"Requires session or admin-scoped key","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/keys/{id}":{"delete":{"tags":["keys"],"summary":"Revoke an API key","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Key revoked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revoked":{"type":"boolean","enum":[true]}},"required":["id","revoked"]}}}},"404":{"description":"No active key with that id on this account","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/policies":{"put":{"tags":["policies"],"summary":"Submit a policy document; creates immutable version n+1 for its wallet","description":"Versions are hash-addressed and append-only — history is never rewritten. Re-submitting the latest document verbatim returns the existing version instead of minting a duplicate.","security":[{"Bearer":[]}],"requestBody":{"description":"Policy document (schema: /schemas/policy-v1.json)","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"chain_id":{"type":"integer"},"float":{"type":"object","properties":{"token":{"type":"string"},"min":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"target":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"sweep_above_pct":{"type":"integer","minimum":1,"maximum":100}},"required":["token","min","target","sweep_above_pct"]},"execution":{"type":"object","properties":{"max_slippage_bps":{"type":"integer","minimum":1,"maximum":10000},"max_slice_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"deadline_minutes":{"type":"integer","minimum":1},"venues":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["max_slippage_bps","max_slice_usd","deadline_minutes","venues"]},"gas":{"type":"object","properties":{"floor":{"type":"string","pattern":"^\\d+(\\.\\d{1,18})?$"},"target":{"type":"string","pattern":"^\\d+(\\.\\d{1,18})?$"},"strategy":{"type":"string","enum":["topup"]}},"required":["floor","target","strategy"]},"stables":{"type":"object","properties":{"canonical":{"type":"string"},"tolerance_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["canonical","tolerance_usd"]},"spend":{"type":"object","properties":{"daily_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"per_tx_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"velocity_per_hour":{"type":"integer","minimum":1},"token_allowlist":{"type":"array","items":{"type":"string"},"minItems":1},"counterparty_screening_above_usd":{"type":["string","null"],"pattern":"^\\d+(\\.\\d{1,6})?$"},"human_approval_above_usd":{"type":["string","null"],"pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["daily_usd","per_tx_usd","velocity_per_hour","token_allowlist","counterparty_screening_above_usd","human_approval_above_usd"]},"alerts":{"type":"object","properties":{"webhook":{"type":["string","null"],"format":"uri"},"events":{"type":"array","items":{"type":"string"}}},"required":["webhook","events"]}},"required":["version","wallet","chain_id","float","execution","gas","stables","spend","alerts"]}}}},"responses":{"200":{"description":"Unchanged — latest version already matches","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"version":{"type":"integer"},"hash":{"type":"string"},"created_at":{"type":"string"},"unchanged":{"type":"boolean"}},"required":["wallet","version","hash","created_at"]}}}},"201":{"description":"New immutable version created","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"version":{"type":"integer"},"hash":{"type":"string"},"created_at":{"type":"string"},"unchanged":{"type":"boolean"}},"required":["wallet","version","hash","created_at"]}}}},"400":{"description":"Document failed validation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}},"get":{"tags":["policies"],"summary":"List policy versions (full immutable history, newest first)","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"required":false,"name":"wallet","in":"query"}],"responses":{"200":{"description":"All versions, optionally filtered by wallet","content":{"application/json":{"schema":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"version":{"type":"integer"},"hash":{"type":"string"},"created_at":{"type":"string"},"unchanged":{"type":"boolean"},"document":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"chain_id":{"type":"integer"},"float":{"type":"object","properties":{"token":{"type":"string"},"min":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"target":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"sweep_above_pct":{"type":"integer","minimum":1,"maximum":100}},"required":["token","min","target","sweep_above_pct"]},"execution":{"type":"object","properties":{"max_slippage_bps":{"type":"integer","minimum":1,"maximum":10000},"max_slice_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"deadline_minutes":{"type":"integer","minimum":1},"venues":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["max_slippage_bps","max_slice_usd","deadline_minutes","venues"]},"gas":{"type":"object","properties":{"floor":{"type":"string","pattern":"^\\d+(\\.\\d{1,18})?$"},"target":{"type":"string","pattern":"^\\d+(\\.\\d{1,18})?$"},"strategy":{"type":"string","enum":["topup"]}},"required":["floor","target","strategy"]},"stables":{"type":"object","properties":{"canonical":{"type":"string"},"tolerance_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["canonical","tolerance_usd"]},"spend":{"type":"object","properties":{"daily_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"per_tx_usd":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"velocity_per_hour":{"type":"integer","minimum":1},"token_allowlist":{"type":"array","items":{"type":"string"},"minItems":1},"counterparty_screening_above_usd":{"type":["string","null"],"pattern":"^\\d+(\\.\\d{1,6})?$"},"human_approval_above_usd":{"type":["string","null"],"pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["daily_usd","per_tx_usd","velocity_per_hour","token_allowlist","counterparty_screening_above_usd","human_approval_above_usd"]},"alerts":{"type":"object","properties":{"webhook":{"type":["string","null"],"format":"uri"},"events":{"type":"array","items":{"type":"string"}}},"required":["webhook","events"]}},"required":["version","wallet","chain_id","float","execution","gas","stables","spend","alerts"]}},"required":["wallet","version","hash","created_at","document"]}}},"required":["policies"]}}}}}}},"/v1/events":{"get":{"tags":["events"],"summary":"Poll typed events with a monotonic cursor","description":"Events are append-only; the id is the cursor. Pass ?cursor=<last seen id> to receive strictly newer events in order. The polling alternative to webhooks.","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"required":false,"name":"wallet","in":"query"},{"schema":{"type":"string","enum":["policy.updated","intent.created","intent.executing","intent.filled","intent.cancelled","intent.aborted","policy.violated","budget.threshold","gas.low","delegation.created","delegation.expiring","delegation.revoked"]},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"Ordered events after the cursor","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["policy.updated","intent.created","intent.executing","intent.filled","intent.cancelled","intent.aborted","policy.violated","budget.threshold","gas.low","delegation.created","delegation.expiring","delegation.revoked"]},"wallet":{"type":["string","null"],"pattern":"^0x[0-9a-fA-F]{40}$"},"payload":{"type":"object","additionalProperties":{}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]}},"required":["id","type","wallet","payload","created_at"]}},"next_cursor":{"type":["integer","null"]}},"required":["events","next_cursor"]}}}}}}},"/v1/webhooks/secret":{"get":{"tags":["webhooks"],"summary":"Fetch (creating if needed) the HMAC secret used to sign deliveries to you","security":[{"Bearer":[]}],"responses":{"200":{"description":"Verify x-cofferline-signature with HMAC-SHA256 over the raw body","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"]}}}}}}},"/v1/webhooks/failures":{"get":{"tags":["webhooks"],"summary":"Dead-lettered deliveries for this account (at-least-once exhausted retries)","security":[{"Bearer":[]}],"responses":{"200":{"description":"Most recent first","content":{"application/json":{"schema":{"type":"object","properties":{"failures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"url":{"type":"string"},"event_id":{"type":"number"},"event_type":{"type":"string"},"failed_at":{"type":"string"}},"required":["id","url","event_id","event_type","failed_at"]}}},"required":["failures"]}}}}}}},"/v1/intents":{"post":{"tags":["intents"],"summary":"Create a conversion intent (enforced against the wallet's active policy)","security":[{"Bearer":[]}],"requestBody":{"description":"The intent","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"kind":{"type":"string","enum":["conversion"]},"sell_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"buy_token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"sell_amount":{"type":"string","pattern":"^[1-9]\\d*$"},"max_slippage_bps":{"type":"integer","minimum":1},"venues":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["wallet","kind","sell_token","buy_token","sell_amount"]}}}},"responses":{"201":{"description":"Planned intent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"kind":{"type":"string","enum":["conversion","gas_topup"]},"status":{"type":"string","enum":["planned","executing","filled","cancelled","aborted"]},"policy_version":{"type":"integer"},"policy_hash":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"report":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":{}}]}},"required":["id","wallet","kind","status","policy_version","policy_hash","params","created_at","updated_at","report"]}}}},"404":{"description":"No policy exists for the wallet","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}},"422":{"description":"POLICY_VIOLATION — request exceeds the active policy","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}},"get":{"tags":["intents"],"summary":"List intents, newest first","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"required":false,"name":"wallet","in":"query"}],"responses":{"200":{"description":"Intents","content":{"application/json":{"schema":{"type":"object","properties":{"intents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"kind":{"type":"string","enum":["conversion","gas_topup"]},"status":{"type":"string","enum":["planned","executing","filled","cancelled","aborted"]},"policy_version":{"type":"integer"},"policy_hash":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"report":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":{}}]}},"required":["id","wallet","kind","status","policy_version","policy_hash","params","created_at","updated_at","report"]}}},"required":["intents"]}}}}}}},"/v1/intents/{id}":{"get":{"tags":["intents"],"summary":"Fetch an intent","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The intent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"kind":{"type":"string","enum":["conversion","gas_topup"]},"status":{"type":"string","enum":["planned","executing","filled","cancelled","aborted"]},"policy_version":{"type":"integer"},"policy_hash":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"report":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":{}}]}},"required":["id","wallet","kind","status","policy_version","policy_hash","params","created_at","updated_at","report"]}}}},"404":{"description":"Unknown intent","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}},"/v1/intents/{id}/cancel":{"post":{"tags":["intents"],"summary":"Cancel a planned intent","security":[{"Bearer":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"kind":{"type":"string","enum":["conversion","gas_topup"]},"status":{"type":"string","enum":["planned","executing","filled","cancelled","aborted"]},"policy_version":{"type":"integer"},"policy_hash":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}]},"report":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":{}}]}},"required":["id","wallet","kind","status","policy_version","policy_hash","params","created_at","updated_at","report"]}}}},"404":{"description":"Unknown intent or not cancellable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"docs_url":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","remediation","docs_url","request_id"]}}}}}}}},"webhooks":{}}