{"openapi":"3.1.0","info":{"title":"Colorado Mountain Bank Sandbox API","version":"1.0.0","description":"Fictional demonstration API. No real funds, FDIC insurance, or State of Colorado affiliation."},"servers":[{"url":"http://localhost:4000","description":"Local sandbox"}],"security":[{"sandboxApiKey":[]}],"components":{"securitySchemes":{"sandboxApiKey":{"type":"http","scheme":"bearer","bearerFormat":"CMB sandbox API key"}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Trace identifier returned on all responses."}},"schemas":{"Money":{"type":"object","required":["amountMinor","currency"],"properties":{"amountMinor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"USD"}}},"Problem":{"type":"object","required":["type","title","status","detail","instance"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}},"PaymentItem":{"type":"object","required":["vendor","amountMinor","referenceId"],"properties":{"vendor":{"type":"string","enum":["openai","anthropic","cursor"]},"amountMinor":{"type":"integer","minimum":1},"referenceId":{"type":"string"}}}},"responses":{"Problem":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/v1/fintechs":{"post":{"operationId":"createFintech","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"webhookUrl":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Created"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/api-keys":{"post":{"operationId":"createApiKey","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fintechId","scopes"],"properties":{"fintechId":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["accounts:read","accounts:write","payments:read","payments:write","webhooks:manage"]}}}}}}},"responses":{"201":{"description":"One-time secret display"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/api-keys/{id}/rotate":{"post":{"operationId":"rotateApiKey","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Rotated"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/api-keys/{id}/revoke":{"post":{"operationId":"revokeApiKey","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/fbo/accounts":{"post":{"operationId":"createFboAccount","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","beneficialOwnerId"],"properties":{"name":{"type":"string"},"beneficialOwnerId":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/fbo/accounts/{id}":{"get":{"operationId":"getFboAccount","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Account"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/fbo/accounts/{id}/funding":{"post":{"operationId":"createFunding","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountMinor","currency","referenceId"],"properties":{"amountMinor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"USD"},"referenceId":{"type":"string"}}}}}},"responses":{"202":{"description":"Workflow accepted"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/payment-batches":{"post":{"operationId":"createPaymentBatch","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fboAccountId","referenceId","items"],"properties":{"fboAccountId":{"type":"string"},"referenceId":{"type":"string"},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/PaymentItem"}}}}}}},"responses":{"202":{"description":"Workflow accepted"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/payment-batches/{id}":{"get":{"operationId":"getPaymentBatch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Batch"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/payment-batches/{id}/approve":{"post":{"operationId":"approvePaymentBatch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approverId"],"properties":{"approverId":{"type":"string"}}}}}},"responses":{"202":{"description":"Approval signal accepted"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/payments/{id}":{"get":{"operationId":"getPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/reconciliations/{date}":{"get":{"operationId":"getReconciliation","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Reconciliation"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/webhooks":{"post":{"operationId":"subscribeWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Subscribed"},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"disableWebhook","responses":{"200":{"description":"Disabled"},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/webhooks/{id}/replay":{"post":{"operationId":"replayWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Replay accepted"},"default":{"$ref":"#/components/responses/Problem"}}}}}}