{"openapi":"3.1.0","info":{"version":"0.0.1","title":"Dino API","description":"Dino provides governed spend for agents and programmable business-finance APIs. The flagship public flow is Dino spending keys against /v1 for policy, approvals, and ledger-backed spend requests.\n\n**Scalar sidebar:** *Agent Bank* — spend, checkout, cross-team transfers, crypto payouts (Solana USDC), treasury. *Books* — accounting REST (transactions, invoices, bank accounts, reports, inbox, …). *Workspace* — OAuth, teams, tracker, webhooks, integrations. OAuth access tokens from `/oauth/token` work on **protected** routes (e.g. `/treasury/*`); they are **not** accepted on public `/v1` spend routes—use a `din_…` spending key or scoped `dba_…` team API key there.\n\n**New to agent spend?** Copy-paste shell, minimal Node harness, and tool-boundary rules: [Agent integration starter](https://dino.id/docs/agent-integration-starter).\n**Solana USDC payouts:** public `/v1/crypto/*` guide: [Crypto payouts API — Solana USDC](https://dino.id/docs/crypto-payouts-api-v1-solana-usdc).","contact":{"name":"Dino Support","email":"engineer@dino.id","url":"https://dino.id"},"license":{"name":"AGPL-3.0 license","url":"https://github.com/dino-ai/dino/blob/main/LICENSE"}},"servers":[{"url":"https://api.dino.id","description":"Production API"}],"security":[{"token":[]},{"oauth2":[]}],"tags":[{"name":"Agent spend","description":"Governed spend for agents using Dino spending keys, policy evaluation, approvals, and ledger-backed audit trails. Runnable shell + localhost harness: see Agent integration starter in product docs (linked from the API introduction above)."},{"name":"Spend requests","description":"Public `/v1/spend-requests` and related spend decision APIs (Dino spending key or scoped team API key)."},{"name":"Checkout","description":"JIT purchase / checkout intents and card credential flows on `/v1/checkout/*`."},{"name":"Cross-team transfers","description":"Workspace-to-workspace balance moves and payment-code flows under `/v1/transfers/*`."},{"name":"Treasury","description":"Team-scoped treasury helpers (accounts, approvals, ledger) for agent spend — OAuth / session APIs under `/treasury/*`."},{"name":"Bank Accounts","description":"Manage bank accounts"},{"name":"Customers","description":"Manage customers"},{"name":"Desktop","description":"Desktop app endpoints"},{"name":"Documents","description":"Manage documents"},{"name":"Files","description":"File operations"},{"name":"Inbox","description":"Manage inbox items"},{"name":"Integrations","description":"Integration endpoints"},{"name":"Invoice Payments","description":"Invoice payment processing"},{"name":"Invoices","description":"Manage invoices"},{"name":"Notifications","description":"Manage notifications"},{"name":"OAuth","description":"Register OAuth apps and run the authorization-code flow (`/oauth/authorize`, `/oauth/token`). Tokens are `Bearer mid_access_token_…` and work on **protected** APIs alongside session JWTs and team API keys. They do **not** authenticate public `/v1` agent-spend routes—use a Dino spending key or team API key for those."},{"name":"Reports","description":"Financial reports"},{"name":"Search","description":"Search endpoints"},{"name":"Tags","description":"Manage tags"},{"name":"Teams","description":"Manage teams"},{"name":"Tracker Entries","description":"Manage time tracker entries"},{"name":"Tracker Projects","description":"Manage tracker projects"},{"name":"Tracker Timer","description":"Timer operations"},{"name":"Transactions","description":"Manage transactions"},{"name":"Users","description":"Manage users"},{"name":"Webhooks","description":"Webhook endpoints"}],"x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":300000,"exponent":1.5},"statusCodes":["5XX"],"retryConnectionErrors":true},"components":{"securitySchemes":{"token":{"type":"http","scheme":"bearer","description":"Bearer authentication. Most protected Dino APIs use OAuth or generic team API keys; the public agent-spend /v1 flow uses Dino spending keys.","x-speakeasy-example":"DINO_API_KEY"},"dinoSpendKey":{"type":"http","scheme":"bearer","description":"Dino spending key used for the public agent-spend /v1 API. Present as Authorization: Bearer din_... or din_test_...","x-speakeasy-example":"DINO_SPEND_KEY"},"workspaceApiKey":{"type":"http","scheme":"bearer","description":"Team workspace API key (dba_…) created in the dashboard. Use granular scopes: spend.read, spend.write, accounts.read. See GET /v1/accounts and team-key-specific query parameters on other /v1 routes.","x-speakeasy-example":"DINO_TEAM_API_KEY"},"oauth2":{"type":"oauth2","description":"OAuth 2.0 authorization code + PKCE. Use the issued access token on protected REST routes—not on public `/v1` spend endpoints (those require `din_…` or `dba_…` keys).","flows":{"authorizationCode":{"authorizationUrl":"https://app.dino.id/oauth/authorize","tokenUrl":"https://dino-api-production.up.railway.app/oauth/token","scopes":{"bank-accounts.read":"Read bank accounts","bank-accounts.write":"Write bank accounts","customers.read":"Read customers","customers.write":"Write customers","documents.read":"Read documents","documents.write":"Write documents","inbox.read":"Read inbox","inbox.write":"Write inbox","invoices.read":"Read invoices","invoices.write":"Write invoices","reports.read":"Read reports","search.read":"Read search","tags.read":"Read tags","tags.write":"Write tags","teams.read":"Read teams","teams.write":"Write teams","tracker-entries.read":"Read tracker entries","tracker-entries.write":"Write tracker entries","tracker-projects.read":"Read tracker projects","tracker-projects.write":"Write tracker projects","transactions.read":"Read transactions","transactions.write":"Write transactions","users.read":"Read users","users.write":"Write users","notifications.read":"Read notifications","notifications.write":"Write notifications","spend.read":"Read agent spend (team API key /v1)","spend.write":"Create or cancel agent spend (team API key /v1)","accounts.read":"List agent accounts and read balances (team API key /v1)"}}}}},"schemas":{"OAuthErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error code","example":"invalid_request"},"error_description":{"type":"string","description":"Human-readable error description","example":"The request is missing a required parameter"},"error_uri":{"type":"string","format":"uri","description":"URI to a human-readable error page","example":"https://dino.id/docs/oauth-api-endpoints"},"state":{"type":"string","maxLength":1024,"description":"Opaque state parameter from the original request","example":"abc123xyz789_secure-random-state-value"}},"required":["error"]},"NotificationsResponseSchema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationSchema"},"description":"Array of notifications"},"meta":{"type":"object","properties":{"cursor":{"type":["string","null"],"description":"Cursor for pagination (null if no more pages)","example":"40"},"hasPreviousPage":{"type":"boolean","description":"Whether there are previous pages available","example":true},"hasNextPage":{"type":"boolean","description":"Whether there are more pages available","example":false}},"required":["cursor","hasPreviousPage","hasNextPage"],"description":"Pagination metadata"}},"required":["data","meta"]},"NotificationSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the notification","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"ISO timestamp when the notification was created","example":"2024-04-15T09:00:00.000Z"},"teamId":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"userId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user (if applicable)","example":"c2d3e4f5-a6b7-8901-bcde-f23456789012"},"type":{"type":"string","description":"Type of notification","example":"transactions_created"},"priority":{"type":"integer","minimum":1,"maximum":10,"description":"Priority level of the notification (1-3 = user notifications, 4-10 = system)","example":3},"source":{"type":"string","enum":["system","user"],"description":"Source of the notification","example":"system"},"status":{"type":"string","enum":["unread","read","archived"],"description":"Current status of the notification","example":"unread"},"metadata":{"type":"object","additionalProperties":{},"description":"Additional metadata for the notification","example":{"transactionCount":5,"dateRange":{"from":"2024-04-01","to":"2024-04-15"}}},"lastUsedAt":{"type":["string","null"],"description":"ISO timestamp when the notification was last used by the system","example":"2024-04-15T11:00:00.000Z"}},"required":["id","createdAt","teamId","userId","type","priority","source","status","metadata","lastUsedAt"]},"NotificationResponseSchema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/NotificationSchema"},{"description":"The updated notification"}]}},"required":["data"]},"UpdateAllNotificationsStatusResponseSchema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationSchema"},"description":"Array of updated notifications"}},"required":["data"]},"UpdateAllNotificationsStatusSchema":{"type":"object","properties":{"status":{"type":"string","enum":["unread","read","archived"],"description":"The new status to apply to all notifications for the authenticated user","example":"read"}},"required":["status"]},"TransactionResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the transaction","example":"b3b7c8e2-1f2a-4c3d-9e4f-5a6b7c8d9e0f"},"name":{"type":"string","description":"Name or description of the transaction","example":"Office Supplies Purchase"},"amount":{"type":"number","description":"Monetary amount of the transaction","example":150.75},"taxAmount":{"type":["number","null"],"description":"Tax amount of the transaction","example":15.07},"taxRate":{"type":["number","null"],"description":"Tax rate of the transaction","example":10},"taxType":{"type":["string","null"],"description":"Tax type of the transaction","example":"VAT"},"currency":{"type":"string","description":"Currency code of the transaction in ISO 4217 format","example":"USD"},"counterpartyName":{"type":["string","null"],"description":"Name of the counterparty","example":"Spotify AB"},"date":{"type":"string","description":"Date and time of the transaction in ISO 8601 format","example":"2024-05-01T12:00:00.000Z"},"category":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the category","example":"office-supplies"},"name":{"type":"string","description":"Display name of the category","example":"Office Supplies"},"color":{"type":"string","description":"Hex color code associated with the category for UI display","example":"#FF5733"},"taxRate":{"type":["number","null"],"description":"Tax rate of the category","example":10},"taxType":{"type":["string","null"],"description":"Tax type of the category","example":"VAT"},"slug":{"type":"string","description":"URL-friendly slug of the category","example":"office-supplies"}},"required":["id","name","color","taxRate","taxType","slug"],"description":"Category information assigned to the transaction for organization","example":{"id":"office-supplies","name":"Office Supplies","color":"#FF5733","slug":"office-supplies","taxRate":10,"taxType":"VAT"}},"status":{"type":"string","description":"Current status of the transaction","example":"completed"},"internal":{"type":["boolean","null"],"description":"Whether the transaction is internal (between own accounts)","example":false},"recurring":{"type":["boolean","null"],"description":"Whether the transaction is part of a recurring series","example":false},"manual":{"type":["boolean","null"],"description":"Whether the transaction was created manually (via API/form) rather than imported from bank connections","example":false},"frequency":{"type":["string","null"],"description":"Frequency of the recurring transaction if applicable (weekly, monthly, annually, irregular)","example":"monthly"},"isFulfilled":{"type":"boolean","description":"Whether the transaction has been fulfilled or processed","example":true},"note":{"type":["string","null"],"description":"Optional note or memo attached to the transaction","example":"Paid with company credit card for office renovation"},"account":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the bank account","example":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388"},"name":{"type":["string","null"],"description":"Display name of the bank account","example":"Company Credit Card"},"currency":{"type":["string","null"],"description":"Currency of the bank account in ISO 4217 format","example":"USD"},"connection":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the bank connection","example":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388"},"name":{"type":"string","description":"Name of the bank institution","example":"Chase Bank"},"logoUrl":{"type":["string","null"],"description":"URL to the bank institution's logo image","example":"https://cdn.dino.id/logos/chase-bank.png"}},"required":["id","name","logoUrl"],"description":"Bank connection information associated with the account. Null for manual accounts.","example":{"id":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388","name":"Chase Bank","logoUrl":"https://cdn.dino.id/logos/chase-bank.png"}}},"required":["id","name","currency","connection"],"description":"Bank account information associated with the transaction. Null when no account is linked.","example":{"id":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388","name":"Company Credit Card","currency":"USD","connection":{"id":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388","name":"Chase Bank","logoUrl":"https://cdn.dino.id/logos/chase-bank.png"}}},"tags":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the tag","example":"b7e2f8c1-3d4a-4e2b-9f1a-2c3d4e5f6a7b"},"name":{"type":["string","null"],"description":"Display name of the tag","example":"invoice"}},"required":["id","name"]},"description":"Array of tags associated with the transaction for categorization and filtering","example":[{"id":"b7e2f8c1-3d4a-4e2b-9f1a-2c3d4e5f6a7b","name":"invoice"},{"id":"c8e2f8c1-3d4a-4e2b-9f1a-2c3d4e5f6a7c","name":"travel"}]},"attachments":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the attachment","example":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388"},"path":{"type":"array","items":{"type":"string"},"description":"Array of path segments for the attachment file storage location","example":["dd6a039e-d071-423a-9a4d-9ba71325d890","transactions","1d2c3753-79d7-45b0-9c40-60f482bac8e8","receipt.pdf"]},"size":{"type":"number","description":"Size of the attachment file in bytes","example":1928716},"type":{"type":"string","description":"MIME type of the attachment file","example":"application/pdf"},"filename":{"type":["string","null"],"description":"Original filename of the attachment when uploaded","example":"receipt.pdf"}},"required":["id","path","size","type","filename"]},"description":"Array of file attachments associated with the transaction (receipts, invoices, etc.)","example":[{"id":"b7e2f8c1-3d4a-4e2b-9f1a-2c3d4e5f6a7b","path":["e1f2d3c4-b5a6-7d8e-9f0a-1b2c3d4e5f6a","transactions","9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d","receipt.pdf"],"size":1928716,"type":"application/pdf","filename":"receipt.pdf"}]}},"required":["id","name","amount","taxAmount","taxRate","taxType","currency","counterpartyName","date","category","status","internal","recurring","manual","frequency","isFulfilled","note","account","tags","attachments"]},"CreateTransactionAttachment":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"},"description":"Path(s) of the attachment file(s)."},"name":{"type":"string","description":"Name of the attachment file."},"size":{"type":"number","description":"Size of the attachment file in bytes."},"type":{"type":"string","description":"MIME type of the attachment file."}},"required":["path","name","size","type"]},"TagsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TagResponse"},"description":"List of tags."}},"required":["data"]},"TagResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the tag.","example":"b3b7c8e2-1f2a-4c3d-9e4f-5a6b7c8d9e0f"},"name":{"type":"string","description":"The name of the tag.","example":"Important"}},"required":["id","name"]},"CreateTag":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tag.","example":"Important"}},"required":["name"]},"GetRevenueResponseSchema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/RevenueSummary"},"meta":{"$ref":"#/components/schemas/RevenueMeta"},"result":{"$ref":"#/components/schemas/RevenueResultArray"}},"required":["summary","meta","result"]},"RevenueSummary":{"type":"object","properties":{"currentTotal":{"type":"number","description":"Total revenue for the current period","example":10000},"prevTotal":{"type":"number","description":"Total revenue for the previous period","example":8000},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["currentTotal","prevTotal","currency"]},"RevenueMeta":{"type":"object","properties":{"type":{"type":"string","enum":["revenue"],"description":"Type of metric","example":"revenue"},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["type","currency"]},"RevenueResultArray":{"type":"array","items":{"$ref":"#/components/schemas/RevenueResultItem"}},"RevenueResultItem":{"type":"object","properties":{"date":{"type":"string","description":"Date for the metric (ISO 8601)","example":"2023-01-31"},"percentage":{"$ref":"#/components/schemas/RevenuePercentage"},"current":{"$ref":"#/components/schemas/RevenueCurrent"},"previous":{"$ref":"#/components/schemas/RevenuePrevious"}},"required":["date","percentage","current","previous"]},"RevenuePercentage":{"type":"object","properties":{"value":{"type":"number","description":"Percentage change compared to previous period","example":25},"status":{"type":"string","enum":["negative","positive"],"description":"Status of the change","example":"positive"}},"required":["value","status"]},"RevenueCurrent":{"type":"object","properties":{"date":{"type":"string","description":"Date for the current value","example":"2023-01-31"},"value":{"type":"number","description":"Current value","example":1000},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["date","value","currency"]},"RevenuePrevious":{"type":"object","properties":{"date":{"type":"string","description":"Date for the previous value","example":"2022-01-31"},"value":{"type":"number","description":"Previous value","example":800},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["date","value","currency"]},"GetProfitResponseSchema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/ProfitSummary"},"meta":{"$ref":"#/components/schemas/ProfitMeta"},"result":{"$ref":"#/components/schemas/ProfitResultArray"}},"required":["summary","meta","result"]},"ProfitSummary":{"type":"object","properties":{"currentTotal":{"type":"number","description":"Total profit for the current period","example":10000},"prevTotal":{"type":"number","description":"Total profit for the previous period","example":8000},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["currentTotal","prevTotal","currency"]},"ProfitMeta":{"type":"object","properties":{"type":{"type":"string","enum":["profit"],"description":"Type of metric","example":"profit"},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["type","currency"]},"ProfitResultArray":{"type":"array","items":{"$ref":"#/components/schemas/ProfitResultItem"}},"ProfitResultItem":{"type":"object","properties":{"date":{"type":"string","description":"Date for the metric (ISO 8601)","example":"2023-01-31"},"percentage":{"$ref":"#/components/schemas/ProfitPercentage"},"current":{"$ref":"#/components/schemas/ProfitCurrent"},"previous":{"$ref":"#/components/schemas/ProfitPrevious"}},"required":["date","percentage","current","previous"]},"ProfitPercentage":{"type":"object","properties":{"value":{"type":"number","description":"Percentage change compared to previous period","example":25},"status":{"type":"string","enum":["negative","positive"],"description":"Status of the change","example":"positive"}},"required":["value","status"]},"ProfitCurrent":{"type":"object","properties":{"date":{"type":"string","description":"Date for the current value","example":"2023-01-31"},"value":{"type":"number","description":"Current value","example":1000},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["date","value","currency"]},"ProfitPrevious":{"type":"object","properties":{"date":{"type":"string","description":"Date for the previous value","example":"2022-01-31"},"value":{"type":"number","description":"Previous value","example":800},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"}},"required":["date","value","currency"]},"GetBurnRateResponseSchema":{"type":"array","items":{"$ref":"#/components/schemas/BurnRateItem"}},"BurnRateItem":{"type":"object","properties":{"date":{"type":"string","description":"Date for the burn rate value","example":"2024-01-01"},"value":{"type":"number","description":"Burn rate value for the given date","example":647366.44},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"SEK"}},"required":["date","value","currency"]},"GetRunwayResponseSchema":{"type":"object","properties":{"months":{"type":"number","description":"Number of months of runway remaining, based on current burn rate and available cash."},"medianBurn":{"type":"number","description":"Median monthly burn rate (last 3 completed months) used to compute runway."}},"required":["months","medianBurn"]},"GetExpensesResponseSchema":{"type":"object","properties":{"summary":{"type":"object","properties":{"averageExpense":{"type":"number","description":"Average expense over the period","example":121054.86},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"SEK"}},"required":["averageExpense","currency"]},"meta":{"type":"object","properties":{"type":{"type":"string","description":"Type of metric","example":"expense"},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"SEK"}},"required":["type","currency"]},"result":{"$ref":"#/components/schemas/ExpensesResultArray"}},"required":["summary","meta","result"]},"ExpensesResultArray":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Date for the expense value","example":"2024-01-01 00:00:00"},"value":{"type":"number","description":"Expense value for the given date","example":637898.68},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"SEK"},"recurring":{"type":"number","description":"Recurring expense value for the given date","example":9467.76},"total":{"type":"number","description":"Total expense for the given date","example":647366.44}},"required":["date","value","currency","recurring","total"]}},"SpendingResultArray":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Spending category name","example":"Taxes"},"slug":{"type":"string","description":"Spending category slug","example":"taxes"},"amount":{"type":"number","description":"Amount spent in this category","example":-1256445},"currency":{"type":"string","description":"Currency code (ISO 4217)","example":"SEK"},"color":{"type":"string","description":"Color code for the category","example":"#8492A6"},"percentage":{"type":"number","description":"Percentage of total spending for this category","example":44}},"required":["name","slug","amount","currency","color","percentage"]}},"TrackerProjectsResponse":{"type":"object","properties":{"meta":{"type":"object","properties":{"hasNextPage":{"type":"boolean","description":"Whether there are more projects available on the next page","example":true},"hasPreviousPage":{"type":"boolean","description":"Whether there are more projects available on the previous page","example":false}},"required":["hasNextPage","hasPreviousPage"],"description":"Pagination metadata for the projects response"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TrackerProjectResponse"},"description":"Array of tracker projects matching the query criteria"}},"required":["meta","data"]},"TrackerProjectResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b7e6c8e2-1f2a-4c3b-9e2d-1a2b3c4d5e6f"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign"},"description":{"type":["string","null"],"description":"Detailed description of the project","example":"Complete redesign of the company website with modern UI/UX and improved performance"},"status":{"type":"string","enum":["in_progress","completed"],"description":"Current status of the project","example":"in_progress"},"estimate":{"type":["number","null"],"description":"Estimated total hours required to complete the project","example":120},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-05-01T12:00:00.000Z"},"totalDuration":{"type":["number","null"],"description":"Total tracked time for the project in seconds","example":43200},"totalAmount":{"type":"number","description":"Total monetary amount earned from the project","example":3600},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"a1b2c3d4-e5f6-7890-abcd-1234567890ef"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"website":{"type":"string","description":"Website URL of the customer","example":"https://acme.com"}},"required":["id","name","website"],"description":"Customer information associated with the project"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"d1e2f3a4-b5c6-7890-abcd-1234567890ef"},"name":{"type":"string","description":"Display name of the tag","example":"Design"}},"required":["id","name"]},"description":"Array of tags associated with the project"},"users":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"f1e2d3c4-b5a6-7890-abcd-1234567890ef"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","format":"uri","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"]},"description":"Array of users assigned to work on the project"}},"required":["id","name","description","status","estimate","currency","createdAt","totalDuration","totalAmount","customer","tags","users"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"Internal Server Error"},"code":{"type":"integer","description":"HTTP status code","example":500}},"required":["error"]}},"parameters":{}},"paths":{"/oauth/register":{"post":{"summary":"Dynamic Client Registration","operationId":"postOAuthRegister","description":"Register an OAuth client dynamically (RFC 7591). Used by MCP clients like ChatGPT and Claude.","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_name":{"type":"string","minLength":1,"maxLength":256,"description":"Human-readable name of the client","example":"ChatGPT"},"redirect_uris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"description":"Array of redirect URIs","example":["https://chatgpt.com/connector/oauth/callback"]},"grant_types":{"type":"array","items":{"type":"string"},"default":["authorization_code","refresh_token"],"description":"Requested grant types","example":["authorization_code","refresh_token"]},"token_endpoint_auth_method":{"type":"string","default":"none","description":"Token endpoint authentication method","example":"none"},"scope":{"type":"string","description":"Space-separated requested scopes","example":"transactions.read invoices.read"},"logo_uri":{"type":"string","format":"uri","description":"URL of the client logo","example":"https://example.com/logo.png"},"client_uri":{"type":"string","format":"uri","description":"URL of the client homepage","example":"https://example.com"},"response_types":{"type":"array","items":{"type":"string"},"description":"Requested response types","example":["code"]}},"required":["client_name","redirect_uris"]}}}},"responses":{"201":{"description":"Client registered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Assigned client ID","example":"mid_client_abcdef123456789"},"client_name":{"type":"string","description":"Human-readable name of the client","example":"ChatGPT"},"redirect_uris":{"type":"array","items":{"type":"string","format":"uri"},"description":"Registered redirect URIs","example":["https://chatgpt.com/connector/oauth/callback"]},"grant_types":{"type":"array","items":{"type":"string"},"description":"Granted grant types","example":["authorization_code","refresh_token"]},"token_endpoint_auth_method":{"type":"string","description":"Token endpoint authentication method","example":"none"},"response_types":{"type":"array","items":{"type":"string"},"description":"Supported response types","example":["code"]}},"required":["client_id","client_name","redirect_uris","grant_types","token_endpoint_auth_method","response_types"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}}}}},"/oauth/authorize":{"get":{"summary":"OAuth Authorization Endpoint","operationId":"getOAuthAuthorization","description":"Initiate OAuth authorization flow and get consent screen information","tags":["OAuth"],"parameters":[{"schema":{"type":"string","enum":["code"],"description":"OAuth response type, must be 'code'","example":"code"},"required":true,"description":"OAuth response type, must be 'code'","name":"response_type","in":"query"},{"schema":{"type":"string","description":"Client ID of the OAuth application","example":"mid_client_abcdef123456789"},"required":true,"description":"Client ID of the OAuth application","name":"client_id","in":"query"},{"schema":{"type":"string","format":"uri","description":"Redirect URI for OAuth callback","example":"https://myapp.com/callback"},"required":true,"description":"Redirect URI for OAuth callback","name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"Space-separated list of requested scopes","example":"transactions.read invoices.read"},"required":true,"description":"Space-separated list of requested scopes","name":"scope","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Opaque state parameter for CSRF protection","example":"abc123xyz789_secure-random-state-value"},"required":true,"description":"Opaque state parameter for CSRF protection","name":"state","in":"query"},{"schema":{"type":"string","description":"Code challenge for PKCE (S256)","example":"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"},"required":false,"description":"Code challenge for PKCE (S256)","name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"],"description":"Code challenge method, must be S256","example":"S256"},"required":false,"description":"Code challenge method, must be S256","name":"code_challenge_method","in":"query"},{"schema":{"type":"string","format":"uri","description":"Resource parameter per RFC 9728 — identifies the MCP server","example":"https://api.dino.id"},"required":false,"description":"Resource parameter per RFC 9728 — identifies the MCP server","name":"resource","in":"query"}],"responses":{"200":{"description":"Application information for consent screen","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Application ID","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Application name","example":"My Raycast Extension"},"description":{"type":["string","null"],"description":"Application description","example":"A Raycast extension for managing transactions"},"overview":{"type":["string","null"],"description":"Application overview","example":"This application provides advanced transaction management features including:\n- Real-time sync\n- Advanced filtering"},"developerName":{"type":["string","null"],"description":"The person or company developing this application","example":"Acme Corp"},"logoUrl":{"type":["string","null"],"description":"Application logo URL","example":"https://example.com/logo.png"},"website":{"type":["string","null"],"description":"Application website","example":"https://myapp.com"},"installUrl":{"type":["string","null"],"description":"An optional URL for installing the application","example":"https://myapp.com/install"},"screenshots":{"type":"array","items":{"type":"string","format":"uri"},"description":"Up to 4 screenshots that will be displayed on the apps page","example":["https://example.com/screenshot1.png","https://example.com/screenshot2.png"]},"clientId":{"type":"string","description":"Client ID","example":"mid_client_abcdef123456789"},"scopes":{"type":"array","items":{"type":"string"},"description":"Requested scopes","example":["transactions.read","invoices.read"]},"redirectUri":{"type":"string","format":"uri","description":"Redirect URI","example":"https://myapp.com/callback"},"state":{"type":"string","maxLength":1024,"description":"Opaque state parameter","example":"abc123xyz789_secure-random-state-value"},"status":{"type":"string","enum":["draft","pending","approved","rejected"],"description":"Application verification status","example":"approved"}},"required":["id","name","description","overview","developerName","logoUrl","website","installUrl","screenshots","clientId","scopes","redirectUri","status"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}}}},"post":{"summary":"OAuth Authorization Decision","operationId":"postOAuthAuthorization","description":"Process user's authorization decision (allow/deny)","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Client ID of the OAuth application","example":"mid_client_abcdef123456789"},"decision":{"type":"string","enum":["allow","deny"],"description":"User's authorization decision","example":"allow"},"scopes":{"type":"array","items":{"type":"string","enum":["bank-accounts.read","bank-accounts.write","customers.read","customers.write","documents.read","documents.write","inbox.read","inbox.write","invoices.read","invoices.write","reports.read","search.read","tags.read","tags.write","teams.read","teams.write","tracker-entries.read","tracker-entries.write","tracker-projects.read","tracker-projects.write","transactions.read","transactions.write","users.read","users.write","notifications.read","notifications.write","spend.read","spend.write","accounts.read","payment_requests.read","payment_requests.create","apis.all","apis.read"]},"description":"Scopes the user has approved","example":["transactions.read","invoices.read"]},"redirect_uri":{"type":"string","format":"uri","description":"Redirect URI for OAuth callback","example":"https://myapp.com/callback"},"state":{"type":"string","minLength":1,"maxLength":1024,"description":"Opaque state parameter for CSRF protection","example":"abc123xyz789_secure-random-state-value"},"code_challenge":{"type":"string","description":"Code challenge for PKCE (S256 method assumed)","example":"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"},"teamId":{"type":"string","format":"uuid","description":"Team ID to authorize the application for","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["client_id","decision","scopes","redirect_uri","teamId"]}}}},"responses":{"200":{"description":"Authorization decision processed, returns redirect URL","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","format":"uri"}},"required":["redirect_url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","format":"uri"}},"required":["redirect_url"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","format":"uri"}},"required":["redirect_url"]}}}}}}},"/oauth/token":{"post":{"summary":"OAuth Token Exchange","operationId":"postOAuthToken","description":"Exchange authorization code for access token or refresh an access token. Accepts application/json or application/x-www-form-urlencoded.","tags":["OAuth"],"responses":{"200":{"description":"Token exchange successful","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"Access token for API requests","example":"mid_access_token_abcdef123456789"},"token_type":{"type":"string","enum":["Bearer"],"description":"Token type, always 'Bearer'","example":"Bearer"},"expires_in":{"type":"number","description":"Token expiration time in seconds","example":3600},"refresh_token":{"type":"string","description":"Refresh token for obtaining new access tokens","example":"mid_refresh_token_abcdef123456789"},"scope":{"type":"string","description":"Space-separated list of granted scopes","example":"transactions.read invoices.read"}},"required":["access_token","token_type","expires_in","refresh_token","scope"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorResponse"}}}}}}},"/oauth/revoke":{"post":{"summary":"OAuth Token Revocation","operationId":"postOAuthRevoke","description":"Revoke an access token or refresh token. Accepts application/json or application/x-www-form-urlencoded.","tags":["OAuth"],"responses":{"200":{"description":"Token revocation successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/webhook/column":{"post":{"summary":"Column webhook handler","operationId":"columnWebhook","description":"Receives Column platform events. Verifies Column-Signature (HMAC-SHA256 of raw body). Respond quickly with 2XX; extend with async processing as needed.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook accepted","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid signature or payload"},"503":{"description":"Signing secret not configured"}}}},"/webhook/inbox":{"post":{"summary":"Inbox webhook","operationId":"inboxWebhook","description":"Webhook endpoint for receiving inbox emails from Postmark","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["error"]}}}},"403":{"description":"Invalid IP address"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/webhook/lithic-issuing":{"post":{"summary":"Lithic Issuing webhook handler","operationId":"lithicIssuingWebhook","description":"Handles asynchronous Lithic Issuing webhook events (authorization.advice, transaction, card.*).","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid signature or payload"}}}},"/webhook/lithic-issuing/auth-stream":{"post":{"summary":"Lithic JIT authorization stream","operationId":"lithicAuthStream","description":"Synchronous Lithic auth-stream callback. Returns APPROVED/DECLINED and reserves funds in the wallet ledger.","tags":["Webhooks"],"responses":{"200":{"description":"Auth decision","content":{"application/json":{"schema":{"type":"object","properties":{"approve_response":{"type":"string","enum":["APPROVED","DECLINED"]},"decline_reason":{"type":"string"}},"required":["approve_response"]}}}},"400":{"description":"Invalid signature or payload"}}}},"/webhook/plaid":{"post":{"summary":"Plaid webhook handler","operationId":"plaidWebhook","description":"Handles Plaid webhook events for transaction updates and item status changes. Verifies the Plaid-Verification JWT signature.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Invalid webhook payload"},"401":{"description":"Invalid webhook signature"}}}},"/webhook/polar":{"post":{"summary":"Polar webhook handler","operationId":"polarWebhook","description":"Handles Polar webhook events for subscription changes. Verifies webhook signature and processes subscription events.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid webhook signature or payload"},"500":{"description":"Failed to process webhook event (will trigger retry)"}}}},"/webhook/stripe":{"post":{"summary":"Stripe webhook handler","operationId":"stripeWebhook","description":"Handles Stripe webhook events for invoice payments. Verifies webhook signature and processes payment events.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid webhook signature or payload"}}}},"/webhook/stripe-issuing":{"post":{"summary":"Stripe Issuing webhook handler","operationId":"stripeIssuingWebhook","description":"Handles Stripe Issuing webhook events. Verifies webhook signature and persists an audit trail.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid webhook signature or payload"}}}},"/webhook/teller":{"post":{"summary":"Teller webhook handler","operationId":"tellerWebhook","description":"Handles Teller webhook events for enrollment disconnections and transaction updates.","tags":["Webhooks"],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Invalid webhook payload"},"401":{"description":"Invalid webhook signature"}}}},"/files/proxy":{"get":{"summary":"Proxy file from storage","operationId":"proxyFile","x-speakeasy-name-override":"proxy","description":"Proxies a file from storage. Requires team file key (fk) query parameter for access.","tags":["Files"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Path to the file in storage. Can include or exclude 'vault/' prefix.","example":"vault/documents/2024/invoice.pdf"},"required":true,"description":"Path to the file in storage. Can include or exclude 'vault/' prefix.","in":"query","name":"filePath"},{"schema":{"type":"string","minLength":1,"description":"Team file key for proxy/download access to team files. This key is returned in the user data response (GET /users/me) as the `fileKey` field. It is team-scoped and deterministic - all members of the same team share the same file key. Use this key to authenticate file access requests.","example":"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"},"required":true,"description":"Team file key for proxy/download access to team files. This key is returned in the user data response (GET /users/me) as the `fileKey` field. It is team-scoped and deterministic - all members of the same team share the same file key. Use this key to authenticate file access requests.","in":"query","name":"fk"}],"responses":{"200":{"description":"File content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/files/download/file":{"get":{"summary":"Download file from vault","operationId":"downloadFile","x-speakeasy-name-override":"downloadFile","description":"Downloads a file from the vault storage bucket. Requires team file key (fk) query parameter for access.","tags":["Files"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Path to the file in storage. Can include or exclude 'vault/' prefix.","example":"vault/documents/2024/invoice.pdf"},"required":true,"description":"Path to the file in storage. Can include or exclude 'vault/' prefix.","in":"query","name":"path"},{"schema":{"type":"string","description":"Optional filename for the Content-Disposition header.","example":"invoice.pdf"},"required":false,"description":"Optional filename for the Content-Disposition header.","in":"query","name":"filename"},{"schema":{"type":"string","minLength":1,"description":"Team file key for proxy/download access to team files. This key is returned in the user data response (GET /users/me) as the `fileKey` field. It is team-scoped and deterministic - all members of the same team share the same file key. Use this key to authenticate file access requests.","example":"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"},"required":true,"description":"Team file key for proxy/download access to team files. This key is returned in the user data response (GET /users/me) as the `fileKey` field. It is team-scoped and deterministic - all members of the same team share the same file key. Use this key to authenticate file access requests.","in":"query","name":"fk"}],"responses":{"200":{"description":"File content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/files/download/invoice":{"get":{"summary":"Download invoice PDF","operationId":"downloadInvoice","x-speakeasy-name-override":"downloadInvoice","description":"Downloads an invoice as a PDF. Can be accessed with an invoice ID (requires team file key via fk query parameter) or invoice token (public access).","tags":["Files"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Invoice ID (UUID). Requires team file key (fk) query parameter for authentication.","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":false,"description":"Invoice ID (UUID). Requires team file key (fk) query parameter for authentication.","in":"query","name":"id"},{"schema":{"type":"string","minLength":1,"description":"Team file key for authenticated invoice access. Required when using invoice ID. This key is returned in the user data response (GET /users/me) as the `fileKey` field.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"required":false,"description":"Team file key for authenticated invoice access. Required when using invoice ID. This key is returned in the user data response (GET /users/me) as the `fileKey` field.","in":"query","name":"fk"},{"schema":{"type":"string","description":"Invoice access token for public access. When used alone (without id), allows public access to the invoice.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"required":false,"description":"Invoice access token for public access. When used alone (without id), allows public access to the invoice.","in":"query","name":"token"},{"schema":{"type":["boolean","null"],"default":false,"description":"If true, the PDF will be displayed inline. If false, it will be downloaded.","example":false},"required":false,"description":"If true, the PDF will be displayed inline. If false, it will be downloaded.","in":"query","name":"preview"},{"schema":{"type":"string","enum":["invoice","receipt"],"default":"invoice","description":"Type of document to download. Use 'receipt' to download a receipt for paid invoices.","example":"invoice"},"required":false,"description":"Type of document to download. Use 'receipt' to download a receipt for paid invoices.","in":"query","name":"type"}],"responses":{"200":{"description":"Invoice PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/apps/slack/oauth-callback":{"get":{"summary":"Slack OAuth callback","operationId":"slackOAuthCallback","description":"Handles OAuth callback from Slack after user authorization. Exchanges authorization code for access token and creates app integration.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Slack"},"required":true,"description":"OAuth authorization code from Slack","in":"query","name":"code"},{"schema":{"type":"string","description":"OAuth state parameter for CSRF protection"},"required":true,"description":"OAuth state parameter for CSRF protection","in":"query","name":"state"}],"responses":{"302":{"description":"Redirect to dashboard completion page","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Failed to process OAuth callback","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/apps/slack/install-url":{"get":{"summary":"Get Slack install URL","operationId":"getSlackInstallUrl","description":"Generates OAuth install URL for Slack integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"Slack install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"}}}},"/apps/slack/interactions":{"post":{"summary":"Slack interactions handler","operationId":"slackInteractions","description":"Handles interactive component actions from Slack (button clicks, etc.)","tags":["Integrations"],"responses":{"200":{"description":"Interaction handled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/apps/gmail/oauth-callback":{"get":{"summary":"Gmail OAuth callback","operationId":"gmailOAuthCallback","description":"Handles OAuth callback from Google after user authorization. Exchanges authorization code for access token and creates inbox account.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Google"},"required":false,"description":"OAuth authorization code from Google","in":"query","name":"code"},{"schema":{"type":"string","description":"Encrypted OAuth state parameter"},"required":true,"description":"Encrypted OAuth state parameter","in":"query","name":"state"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"}],"responses":{"302":{"description":"Redirect to dashboard","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Failed to process OAuth callback","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/apps/gmail/install-url":{"get":{"summary":"Get Gmail install URL","operationId":"getGmailInstallUrl","description":"Generates OAuth install URL for Gmail integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"Gmail install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"}}}},"/apps/outlook/oauth-callback":{"get":{"summary":"Outlook OAuth callback","operationId":"outlookOAuthCallback","description":"Handles OAuth callback from Microsoft after user authorization. Exchanges authorization code for access token and creates inbox account.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Microsoft"},"required":false,"description":"OAuth authorization code from Microsoft","in":"query","name":"code"},{"schema":{"type":"string","description":"Encrypted OAuth state parameter"},"required":true,"description":"Encrypted OAuth state parameter","in":"query","name":"state"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"}],"responses":{"302":{"description":"Redirect to dashboard","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Failed to process OAuth callback","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/apps/outlook/install-url":{"get":{"summary":"Get Outlook install URL","operationId":"getOutlookInstallUrl","description":"Generates OAuth install URL for Outlook integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"Outlook install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"}}}},"/apps/xero/oauth-callback":{"get":{"summary":"Xero OAuth callback","operationId":"xeroOAuthCallback","description":"Handles OAuth callback from Xero after user authorization. Exchanges authorization code for access token and creates app integration.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Xero"},"required":false,"description":"OAuth authorization code from Xero","in":"query","name":"code"},{"schema":{"type":"string","description":"OAuth state parameter for CSRF protection"},"required":true,"description":"OAuth state parameter for CSRF protection","in":"query","name":"state"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"}],"responses":{"302":{"description":"Redirect to dashboard completion page","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters"}}}},"/apps/xero/install-url":{"get":{"summary":"Get Xero install URL","operationId":"getXeroInstallUrl","description":"Generates OAuth install URL for Xero integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"Xero install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}}}},"/apps/quickbooks/oauth-callback":{"get":{"summary":"QuickBooks OAuth callback","operationId":"quickBooksOAuthCallback","description":"Handles OAuth callback from QuickBooks after user authorization. Exchanges authorization code for access token and creates app integration.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from QuickBooks"},"required":false,"description":"OAuth authorization code from QuickBooks","in":"query","name":"code"},{"schema":{"type":"string","description":"OAuth state parameter for CSRF protection"},"required":true,"description":"OAuth state parameter for CSRF protection","in":"query","name":"state"},{"schema":{"type":"string","description":"QuickBooks company/realm ID"},"required":false,"description":"QuickBooks company/realm ID","in":"query","name":"realmId"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"}],"responses":{"302":{"description":"Redirect to dashboard completion page","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters"}}}},"/apps/quickbooks/install-url":{"get":{"summary":"Get QuickBooks install URL","operationId":"getQuickBooksInstallUrl","description":"Generates OAuth install URL for QuickBooks integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"QuickBooks install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}}}},"/apps/fortnox/oauth-callback":{"get":{"summary":"Fortnox OAuth callback","operationId":"fortnoxOAuthCallback","description":"Handles OAuth callback from Fortnox after user authorization. Exchanges authorization code for access token and creates app integration.","tags":["Integrations"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Fortnox"},"required":false,"description":"OAuth authorization code from Fortnox","in":"query","name":"code"},{"schema":{"type":"string","description":"OAuth state parameter for CSRF protection"},"required":true,"description":"OAuth state parameter for CSRF protection","in":"query","name":"state"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"}],"responses":{"302":{"description":"Redirect to dashboard completion page","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL to dashboard"}}},"400":{"description":"Invalid request parameters"}}}},"/apps/fortnox/install-url":{"get":{"summary":"Get Fortnox install URL","operationId":"getFortnoxInstallUrl","description":"Generates OAuth install URL for Fortnox integration. Requires authentication.","tags":["Integrations"],"responses":{"200":{"description":"Fortnox install URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}}}},"/invoice-payments/connect-stripe":{"get":{"summary":"Get Stripe Connect URL","operationId":"getStripeConnectUrl","description":"Generates OAuth URL for Stripe Connect Standard integration. Allows teams to connect their Stripe account for accepting invoice payments.","tags":["Invoice Payments"],"responses":{"200":{"description":"Stripe Connect OAuth URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error - Stripe configuration missing"}}}},"/invoice-payments/connect-stripe/callback":{"get":{"summary":"Stripe Connect OAuth callback","operationId":"stripeConnectCallback","description":"Handles OAuth callback from Stripe Connect after user authorization. Exchanges authorization code for connected account ID.","tags":["Invoice Payments"],"parameters":[{"schema":{"type":"string","description":"OAuth authorization code from Stripe"},"required":false,"description":"OAuth authorization code from Stripe","in":"query","name":"code"},{"schema":{"type":"string","description":"OAuth state parameter for CSRF protection"},"required":true,"description":"OAuth state parameter for CSRF protection","in":"query","name":"state"},{"schema":{"type":"string","description":"OAuth error code if authorization failed"},"required":false,"description":"OAuth error code if authorization failed","in":"query","name":"error"},{"schema":{"type":"string","description":"OAuth error description"},"required":false,"description":"OAuth error description","in":"query","name":"error_description"}],"responses":{"302":{"description":"Redirect to dashboard","headers":{"Location":{"schema":{"type":"string"},"description":"Redirect URL"}}},"400":{"description":"Invalid request parameters"}}}},"/invoice-payments/disconnect-stripe":{"post":{"summary":"Disconnect Stripe account","operationId":"disconnectStripe","description":"Disconnects the team's Stripe Connect account.","tags":["Invoice Payments"],"responses":{"200":{"description":"Successfully disconnected","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"}}}},"/invoice-payments/payment-intent":{"post":{"summary":"Create payment intent for invoice","operationId":"createInvoicePaymentIntent","description":"Creates a Stripe PaymentIntent for paying an invoice. This is a public endpoint that uses the invoice token for authentication.","tags":["Invoice Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Invoice token for authentication"}},"required":["token"]}}}},"responses":{"200":{"description":"Payment intent created","content":{"application/json":{"schema":{"type":"object","properties":{"clientSecret":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"stripeAccountId":{"type":"string"}},"required":["clientSecret","amount","currency","stripeAccountId"]}}}},"400":{"description":"Invalid request or invoice not payable"},"404":{"description":"Invoice not found"}}}},"/invoice-payments/stripe-status":{"get":{"summary":"Get Stripe Connect status","operationId":"getStripeConnectStatus","description":"Gets the current Stripe Connect status for the team.","tags":["Invoice Payments"],"responses":{"200":{"description":"Stripe Connect status","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"status":{"type":["string","null"]},"stripeAccountId":{"type":["string","null"]}},"required":["connected","status","stripeAccountId"]}}}},"401":{"description":"Unauthorized"}}}},"/desktop/update":{"get":{"summary":"Check for desktop app updates","operationId":"checkDesktopUpdate","x-speakeasy-name-override":"checkUpdate","description":"Returns the latest desktop app version info in Tauri updater format. Download URLs are rewritten to proxy through this API.","tags":["Desktop"],"responses":{"200":{"description":"Update manifest in Tauri updater format","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"notes":{"type":"string"},"pub_date":{"type":"string"},"platforms":{"type":"object","additionalProperties":{"type":"object","properties":{"signature":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["signature","url"]}}},"required":["version","platforms"]}}}},"502":{"description":"Failed to fetch update info from upstream","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/desktop/update/download":{"get":{"summary":"Download desktop app update artifact","operationId":"downloadDesktopUpdate","x-speakeasy-name-override":"downloadUpdate","description":"Proxies the download of a desktop app update artifact from GitHub releases. Only URLs pointing to the dino-ai/dino repository are accepted.","tags":["Desktop"],"parameters":[{"schema":{"type":"string","format":"uri","description":"The artifact download URL to proxy","example":"https://github.com/dino-ai/dino/releases/download/dino-v1.0.0/Dino.app.tar.gz"},"required":true,"description":"The artifact download URL to proxy","in":"query","name":"url"}],"responses":{"200":{"description":"Update artifact binary","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid download URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"502":{"description":"Failed to download artifact from upstream","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/v1/crypto/capabilities":{"get":{"summary":"Get supported crypto payout rails","operationId":"getCryptoCapabilities","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"responses":{"200":{"description":"Supported crypto rails","content":{"application/json":{"schema":{"type":"object","properties":{"rails":{"type":"array","items":{"type":"object","properties":{"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"decimals":{"type":"number","enum":[6]}},"required":["chain","asset_symbol","asset_mint","decimals"]}},"execution_modes":{"type":"array","items":{"type":"string","enum":["workspace_custodial"]}}},"required":["rails","execution_modes"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/payout-intents/{id}/cancel":{"post":{"summary":"Cancel crypto payout intent","operationId":"cancelCryptoPayoutIntent","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not cancellable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/payout-intents/{id}/approve":{"post":{"summary":"Approve crypto payout intent","operationId":"approveCryptoPayoutIntent","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/payout-intents/{id}/decline":{"post":{"summary":"Decline crypto payout intent","operationId":"declineCryptoPayoutIntent","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Declined","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/recipients":{"get":{"summary":"List crypto recipients","operationId":"listCryptoRecipients","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["active","archived"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List recipients","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"address":{"type":"string"},"label":{"type":"string"},"notes":{"type":["string","null"]},"category":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","chain","asset_mint","address","label","notes","category","status","created_at","updated_at"]}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create crypto recipient","operationId":"createCryptoRecipient","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["solana"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"address":{"type":"string"},"label":{"type":"string","minLength":1,"maxLength":100},"notes":{"type":"string","maxLength":500},"category":{"type":"string","maxLength":100}},"required":["chain","address","label"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"address":{"type":"string"},"label":{"type":"string"},"notes":{"type":["string","null"]},"category":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","chain","asset_mint","address","label","notes","category","status","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/recipients/{id}":{"patch":{"summary":"Update crypto recipient","operationId":"updateCryptoRecipient","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"notes":{"type":["string","null"],"maxLength":500},"category":{"type":["string","null"],"maxLength":100},"status":{"type":"string","enum":["active","archived"]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"address":{"type":"string"},"label":{"type":"string"},"notes":{"type":["string","null"]},"category":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","chain","asset_mint","address","label","notes","category","status","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/balance":{"get":{"summary":"Get workspace crypto balance","operationId":"getCryptoBalance","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"responses":{"200":{"description":"Crypto balance","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"decimals":{"type":"number","enum":[6]},"available_atomic":{"type":"string"},"on_chain_atomic":{"type":["string","null"]},"reserved_atomic":{"type":"string"},"pending_outbound_atomic":{"type":"string"},"updated_at":{"type":"string"}},"required":["chain","asset_symbol","asset_mint","decimals","available_atomic","reserved_atomic","pending_outbound_atomic","updated_at"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/activity":{"get":{"summary":"List workspace crypto activity","operationId":"listCryptoActivity","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Recent workspace crypto deposits and withdrawals","content":{"application/json":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["deposit"]},"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"amount_atomic":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","credited","failed","reverted"]},"from_address":{"type":"string"},"to_address":{"type":"string"},"tx_signature":{"type":"string"},"created_at":{"type":"string"}},"required":["kind","id","chain","asset_symbol","asset_mint","amount_atomic","status","from_address","to_address","tx_signature","created_at"]}},"withdrawals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["withdrawal"]},"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"amount_atomic":{"type":"string"},"status":{"type":"string","enum":["created","submitted","confirmed","failed"]},"to_address":{"type":"string"},"tx_signature":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["kind","id","chain","asset_symbol","asset_mint","amount_atomic","status","to_address","tx_signature","created_at"]}}},"required":["deposits","withdrawals"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/deposits/attach":{"post":{"summary":"Attach and credit a direct Solana USDC deposit","operationId":"attachCryptoDeposit","tags":["Crypto payouts"],"security":[{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tx_signature":{"type":"string","minLength":20,"maxLength":120},"origin_wallet_address":{"type":"string"}},"required":["tx_signature","origin_wallet_address"]}}}},"responses":{"200":{"description":"Verified and credited crypto deposit","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["deposit"]},"id":{"type":"string","format":"uuid"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"amount_atomic":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","credited","failed","reverted"]},"from_address":{"type":"string"},"to_address":{"type":"string"},"tx_signature":{"type":"string"},"created_at":{"type":"string"}},"required":["kind","id","chain","asset_symbol","asset_mint","amount_atomic","status","from_address","to_address","tx_signature","created_at"]}}}},"400":{"description":"Invalid or unverifiable deposit","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Transaction already belongs to another workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/crypto/payout-intents":{"post":{"summary":"Create governed Solana USDC payout intent","operationId":"createCryptoPayoutIntent","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agent_account_id":{"type":"string","format":"uuid"},"amount_atomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"chain":{"type":"string","enum":["solana"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":2000},"execution_mode":{"type":"string","enum":["workspace_custodial"]},"metadata":{"type":"object","additionalProperties":{}}},"required":["amount_atomic","chain","asset_mint","recipient_address"]}}}},"responses":{"200":{"description":"Idempotent replay","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Idempotency conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"summary":"List crypto payout intents","operationId":"listCryptoPayoutIntents","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_after","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"agent_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"idempotency_key","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"merchant_name_prefix","in":"query"},{"schema":{"type":"string","enum":["workspace_custodial","user_wallet"]},"required":false,"name":"execution_mode","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/crypto/payout-intents/{id}":{"get":{"summary":"Get crypto payout intent","operationId":"getCryptoPayoutIntent","tags":["Crypto payouts"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Detail","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["needs_approval","approved","submitted","completed","failed","declined","cancelled","awaiting_signature","expired"]},"decision_reason":{"type":"string"},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"amount_atomic":{"type":"string"},"amount_cents":{"type":"integer"},"chain":{"type":"string","enum":["solana"]},"asset_symbol":{"type":"string","enum":["USDC"]},"asset_mint":{"type":"string","enum":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]},"recipient_address":{"type":"string"},"execution_mode":{"type":"string","enum":["workspace_custodial","user_wallet"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_atomic","amount_cents","chain","asset_symbol","asset_mint","recipient_address","execution_mode","metadata","created_at","updated_at"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/spend-requests":{"post":{"summary":"Create spend request (policy + ledger, no card)","operationId":"postAgentSpendRequest","description":"Bearer **Dino spending key** (per agent account) or **team API key** with `spend.write`. Team keys must send `X-Agent-Account-Id` with a UUID of an agent account on the same team. Records a **governed spend decision** (approved / declined / needs_approval) and ledger usage — **does not issue a payment card**. For checkout with a JIT card, use **`POST /checkout/intents`** and follow with **`authorize`** then **`issue-credential`**.","tags":["Spend requests"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0},"amount":{"type":"number","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"usd"},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":2000},"metadata":{"type":"object","additionalProperties":{}},"idempotency_key":{"type":"string","minLength":1,"maxLength":255}},"required":["merchant_name"]}}}},"responses":{"200":{"description":"Idempotent replay of an existing spend request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"decision_reason":{"type":"string","minLength":1},"budget_period":{"type":"string","enum":["daily","weekly","monthly","one_time"]},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"remaining_budget_cents":{"type":"integer","minimum":0},"remaining_period_budget_cents":{"type":"integer","minimum":0},"remaining_monthly_budget_cents":{"type":"integer","minimum":0},"approval_url":{"type":"string","format":"uri"}},"required":["id","status","decision_reason","budget_period","amount_cents","currency","merchant_name","remaining_budget_cents","remaining_period_budget_cents","remaining_monthly_budget_cents"]}}}},"201":{"description":"Spend request created and evaluated. Status may be approved, declined, or needs_approval.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"decision_reason":{"type":"string","minLength":1},"budget_period":{"type":"string","enum":["daily","weekly","monthly","one_time"]},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"remaining_budget_cents":{"type":"integer","minimum":0},"remaining_period_budget_cents":{"type":"integer","minimum":0},"remaining_monthly_budget_cents":{"type":"integer","minimum":0},"approval_url":{"type":"string","format":"uri"}},"required":["id","status","decision_reason","budget_period","amount_cents","currency","merchant_name","remaining_budget_cents","remaining_period_budget_cents","remaining_monthly_budget_cents"]}}}},"400":{"description":"Invalid body, missing amount, currency_mismatch, or idempotency_key_required when charge-on-demand is enabled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"Funding or plan-level budget constraint blocked the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key or missing required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Idempotency key reused with a different payload, or concurrent duplicate create","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"summary":"List spend requests","operationId":"listAgentSpendRequests","description":"List spend requests. **Dino key:** rows for that key's agent account only. **Team API key** (`spend.read`): all team spend, optionally filtered with `agent_account_id`. Optional filters: `idempotency_key` (exact), `merchant_name_prefix` (case-insensitive prefix on merchant name). Cursor pagination via `cursor` and `limit` (max 100).","tags":["Spend requests"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_after","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"agent_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"idempotency_key","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"merchant_name_prefix","in":"query"}],"responses":{"200":{"description":"Page of spend requests","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"decision_reason":{"type":"string"},"amount_cents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3},"merchant_name":{"type":"string"},"reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_cents","currency","merchant_name","reason","created_at","updated_at","decided_at"]}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"400":{"description":"Invalid cursor or query parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/spend-requests/{id}/cancel":{"post":{"summary":"Cancel a spend request awaiting approval","operationId":"cancelAgentSpendRequest","description":"Cancel a spend request that is still in `needs_approval`. Other terminal states (approved, declined, completed, expired, cancelled) cannot be cancelled and return 409.","tags":["Spend requests"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}}}}}},"responses":{"200":{"description":"Spend request cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["cancelled"]},"decision_reason":{"type":"string"}},"required":["id","status","decision_reason"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Spend request not found for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Spend request is no longer in needs_approval","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/spend-requests/{id}/ledger":{"get":{"summary":"List ledger entries for a spend request","operationId":"listAgentSpendRequestLedger","description":"Returns policy / decision rows from the spend ledger for one request. **Dino key:** request must belong to that key's agent. **Team API key** (`spend.read`): any request on the team. Ordered by `created_at` descending.","tags":["Spend requests"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Ledger rows for the spend request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer"},"currency":{"type":"string","minLength":3,"maxLength":3},"merchant_name":{"type":"string"},"decision_status":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"reason":{"type":["string","null"]},"decision_reason":{"type":"string"},"created_at":{"type":"string"}},"required":["id","agent_account_id","amount_cents","currency","merchant_name","decision_status","reason","decision_reason","created_at"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key or missing required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Spend request not found for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/spend-requests/{id}":{"get":{"summary":"Get spend request status","operationId":"getAgentSpendRequest","description":"Fetch a spend request by id. **Dino key:** must belong to that key's agent. **Team API key** (`spend.read`): any request on the team.","tags":["Spend requests"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Spend request details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved","declined","needs_approval","completed","awaiting_signature","submitting","submitted","failed","expired","cancelled"]},"decision_reason":{"type":"string","minLength":1},"pending_reason":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"execution":{"type":"string","enum":["dino_balance","user_wallet","workspace_custodial"]},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"crypto_chain":{"type":["string","null"]},"crypto_asset_mint":{"type":["string","null"]},"crypto_recipient_address":{"type":["string","null"]},"tx_signature":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","amount_cents","currency","merchant_name","reason","created_at","updated_at"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key or missing required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Spend request not found for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/balance":{"get":{"summary":"Get current spend budget snapshot","operationId":"getAgentSpendBalance","description":"Budget snapshot for an agent account. **Dino key:** implicit account. **Team API key** (`accounts.read`): pass `agent_account_id` query (UUID on your team).","tags":["Agent spend"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"agent_account_id","in":"query"}],"responses":{"200":{"description":"Budget and limit snapshot for the authenticated spend account","content":{"application/json":{"schema":{"type":"object","properties":{"agent_account_id":{"type":"string","format":"uuid"},"agent_account_status":{"type":"string","enum":["active","paused","revoked"]},"funding_source_status":{"type":["string","null"],"enum":["active","disabled","removed",null]},"budget_period":{"type":"string","enum":["daily","weekly","monthly","one_time"]},"budget_limit_cents":{"type":"integer","minimum":0},"period_limit_cents":{"type":"integer","minimum":0},"monthly_limit_cents":{"type":"integer","minimum":0},"spent_this_period_cents":{"type":"integer","minimum":0},"spent_this_budget_period_cents":{"type":"integer","minimum":0},"spent_this_month_cents":{"type":"integer","minimum":0},"remaining_budget_cents":{"type":"integer","minimum":0},"remaining_period_budget_cents":{"type":"integer","minimum":0},"remaining_monthly_budget_cents":{"type":"integer","minimum":0},"max_transaction_cents":{"type":"integer","exclusiveMinimum":0},"approval_threshold_cents":{"type":["integer","null"],"exclusiveMinimum":0},"wallet_total_cents":{"type":["integer","null"],"minimum":0},"wallet_reserved_cents":{"type":["integer","null"],"minimum":0},"wallet_available_cents":{"type":["integer","null"],"minimum":0}},"required":["agent_account_id","agent_account_status","funding_source_status","budget_period","budget_limit_cents","period_limit_cents","monthly_limit_cents","spent_this_period_cents","spent_this_budget_period_cents","spent_this_month_cents","remaining_budget_cents","remaining_period_budget_cents","remaining_monthly_budget_cents","max_transaction_cents","approval_threshold_cents","wallet_total_cents","wallet_reserved_cents","wallet_available_cents"]}}}},"400":{"description":"Team API key missing agent_account_id","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid Dino spending key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Revoked Dino spending key or missing required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Agent account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/accounts":{"get":{"summary":"List agent spend accounts (team API key)","operationId":"listAgentSpendAccounts","description":"Requires a **team API key** with `accounts.read`. Dino spending keys cannot call this endpoint (use `GET /v1/balance` per key).","tags":["Agent spend"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"responses":{"200":{"description":"Agent accounts on the team","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"}},"required":["id","name","status","currency"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Dino key or missing accounts.read","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/accounts/{id}":{"get":{"summary":"Get agent spend account (team API key)","operationId":"getAgentSpendAccount","description":"Returns budget limits, approval threshold, merchant allow/deny lists, and funding summary for one agent account. Requires a **team API key** with `accounts.read`. Dino spending keys cannot call this endpoint (use `GET /v1/balance`).","tags":["Agent spend"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent account detail","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","paused","revoked"]},"currency":{"type":"string","minLength":3,"maxLength":3},"budget_period":{"type":"string","enum":["daily","weekly","monthly","one_time"]},"budget_limit_cents":{"type":"integer","minimum":0},"max_transaction_cents":{"type":"integer","exclusiveMinimum":0},"approval_threshold_cents":{"type":["integer","null"],"exclusiveMinimum":0},"merchant_allowlist":{"type":"array","items":{"type":"string"}},"merchant_denylist":{"type":"array","items":{"type":"string"}},"funding_display_brand":{"type":["string","null"]},"funding_display_last4":{"type":["string","null"]},"funding_source_status":{"type":["string","null"],"enum":["active","disabled","removed",null]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","currency","budget_period","budget_limit_cents","max_transaction_cents","approval_threshold_cents","merchant_allowlist","merchant_denylist","funding_display_brand","funding_display_last4","funding_source_status","created_at","updated_at"]}}}},"400":{"description":"Invalid account id","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Dino key or missing accounts.read","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Agent account not found on this team","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/checkout/intents":{"post":{"summary":"Create checkout intent","operationId":"createCheckoutIntent","description":"Start a **card checkout** flow: records product + buyer context and emits purchase-intent lifecycle events. Run policy via **`POST /checkout/intents/{id}/authorize`**, then mint a JIT proxy card via **`POST /checkout/intents/{id}/issue-credential`**.","tags":["Checkout"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":1},"buyer":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"phone":{"type":"string","minLength":1,"maxLength":40},"address1":{"type":"string","minLength":1,"maxLength":200},"address2":{"type":"string","maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"province":{"type":"string","minLength":1,"maxLength":100},"postal_code":{"type":"string","minLength":1,"maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["first_name","last_name","email","phone","address1","city","province","postal_code","country"]},"max_total_cents":{"type":"integer","exclusiveMinimum":0},"expected_total_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"usd"},"metadata":{"type":"object","additionalProperties":{}},"idempotency_key":{"type":"string","minLength":1,"maxLength":255}},"required":["product_url","buyer"]}}}},"responses":{"200":{"description":"Idempotent replay","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["intent_created","approved","declined","needs_approval","payment_credential_issued","execution_started","completed","failed"]},"decision_reason":{"type":"string","minLength":1},"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"max_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"expected_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"approved_amount_cents":{"type":["integer","null"],"exclusiveMinimum":0},"one_time_exact_amount":{"type":"boolean"},"credential_expires_at":{"type":["string","null"]},"merchant_lock":{"type":["string","null"]},"spend_request_id":{"type":["string","null"],"format":"uuid"},"payment_credential_handle":{"type":["string","null"]},"payment_credential":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["proxy_card"]},"card_id":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":12,"maxLength":32},"cvc":{"type":"string","minLength":3,"maxLength":4},"exp_month":{"type":["integer","null"],"minimum":1,"maximum":12},"exp_year":{"type":["integer","null"],"minimum":2000},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expires_at":{"type":["string","null"]}},"required":["kind","card_id","number","cvc","exp_month","exp_year","brand","last4","expires_at"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","product_url","quantity","currency","max_total_cents","expected_total_cents","approved_amount_cents","one_time_exact_amount","credential_expires_at","merchant_lock","spend_request_id","payment_credential_handle","created_at","updated_at","decided_at"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["intent_created","approved","declined","needs_approval","payment_credential_issued","execution_started","completed","failed"]},"decision_reason":{"type":"string","minLength":1},"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"max_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"expected_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"approved_amount_cents":{"type":["integer","null"],"exclusiveMinimum":0},"one_time_exact_amount":{"type":"boolean"},"credential_expires_at":{"type":["string","null"]},"merchant_lock":{"type":["string","null"]},"spend_request_id":{"type":["string","null"],"format":"uuid"},"payment_credential_handle":{"type":["string","null"]},"payment_credential":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["proxy_card"]},"card_id":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":12,"maxLength":32},"cvc":{"type":"string","minLength":3,"maxLength":4},"exp_month":{"type":["integer","null"],"minimum":1,"maximum":12},"exp_year":{"type":["integer","null"],"minimum":2000},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expires_at":{"type":["string","null"]}},"required":["kind","card_id","number","cvc","exp_month","exp_year","brand","last4","expires_at"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","product_url","quantity","currency","max_total_cents","expected_total_cents","approved_amount_cents","one_time_exact_amount","credential_expires_at","merchant_lock","spend_request_id","payment_credential_handle","created_at","updated_at","decided_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Idempotency key conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/checkout/intents/{id}/authorize":{"post":{"summary":"Authorize checkout intent","operationId":"authorizeCheckoutIntent","tags":["Checkout"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expected_total_cents":{"type":"integer","exclusiveMinimum":0},"merchant_name":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"Authorized","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["intent_created","approved","declined","needs_approval","payment_credential_issued","execution_started","completed","failed"]},"decision_reason":{"type":"string","minLength":1},"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"max_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"expected_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"approved_amount_cents":{"type":["integer","null"],"exclusiveMinimum":0},"one_time_exact_amount":{"type":"boolean"},"credential_expires_at":{"type":["string","null"]},"merchant_lock":{"type":["string","null"]},"spend_request_id":{"type":["string","null"],"format":"uuid"},"payment_credential_handle":{"type":["string","null"]},"payment_credential":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["proxy_card"]},"card_id":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":12,"maxLength":32},"cvc":{"type":"string","minLength":3,"maxLength":4},"exp_month":{"type":["integer","null"],"minimum":1,"maximum":12},"exp_year":{"type":["integer","null"],"minimum":2000},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expires_at":{"type":["string","null"]}},"required":["kind","card_id","number","cvc","exp_month","exp_year","brand","last4","expires_at"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","product_url","quantity","currency","max_total_cents","expected_total_cents","approved_amount_cents","one_time_exact_amount","credential_expires_at","merchant_lock","spend_request_id","payment_credential_handle","created_at","updated_at","decided_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/checkout/intents/{id}/issue-credential":{"post":{"summary":"Issue JIT card credential for checkout","description":"Mints a **single-use** proxy card when the intent is `approved` (wallet reserve at issuance). Body may include **`merchant_lock`** (Dino realtime match on merchant name), optional **`allowed_merchant_categories`** (Stripe Issuing `spending_controls.allowed_categories`, e.g. `computer_software_stores` — see [Stripe categories](https://docs.stripe.com/issuing/categories)), **`ttl_seconds`** for credential expiry, and **`include_sensitive_details`** (default false). For Stripe Issuing, the server also sets card-level per-authorization limits and lifecycle where supported; realtime auth uses your Issuing webhook.","operationId":"issueCheckoutIntentCredential","tags":["Checkout"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe_proxy_card"],"default":"stripe_proxy_card"},"credential_mode":{"type":"string","enum":["standard","one_time_exact_amount"],"default":"standard"},"ttl_seconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"merchant_lock":{"type":"string","minLength":1,"maxLength":200},"allowed_merchant_categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":24},"include_sensitive_details":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Issued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["intent_created","approved","declined","needs_approval","payment_credential_issued","execution_started","completed","failed"]},"decision_reason":{"type":"string","minLength":1},"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"max_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"expected_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"approved_amount_cents":{"type":["integer","null"],"exclusiveMinimum":0},"one_time_exact_amount":{"type":"boolean"},"credential_expires_at":{"type":["string","null"]},"merchant_lock":{"type":["string","null"]},"spend_request_id":{"type":["string","null"],"format":"uuid"},"payment_credential_handle":{"type":["string","null"]},"payment_credential":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["proxy_card"]},"card_id":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":12,"maxLength":32},"cvc":{"type":"string","minLength":3,"maxLength":4},"exp_month":{"type":["integer","null"],"minimum":1,"maximum":12},"exp_year":{"type":["integer","null"],"minimum":2000},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expires_at":{"type":["string","null"]}},"required":["kind","card_id","number","cvc","exp_month","exp_year","brand","last4","expires_at"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","product_url","quantity","currency","max_total_cents","expected_total_cents","approved_amount_cents","one_time_exact_amount","credential_expires_at","merchant_lock","spend_request_id","payment_credential_handle","created_at","updated_at","decided_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not in issuable state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/checkout/intents/{id}":{"get":{"summary":"Get checkout intent status","operationId":"getCheckoutIntent","tags":["Checkout"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Purchase intent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["intent_created","approved","declined","needs_approval","payment_credential_issued","execution_started","completed","failed"]},"decision_reason":{"type":"string","minLength":1},"product_url":{"type":"string","format":"uri"},"quantity":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"max_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"expected_total_cents":{"type":["integer","null"],"exclusiveMinimum":0},"approved_amount_cents":{"type":["integer","null"],"exclusiveMinimum":0},"one_time_exact_amount":{"type":"boolean"},"credential_expires_at":{"type":["string","null"]},"merchant_lock":{"type":["string","null"]},"spend_request_id":{"type":["string","null"],"format":"uuid"},"payment_credential_handle":{"type":["string","null"]},"payment_credential":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["proxy_card"]},"card_id":{"type":"string","format":"uuid"},"number":{"type":"string","minLength":12,"maxLength":32},"cvc":{"type":"string","minLength":3,"maxLength":4},"exp_month":{"type":["integer","null"],"minimum":1,"maximum":12},"exp_year":{"type":["integer","null"],"minimum":2000},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expires_at":{"type":["string","null"]}},"required":["kind","card_id","number","cvc","exp_month","exp_year","brand","last4","expires_at"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"decided_at":{"type":["string","null"]}},"required":["id","status","decision_reason","product_url","quantity","currency","max_total_cents","expected_total_cents","approved_amount_cents","one_time_exact_amount","credential_expires_at","merchant_lock","spend_request_id","payment_credential_handle","created_at","updated_at","decided_at"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/receive-address":{"get":{"summary":"Get or create receive address","operationId":"getReceiveAddress","description":"Returns the active permanent receive address for the authenticated team's wallet. Creates one if it does not yet exist. The caller's team wallet (`financial_account_id`) is auto-resolved from the auth token.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"financial_account_id","in":"query"}],"responses":{"200":{"description":"Active receive address","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"financial_account_id":{"type":"string","format":"uuid"},"encoded_address":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","financial_account_id","encoded_address","status","created_at","updated_at"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Cross-team transfers not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/payment-codes/resolve":{"get":{"summary":"Resolve payment code","operationId":"resolvePaymentCode","description":"Resolve a one-time payment code (ctx_…) to recipient team info without sending funds.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"code","in":"query"}],"responses":{"200":{"description":"Resolved recipient","content":{"application/json":{"schema":{"type":"object","properties":{"to_team_id":{"type":"string","format":"uuid"},"to_team_display_name":{"type":"string"},"expires_at":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["to_team_id","to_team_display_name","expires_at","currency"]}}}},"400":{"description":"Same-team code","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found or expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/receive-address/resolve":{"get":{"summary":"Resolve receive address","operationId":"resolveReceiveAddress","description":"Look up a permanent receive address (din1… or legacy mid1…) to get recipient team info without sending funds.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"address","in":"query"}],"responses":{"200":{"description":"Resolved recipient","content":{"application/json":{"schema":{"type":"object","properties":{"to_team_id":{"type":"string","format":"uuid"},"to_team_display_name":{"type":"string"},"to_financial_account_id":{"type":"string","format":"uuid"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["to_team_id","to_team_display_name","to_financial_account_id","currency"]}}}},"400":{"description":"Invalid or same-team address","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found or inactive","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/payment-codes":{"post":{"summary":"Create payment code","operationId":"createPaymentCode","description":"Create a one-time payment code (ctx_…) that another team can use as `recipient_payment_code` when initiating a transfer. The code expires after `expires_in_hours` (default 72, max 720).","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"financial_account_id":{"type":"string","format":"uuid"},"expires_in_hours":{"type":"integer","minimum":1,"maximum":720,"default":72}}}}}},"responses":{"201":{"description":"Payment code created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"financial_account_id":{"type":"string","format":"uuid"},"expires_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","code","financial_account_id","expires_at","created_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers":{"post":{"summary":"Initiate cross-team transfer","operationId":"createTransfer","description":"Send funds from the caller's team wallet to another team's wallet. Provide a `recipient_payment_code` (ctx_…) or `recipient_receive_address` (din1… or legacy mid1…) to identify the recipient. The transfer is created in `pending_acceptance` status and must be accepted by the recipient.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from_financial_account_id":{"type":"string","format":"uuid"},"recipient_payment_code":{"type":"string","minLength":1,"maxLength":255},"recipient_receive_address":{"type":"string","minLength":1,"maxLength":64},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"usd"},"idempotency_key":{"type":"string","minLength":1,"maxLength":255}},"required":["from_financial_account_id","amount_cents","idempotency_key"]}}}},"responses":{"200":{"description":"Idempotent replay of existing transfer","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"201":{"description":"Transfer created (pending acceptance)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Payment code or account not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Idempotency conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"summary":"List cross-team transfers","operationId":"listTransfers","description":"List cross-team transfers for the authenticated team. Filter by `direction` (incoming/outgoing/all).","tags":["Cross-team transfers"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["incoming","outgoing","all"],"default":"all"},"required":false,"name":"direction","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Transfer list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}":{"get":{"summary":"Get cross-team transfer","operationId":"getTransfer","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transfer","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}/accept":{"post":{"summary":"Accept cross-team transfer","operationId":"acceptTransfer","description":"Accept a pending cross-team transfer. Only the recipient team can accept.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transfer accepted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"400":{"description":"Not pending or invalid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"Insufficient balance or cap exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}/decline":{"post":{"summary":"Decline cross-team transfer","operationId":"declineTransfer","description":"Decline a pending cross-team transfer. Only the recipient team can decline.","tags":["Cross-team transfers"],"security":[{"dinoSpendKey":[]},{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transfer declined","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"400":{"description":"Not pending","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}/cancel":{"post":{"summary":"Cancel cross-team transfer","operationId":"cancelTransfer","description":"Cancel a pending cross-team transfer. Only the sender team can cancel.","tags":["Cross-team transfers"],"security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transfer cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_acceptance","processing","completed","failed","cancelled","declined"]},"from_team_id":{"type":"string","format":"uuid"},"from_financial_account_id":{"type":"string","format":"uuid"},"to_team_id":{"type":"string","format":"uuid"},"to_financial_account_id":{"type":"string","format":"uuid"},"amount_cents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"idempotency_key":{"type":"string"},"idempotent_replay":{"type":"boolean"},"accepted_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"declined_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","status","from_team_id","from_financial_account_id","to_team_id","to_financial_account_id","amount_cents","currency","idempotency_key","idempotent_replay","accepted_at","completed_at","cancelled_at","declined_at","created_at","updated_at"]}}}},"400":{"description":"Not pending","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}},"412":{"description":"Not provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"request_id":{"type":"string","format":"uuid"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]}}}}}}},"/notifications":{"get":{"summary":"List all notifications","operationId":"listNotifications","x-speakeasy-name-override":"list","description":"Retrieve a list of notifications for the authenticated team.","tags":["Notifications"],"parameters":[{"schema":{"type":["string","null"],"description":"Cursor for pagination, representing the last item from the previous page","example":"20"},"required":false,"description":"Cursor for pagination, representing the last item from the previous page","in":"query","name":"cursor"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of notifications to return per page (1-100)","example":20},"required":false,"description":"Number of notifications to return per page (1-100)","in":"query","name":"pageSize"},{"schema":{"anyOf":[{"type":"string","enum":["unread","read","archived"]},{"type":"array","items":{"type":"string","enum":["unread","read","archived"]}}],"description":"Filter by notification status. Can be a single status or array of statuses. unread = new notifications, read = viewed but not dismissed, archived = dismissed from view","example":["unread","read"]},"required":false,"description":"Filter by notification status. Can be a single status or array of statuses. unread = new notifications, read = viewed but not dismissed, archived = dismissed from view","in":"query","name":"status"},{"schema":{"type":["string","null"],"format":"uuid","description":"Filter notifications by specific user ID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"required":false,"description":"Filter notifications by specific user ID","in":"query","name":"userId"},{"schema":{"type":["integer","null"],"minimum":1,"maximum":10,"description":"Filter notifications by priority level (1-10)","example":5},"required":false,"description":"Filter notifications by priority level (1-10)","in":"query","name":"priority"},{"schema":{"type":["integer","null"],"minimum":1,"maximum":10,"description":"Filter notifications by maximum priority level (priority <= maxPriority). Use 3 for user-facing notifications only.","example":3},"required":false,"description":"Filter notifications by maximum priority level (priority <= maxPriority). Use 3 for user-facing notifications only.","in":"query","name":"maxPriority"}],"responses":{"200":{"description":"Retrieve a list of notifications for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/notifications/{notificationId}/status":{"patch":{"summary":"Update notification status","operationId":"updateNotificationStatus","x-speakeasy-name-override":"updateStatus","description":"Update the status of a specific notification.","tags":["Notifications"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The ID of the notification to update","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"required":true,"description":"The ID of the notification to update","in":"path","name":"notificationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["unread","read","archived"],"description":"The new status for the notification","example":"read"}},"required":["status"]}}}},"responses":{"200":{"description":"Notification status updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/notifications/update-all-status":{"post":{"summary":"Update status of all notifications","operationId":"updateAllNotificationsStatus","x-speakeasy-name-override":"updateAllStatus","description":"Update the status of all notifications for the authenticated team.","tags":["Notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAllNotificationsStatusSchema"}}}},"responses":{"200":{"description":"All notifications status updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAllNotificationsStatusResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions":{"get":{"summary":"List all transactions","operationId":"listTransactions","x-speakeasy-name-override":"list","description":"Retrieve a list of transactions for the authenticated team.","tags":["Transactions"],"parameters":[{"schema":{"type":["string","null"],"description":"Cursor for pagination, representing the last item from the previous page","example":"eyJpZCI6IjEyMyJ9"},"required":false,"description":"Cursor for pagination, representing the last item from the previous page","in":"query","name":"cursor"},{"schema":{"type":["array","null"],"items":{"type":"string","minLength":1},"minItems":2,"maxItems":2,"description":"Sort as [column, direction]. Columns: date, amount, name, status, attachment, assigned, bank_account, category, tags, counterparty. Direction: asc or desc.","example":["date","desc"]},"required":false,"description":"Sort as [column, direction]. Columns: date, amount, name, status, attachment, assigned, bank_account, category, tags, counterparty. Direction: asc or desc.","in":"query","name":"sort"},{"schema":{"type":"number","minimum":1,"maximum":10000,"description":"Number of transactions to return per page (1-10000)","example":50},"required":false,"description":"Number of transactions to return per page (1-10000)","in":"query","name":"pageSize"},{"schema":{"type":["string","null"],"description":"Search query string to filter transactions by name, description, or other text fields","example":"office supplies"},"required":false,"description":"Search query string to filter transactions by name, description, or other text fields","in":"query","name":"q"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of category slugs to filter transactions by specific categories","example":["office-supplies","travel"]},"required":false,"description":"Array of category slugs to filter transactions by specific categories","in":"query","name":"categories"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of tag IDs to filter transactions by specific tags","example":["tag-1","tag-2"]},"required":false,"description":"Array of tag IDs to filter transactions by specific tags","in":"query","name":"tags"},{"schema":{"type":["string","null"],"description":"Start date (inclusive) for filtering transactions in ISO 8601 format","example":"2024-04-01T00:00:00.000Z"},"required":false,"description":"Start date (inclusive) for filtering transactions in ISO 8601 format","in":"query","name":"start"},{"schema":{"type":["string","null"],"description":"End date (inclusive) for filtering transactions in ISO 8601 format","example":"2024-04-30T23:59:59.999Z"},"required":false,"description":"End date (inclusive) for filtering transactions in ISO 8601 format","in":"query","name":"end"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of bank account IDs to filter transactions by specific accounts","example":["account-1","account-2"]},"required":false,"description":"Array of bank account IDs to filter transactions by specific accounts","in":"query","name":"accounts"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of user IDs to filter transactions by assigned users","example":["user-1","user-2"]},"required":false,"description":"Array of user IDs to filter transactions by assigned users","in":"query","name":"assignees"},{"schema":{"type":["array","null"],"items":{"type":"string","enum":["blank","receipt_match","in_review","export_error","exported","excluded","archived"]},"description":"Array of transaction list status filters. Supported UI filters: 'blank', 'receipt_match', 'in_review', 'export_error', 'exported', 'excluded', 'archived'","example":["in_review","export_error"]},"required":false,"description":"Array of transaction list status filters. Supported UI filters: 'blank', 'receipt_match', 'in_review', 'export_error', 'exported', 'excluded', 'archived'","in":"query","name":"statuses"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of recurring frequency values to filter by. Available frequencies: 'weekly', 'monthly', 'annually', 'irregular'","example":["monthly","annually"]},"required":false,"description":"Array of recurring frequency values to filter by. Available frequencies: 'weekly', 'monthly', 'annually', 'irregular'","in":"query","name":"recurring"},{"schema":{"type":["string","null"],"enum":["include","exclude",null],"description":"Filter transactions based on attachment presence. 'include' returns only transactions with attachments, 'exclude' returns only transactions without attachments","example":"include"},"required":false,"description":"Filter transactions based on attachment presence. 'include' returns only transactions with attachments, 'exclude' returns only transactions without attachments","in":"query","name":"attachments"},{"schema":{"type":["array","null"],"items":{"type":["number","null"]},"description":"Amount range as [min, max] to filter transactions by monetary value","example":[100,1000]},"required":false,"description":"Amount range as [min, max] to filter transactions by monetary value","in":"query","name":"amountRange"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of specific amounts (as strings) to filter transactions by exact values","example":["150.75","299.99"]},"required":false,"description":"Array of specific amounts (as strings) to filter transactions by exact values","in":"query","name":"amount"},{"schema":{"type":["string","null"],"enum":["income","expense",null],"description":"Filter by transaction type. 'income' for money received, 'expense' for money spent","example":"expense"},"required":false,"description":"Filter by transaction type. 'income' for money received, 'expense' for money spent","in":"query","name":"type"},{"schema":{"type":["string","null"],"enum":["include","exclude",null],"description":"Filter transactions based on whether they were manually imported. 'include' returns only manual transactions, 'exclude' returns only non-manual transactions","example":"include"},"required":false,"description":"Filter transactions based on whether they were manually imported. 'include' returns only manual transactions, 'exclude' returns only non-manual transactions","in":"query","name":"manual"},{"schema":{"type":["boolean","null"],"description":"Filter by export status. true = only exported transactions, false = only NOT exported transactions, undefined = no filter","example":false},"required":false,"description":"Filter by export status. true = only exported transactions, false = only NOT exported transactions, undefined = no filter","in":"query","name":"exported"},{"schema":{"type":["boolean","null"],"description":"Filter by fulfillment status. true = transactions ready for review (has attachments OR status=completed), false = not ready, undefined = no filter","example":true},"required":false,"description":"Filter by fulfillment status. true = transactions ready for review (has attachments OR status=completed), false = not ready, undefined = no filter","in":"query","name":"fulfilled"}],"responses":{"200":{"description":"Retrieve a list of transactions for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for the next page of results, undefined if no more pages","example":"eyJpZCI6IjQ1NiJ9"},"hasPreviousPage":{"type":"boolean","description":"Whether there are more transactions available on the previous page","example":false},"hasNextPage":{"type":"boolean","description":"Whether there are more transactions available on the next page","example":true}},"required":["hasPreviousPage","hasNextPage"],"description":"Pagination metadata for the transactions response"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionResponse"},"description":"Array of transactions matching the query criteria"}},"required":["meta","data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a transaction","operationId":"createTransaction","x-speakeasy-name-override":"create","description":"Create a transaction","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the transaction."},"amount":{"type":"number","description":"Amount of the transaction."},"currency":{"type":"string","description":"Currency of the transaction."},"date":{"type":"string","description":"Date of the transaction (ISO 8601)."},"bankAccountId":{"type":"string","description":"Bank account ID associated with the transaction."},"assignedId":{"type":"string","description":"Assigned user ID for the transaction."},"categorySlug":{"type":"string","description":"Category slug for the transaction."},"note":{"type":"string","description":"Note for the transaction."},"internal":{"type":"boolean","description":"Whether the transaction is internal."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/CreateTransactionAttachment"},"description":"Array of attachments for the transaction."}},"required":["name","amount","currency","date","bankAccountId"]}}}},"responses":{"200":{"description":"Transaction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/{id}":{"get":{"summary":"Retrieve a transaction","operationId":"getTransactionById","x-speakeasy-name-override":"get","description":"Retrieve a transaction by its ID for the authenticated team.","tags":["Transactions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Transaction ID (UUID)."},"required":true,"description":"Transaction ID (UUID).","in":"path","name":"id"}],"responses":{"200":{"description":"Transaction details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a transaction","operationId":"updateTransaction","x-speakeasy-name-override":"update","description":"Update a transaction for the authenticated team. If there's no change, returns it as it is.","tags":["Transactions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Transaction ID (UUID)."},"required":true,"description":"Transaction ID (UUID).","in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name/description of the transaction."},"amount":{"type":"number","description":"Amount of the transaction."},"currency":{"type":"string","description":"Currency of the transaction."},"date":{"type":"string","description":"Date of the transaction (ISO 8601)."},"bankAccountId":{"type":"string","description":"Bank account ID associated with the transaction."},"categorySlug":{"type":["string","null"],"description":"Category slug for the transaction."},"status":{"type":["string","null"],"enum":["pending","archived","completed","posted","excluded","exported",null],"description":"Status of the transaction."},"internal":{"type":"boolean","description":"Whether the transaction is internal."},"recurring":{"type":"boolean","description":"Whether the transaction is recurring."},"frequency":{"type":["string","null"],"enum":["weekly","monthly","annually","irregular",null],"description":"Recurring frequency of the transaction."},"note":{"type":["string","null"],"description":"Note for the transaction."},"assignedId":{"type":["string","null"],"description":"Assigned user ID for the transaction."},"taxRate":{"type":["number","null"],"description":"Tax rate as a percentage (e.g., 25 for 25% VAT). Only set when tax is calculated from a percentage."},"taxAmount":{"type":["number","null"],"description":"Tax amount in the transaction currency. Always set when tax is present."}}}}}},"responses":{"200":{"description":"Transaction updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a transaction","operationId":"deleteTransaction","x-speakeasy-name-override":"delete","description":"Delete a transaction for the authenticated team. Only manually created transactions can be deleted via this endpoint or the form. Transactions inserted by bank connections cannot be deleted, but can be excluded by updating the status.","tags":["Transactions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Transaction ID (UUID)."},"required":true,"description":"Transaction ID (UUID).","in":"path","name":"id"}],"responses":{"200":{"description":"Transaction deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Transaction ID (UUID)."}},"required":["id"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/{transactionId}/attachments/{attachmentId}/presigned-url":{"post":{"summary":"Generate pre-signed URL for transaction attachment","operationId":"getTransactionAttachmentPreSignedUrl","x-speakeasy-name-override":"getAttachmentPreSignedUrl","description":"Generate a pre-signed URL for accessing a transaction attachment. The URL is valid for 60 seconds and allows secure temporary access to the attachment file.","tags":["Transactions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the transaction","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the transaction","in":"path","name":"transactionId"},{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the attachment to generate a pre-signed URL for","example":"a43dc3a5-6925-4d91-ac9c-4c1a34bdb388"},"required":true,"description":"Unique identifier of the attachment to generate a pre-signed URL for","in":"path","name":"attachmentId"},{"schema":{"type":["boolean","null"],"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","example":true},"required":false,"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","in":"query","name":"download"}],"responses":{"200":{"description":"Pre-signed URL generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Pre-signed URL for accessing the attachment, valid for 60 seconds","example":"https://service.dino.id/storage/v1/object/sign/vault/transactions/receipt.pdf?token=abc123&expires=1640995200"},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the URL expires","example":"2024-04-15T10:01:00.000Z"},"fileName":{"type":["string","null"],"description":"Original filename of the attachment","example":"receipt.pdf"}},"required":["url","expiresAt","fileName"]}}}},"400":{"description":"Bad request - Attachment file path not available","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Transaction or attachment not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error - Failed to generate pre-signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/transactions/bulk":{"patch":{"summary":"Bulk update transactions","operationId":"updateTransactions","x-speakeasy-name-override":"updateMany","description":"Bulk update transactions for the authenticated team. If there's no change, returns it as it is.","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Array of transaction IDs to update."},"categorySlug":{"type":["string","null"],"description":"Category slug for the transactions."},"status":{"type":["string","null"],"enum":["pending","archived","completed","posted","excluded","exported",null],"description":"Status to set for the transactions."},"frequency":{"type":["string","null"],"enum":["weekly","monthly","annually","irregular",null],"description":"Recurring frequency to set for the transactions."},"internal":{"type":"boolean","description":"Whether the transactions are internal."},"note":{"type":["string","null"],"description":"Note to set for the transactions."},"assignedId":{"type":["string","null"],"description":"Assigned user ID for the transactions."},"recurring":{"type":"boolean","description":"Whether the transactions are recurring."},"tagId":{"type":["string","null"],"description":"Tag ID to set for the transactions."}},"required":["ids"]}}}},"responses":{"200":{"description":"Transactions updated","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for the next page of results, undefined if no more pages","example":"eyJpZCI6IjQ1NiJ9"},"hasPreviousPage":{"type":"boolean","description":"Whether there are more transactions available on the previous page","example":false},"hasNextPage":{"type":"boolean","description":"Whether there are more transactions available on the next page","example":true}},"required":["hasPreviousPage","hasNextPage"],"description":"Pagination metadata for the transactions response"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionResponse"},"description":"Array of transactions matching the query criteria"}},"required":["meta","data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Bulk create transactions","operationId":"createTransactions","x-speakeasy-name-override":"createMany","description":"Bulk create transactions for the authenticated team.","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the transaction."},"amount":{"type":"number","description":"Amount of the transaction."},"currency":{"type":"string","description":"Currency of the transaction."},"date":{"type":"string","description":"Date of the transaction (ISO 8601)."},"bankAccountId":{"type":"string","description":"Bank account ID associated with the transaction."},"assignedId":{"type":"string","description":"Assigned user ID for the transaction."},"categorySlug":{"type":"string","description":"Category slug for the transaction."},"note":{"type":"string","description":"Note for the transaction."},"internal":{"type":"boolean","description":"Whether the transaction is internal."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/CreateTransactionAttachment"},"description":"Array of attachments for the transaction."}},"required":["name","amount","currency","date","bankAccountId"]},"minItems":1,"maxItems":100,"description":"List of transactions to create."}}}},"responses":{"200":{"description":"Transactions created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionResponse"}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Bulk delete transactions","operationId":"deleteTransactions","x-speakeasy-name-override":"deleteMany","description":"Bulk delete transactions for the authenticated team. Only manually created transactions can be deleted via this endpoint or the form. Transactions inserted by bank connections cannot be deleted, but can be excluded by updating the status.","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":1000,"description":"List of transaction IDs to delete."}}}},"responses":{"200":{"description":"Transactions deleted","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Transaction ID (UUID)."}},"required":["id"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/teams":{"get":{"summary":"List all teams","operationId":"listTeams","x-speakeasy-name-override":"list","description":"Retrieve a list of teams for the authenticated user.","tags":["Teams"],"responses":{"200":{"description":"Retrieve a list of teams for the authenticated user.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the team or organization","example":"Acme Corporation"},"logoUrl":{"type":["string","null"],"format":"uri","description":"URL to the team's logo image","example":"https://cdn.dino.id/logos/acme-corp.png"},"plan":{"type":"string","enum":["trial","starter","pro"],"description":"Current subscription plan of the team","example":"pro"},"email":{"type":["string","null"],"format":"email","description":"Primary contact email address for the team","example":"team@acme.com"},"baseCurrency":{"type":["string","null"],"description":"Base currency for the team in ISO 4217 format (3-letter currency code)","example":"USD"},"countryCode":{"type":["string","null"],"description":"Country code for the team in ISO 3166-1 alpha-2 format","example":"US"},"fiscalYearStartMonth":{"type":["integer","null"],"minimum":1,"maximum":12,"description":"Month when the fiscal year starts (1-12). Null for trailing 12 months.","example":1}},"required":["id","name","logoUrl","plan"]},"description":"Array of teams that the user has access to"}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/teams/{id}":{"get":{"summary":"Retrieve a team","operationId":"getTeamById","x-speakeasy-name-override":"get","description":"Retrieve a team by its ID for the authenticated team.","tags":["Teams"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"description":"Unique identifier of the team","in":"path","name":"id"}],"responses":{"200":{"description":"Team details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the team or organization","example":"Acme Corporation"},"logoUrl":{"type":["string","null"],"format":"uri","description":"URL to the team's logo image","example":"https://cdn.dino.id/logos/acme-corp.png"},"plan":{"type":"string","enum":["trial","starter","pro"],"description":"Current subscription plan of the team","example":"pro"},"email":{"type":["string","null"],"format":"email","description":"Primary contact email address for the team","example":"team@acme.com"},"baseCurrency":{"type":["string","null"],"description":"Base currency for the team in ISO 4217 format (3-letter currency code)","example":"USD"},"countryCode":{"type":["string","null"],"description":"Country code for the team in ISO 3166-1 alpha-2 format","example":"US"},"fiscalYearStartMonth":{"type":["integer","null"],"minimum":1,"maximum":12,"description":"Month when the fiscal year starts (1-12). Null for trailing 12 months.","example":1}},"required":["id","name","logoUrl","plan"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a team","operationId":"updateTeamById","x-speakeasy-name-override":"update","description":"Update a team for the authenticated workspace. If there’s no change, returns it as it is.","tags":["Teams"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"description":"Unique identifier of the team","in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":32,"description":"Name of the team or organization. Must be between 2 and 32 characters","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary contact email address for the team","example":"team@acme.com"},"logoUrl":{"type":"string","format":"uri","description":"URL to the team's logo image. Must be hosted on dino.id domain","example":"https://cdn.dino.id/logos/acme-corp.png"},"baseCurrency":{"type":"string","description":"Base currency for the team in ISO 4217 format (3-letter currency code)","example":"USD"},"countryCode":{"type":"string","description":"Country code for the team","example":"US"},"fiscalYearStartMonth":{"type":["integer","null"],"minimum":1,"maximum":12,"description":"Month when the fiscal year starts (1-12). Null for trailing 12 months. Defaults based on country if not specified.","example":4},"exportSettings":{"type":"object","properties":{"csvDelimiter":{"type":"string"},"includeCSV":{"type":"boolean"},"includeXLSX":{"type":"boolean"},"sendEmail":{"type":"boolean"},"sendCopyToMe":{"type":"boolean"},"accountantEmail":{"type":"string"}},"required":["csvDelimiter","includeCSV","includeXLSX","sendEmail"],"description":"Export settings for transactions"},"companyType":{"type":"string","enum":["individual","ai_agent","freelancer","solo_founder","small_team","startup","agency","ecommerce","creator","non_profit","accountant","exploring"],"description":"Type of company or team","example":"solo_founder"},"heardAbout":{"type":"string","enum":["twitter","youtube","friend","google","blog","podcast","github","other"],"description":"How the user heard about the product","example":"twitter"}}}}}},"responses":{"200":{"description":"Team updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the team or organization","example":"Acme Corporation"},"logoUrl":{"type":["string","null"],"format":"uri","description":"URL to the team's logo image","example":"https://cdn.dino.id/logos/acme-corp.png"},"plan":{"type":"string","enum":["trial","starter","pro"],"description":"Current subscription plan of the team","example":"pro"},"email":{"type":["string","null"],"format":"email","description":"Primary contact email address for the team","example":"team@acme.com"},"baseCurrency":{"type":["string","null"],"description":"Base currency for the team in ISO 4217 format (3-letter currency code)","example":"USD"},"countryCode":{"type":["string","null"],"description":"Country code for the team in ISO 3166-1 alpha-2 format","example":"US"},"fiscalYearStartMonth":{"type":["integer","null"],"minimum":1,"maximum":12,"description":"Month when the fiscal year starts (1-12). Null for trailing 12 months.","example":1}},"required":["id","name","logoUrl","plan"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/teams/{id}/members":{"get":{"summary":"List all team members","operationId":"listTeamMembers","x-speakeasy-name-override":"members","description":"List all team members for the authenticated team.","tags":["Teams"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"description":"Unique identifier of the team","in":"path","name":"id"}],"responses":{"200":{"description":"Team members","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"123e4567-e89b-12d3-a456-426614174000"},"role":{"type":"string","enum":["owner","member"],"description":"Role of the team member. 'owner' has full permissions, 'member' has limited permissions","example":"owner"},"fullName":{"type":"string","description":"Full name of the team member","example":"John Doe"},"avatarUrl":{"type":["string","null"],"format":"uri","description":"URL to the team member's avatar image","example":"https://cdn.dino.id/avatars/john-doe.png"}},"required":["id","role","fullName","avatarUrl"]},"description":"Array of team members with their roles and information"}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/users/me":{"get":{"summary":"Retrieve the current user","operationId":"getCurrentUser","x-speakeasy-name-override":"get","description":"Retrieve the current user for the authenticated team.","tags":["Users"],"responses":{"200":{"description":"Retrieve the current user for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"123e4567-e89b-12d3-a456-426614174000"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"email":{"type":"string","format":"email","description":"Email address of the user","example":"jane.doe@acme.com"},"avatarUrl":{"type":["string","null"],"format":"uri","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatars/jane-doe.jpg"},"locale":{"type":["string","null"],"description":"User's preferred locale for internationalization (language and region)","example":"en-US"},"weekStartsOnMonday":{"type":["boolean","null"],"description":"Whether the user's calendar week starts on Monday (true) or Sunday (false)","example":true},"timezone":{"type":["string","null"],"description":"User's timezone identifier in IANA Time Zone Database format","example":"America/New_York"},"timezoneAutoSync":{"type":["boolean","null"],"description":"Whether to automatically sync timezone with browser timezone","example":true},"timeFormat":{"type":["number","null"],"description":"User's preferred time format: 12 for 12-hour format, 24 for 24-hour format","example":24},"dateFormat":{"type":["string","null"],"enum":["dd/MM/yyyy","MM/dd/yyyy","yyyy-MM-dd","dd.MM.yyyy",null],"description":"User's preferred date format. Available options: 'dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd', 'dd.MM.yyyy'","example":"yyyy-MM-dd","x-speakeasy-enums":["ddSlashMMSlashyyyy","MMSlashddSlashyyyy","yyyyDashMMDashdd","ddDotMMDotyyyy","null"]},"fileKey":{"type":["string","null"],"description":"Team file key (JWT token) for proxy/download access to team files. This compact JWT token contains the team ID and is shared by all team members. Use this token as the `fk` query parameter when accessing file endpoints (proxy, download). The token is team-scoped and provides access to files belonging to the user's team. Returns null if the user has no team.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZWFtSWQiOiIxMjM0NTY3OC05YWJjLWRlZmctMTIzNC01Njc4OTBhYmNkZWYifQ.signature"},"team":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the team or organization","example":"Acme Corporation"},"logoUrl":{"type":["string","null"],"format":"uri","description":"URL to the team's logo image","example":"https://cdn.dino.id/logos/acme-corp.png"},"plan":{"type":"string","description":"Current subscription plan of the team","example":"pro"}},"required":["id","name","logoUrl","plan"],"description":"Team information that the user belongs to"}},"required":["id","fullName","email","avatarUrl","locale","weekStartsOnMonday","timezone","timezoneAutoSync","timeFormat","dateFormat","fileKey","team"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current user","operationId":"updateCurrentUser","x-speakeasy-name-override":"update","description":"Update the current user for the authenticated team.","tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string","minLength":2,"maxLength":32,"description":"Full name of the user. Must be between 2 and 32 characters","example":"Jane Doe"},"email":{"type":"string","format":"email","description":"Email address of the user","example":"jane.doe@acme.com"},"avatarUrl":{"type":"string","format":"uri","description":"URL to the user's avatar image. Must be hosted on dino.id domain","example":"https://cdn.dino.id/avatars/jane-doe.jpg"},"locale":{"type":"string","description":"User's preferred locale for internationalization (language and region)","example":"en-US"},"weekStartsOnMonday":{"type":"boolean","description":"Whether the user's calendar week starts on Monday (true) or Sunday (false)","example":true},"timezone":{"type":"string","description":"User's timezone identifier in IANA Time Zone Database format","example":"America/New_York"},"timezoneAutoSync":{"type":"boolean","description":"Whether to automatically sync timezone with browser timezone","example":true},"timeFormat":{"type":"number","description":"User's preferred time format: 12 for 12-hour format, 24 for 24-hour format","example":24},"dateFormat":{"type":"string","enum":["dd/MM/yyyy","MM/dd/yyyy","yyyy-MM-dd","dd.MM.yyyy"],"description":"User's preferred date format. Available options: 'dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd', 'dd.MM.yyyy'","example":"yyyy-MM-dd","x-speakeasy-enums":["ddSlashMMSlashyyyy","MMSlashddSlashyyyy","yyyyDashMMDashdd","ddDotMMDotyyyy"]}}}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"123e4567-e89b-12d3-a456-426614174000"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"email":{"type":"string","format":"email","description":"Email address of the user","example":"jane.doe@acme.com"},"avatarUrl":{"type":["string","null"],"format":"uri","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatars/jane-doe.jpg"},"locale":{"type":["string","null"],"description":"User's preferred locale for internationalization (language and region)","example":"en-US"},"weekStartsOnMonday":{"type":["boolean","null"],"description":"Whether the user's calendar week starts on Monday (true) or Sunday (false)","example":true},"timezone":{"type":["string","null"],"description":"User's timezone identifier in IANA Time Zone Database format","example":"America/New_York"},"timezoneAutoSync":{"type":["boolean","null"],"description":"Whether to automatically sync timezone with browser timezone","example":true},"timeFormat":{"type":["number","null"],"description":"User's preferred time format: 12 for 12-hour format, 24 for 24-hour format","example":24},"dateFormat":{"type":["string","null"],"enum":["dd/MM/yyyy","MM/dd/yyyy","yyyy-MM-dd","dd.MM.yyyy",null],"description":"User's preferred date format. Available options: 'dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd', 'dd.MM.yyyy'","example":"yyyy-MM-dd","x-speakeasy-enums":["ddSlashMMSlashyyyy","MMSlashddSlashyyyy","yyyyDashMMDashdd","ddDotMMDotyyyy","null"]},"fileKey":{"type":["string","null"],"description":"Team file key (JWT token) for proxy/download access to team files. This compact JWT token contains the team ID and is shared by all team members. Use this token as the `fk` query parameter when accessing file endpoints (proxy, download). The token is team-scoped and provides access to files belonging to the user's team. Returns null if the user has no team.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZWFtSWQiOiIxMjM0NTY3OC05YWJjLWRlZmctMTIzNC01Njc4OTBhYmNkZWYifQ.signature"},"team":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the team","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Name of the team or organization","example":"Acme Corporation"},"logoUrl":{"type":["string","null"],"format":"uri","description":"URL to the team's logo image","example":"https://cdn.dino.id/logos/acme-corp.png"},"plan":{"type":"string","description":"Current subscription plan of the team","example":"pro"}},"required":["id","name","logoUrl","plan"],"description":"Team information that the user belongs to"}},"required":["id","fullName","email","avatarUrl","locale","weekStartsOnMonday","timezone","timezoneAutoSync","timeFormat","dateFormat","fileKey","team"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/customers":{"get":{"summary":"List all customers","operationId":"listCustomers","x-speakeasy-name-override":"list","description":"Retrieve a list of customers for the authenticated team.","tags":["Customers"],"parameters":[{"schema":{"type":["string","null"],"description":"Search query string to filter customers by name, email, or other text fields","example":"acme"},"required":false,"description":"Search query string to filter customers by name, email, or other text fields","in":"query","name":"q"},{"schema":{"type":["array","null"],"items":{"type":"string","minLength":1},"minItems":2,"maxItems":2,"description":"Sort as [column, direction]. Columns: name, created_at, contact, email, invoices, projects, tags, industry, country, total_revenue, outstanding, last_invoice. Direction: asc or desc.","example":["name","asc"]},"required":false,"description":"Sort as [column, direction]. Columns: name, created_at, contact, email, invoices, projects, tags, industry, country, total_revenue, outstanding, last_invoice. Direction: asc or desc.","in":"query","name":"sort"},{"schema":{"type":"string","description":"Cursor for pagination, representing the last item from the previous page","example":"eyJpZCI6IjEyMyJ9"},"required":false,"description":"Cursor for pagination, representing the last item from the previous page","in":"query","name":"cursor"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of customers to return per page (1-100)","example":20},"required":false,"description":"Number of customers to return per page (1-100)","in":"query","name":"pageSize"}],"responses":{"200":{"description":"Retrieve a list of customers for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":["string","null"],"description":"Cursor for the next page of results, null if no more pages","example":"eyJpZCI6IjQ1NiJ9"},"hasPreviousPage":{"type":"boolean","description":"Whether there are more customers available on the previous page","example":false},"hasNextPage":{"type":"boolean","description":"Whether there are more customers available on the next page","example":true}},"required":["cursor","hasPreviousPage","hasNextPage"],"description":"Pagination metadata for the customers response"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"createdAt":{"type":"string","description":"Date and time when the customer was created in ISO 8601 format","example":"2024-05-01T12:34:56.789Z"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"token":{"type":"string","description":"Unique token for the customer (used for internal identification)","example":"cus_abc123xyz789"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"source":{"type":["string","null"],"description":"Origin system for this customer record (for example: manual, import, quickbooks, xero, agent_counterparty).","example":"manual"},"externalId":{"type":["string","null"],"description":"External reference ID when synced from another system.","example":"cus_ext_123"},"invoiceCount":{"type":"number","description":"Total number of invoices created for this customer","example":12},"projectCount":{"type":"number","description":"Total number of projects associated with this customer","example":3},"totalRevenue":{"type":"number","description":"Total revenue from paid invoices for this customer (in invoice currency). Only returned in list queries.","example":15000.5},"outstandingAmount":{"type":"number","description":"Total outstanding amount from unpaid/overdue invoices (in invoice currency). Only returned in list queries.","example":2500},"lastInvoiceDate":{"type":["string","null"],"description":"Date of the most recent invoice in ISO 8601 format. Only returned in list queries.","example":"2024-04-15"},"invoiceCurrency":{"type":["string","null"],"description":"Primary currency used in invoices for this customer. Only returned in list queries.","example":"USD"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags associated with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]},"description":{"type":["string","null"],"description":"AI-generated description of what the company does","example":"A cloud-based project management platform for remote teams."},"industry":{"type":["string","null"],"description":"Primary industry of the company","example":"Software"},"companyType":{"type":["string","null"],"description":"Business model type","example":"SaaS"},"employeeCount":{"type":["string","null"],"description":"Estimated number of employees","example":"51-200"},"foundedYear":{"type":["number","null"],"description":"Year the company was founded","example":2018},"estimatedRevenue":{"type":["string","null"],"description":"Estimated annual revenue range","example":"$10M-$50M"},"fundingStage":{"type":["string","null"],"description":"Current funding stage","example":"Series A"},"totalFunding":{"type":["string","null"],"description":"Total funding raised","example":"$15M"},"headquartersLocation":{"type":["string","null"],"description":"Company headquarters location","example":"San Francisco, CA"},"timezone":{"type":["string","null"],"description":"IANA timezone of the company headquarters","example":"America/Los_Angeles"},"linkedinUrl":{"type":["string","null"],"description":"LinkedIn company page URL","example":"https://linkedin.com/company/acme"},"twitterUrl":{"type":["string","null"],"description":"Twitter/X profile URL","example":"https://twitter.com/acme"},"instagramUrl":{"type":["string","null"],"description":"Instagram profile URL","example":"https://instagram.com/acme"},"facebookUrl":{"type":["string","null"],"description":"Facebook page URL","example":"https://facebook.com/acme"},"logoUrl":{"type":["string","null"],"description":"URL to the company logo","example":"https://example.com/logo.png"},"ceoName":{"type":["string","null"],"description":"Name of the CEO or founder","example":"Jane Smith"},"financeContact":{"type":["string","null"],"description":"Name of the finance/AP contact for invoicing","example":"John Doe"},"financeContactEmail":{"type":["string","null"],"description":"Email of the finance/AP contact","example":"finance@acme.com"},"primaryLanguage":{"type":["string","null"],"description":"Primary business language (ISO 639-1 code)","example":"en"},"fiscalYearEnd":{"type":["string","null"],"description":"Month when the fiscal year ends","example":"December"},"enrichmentStatus":{"type":["string","null"],"description":"Status of the enrichment process","example":"completed"},"enrichedAt":{"type":["string","null"],"description":"When the customer was last enriched","example":"2024-05-01T12:34:56.789Z"}},"required":["id","name","email","billingEmail","phone","website","createdAt","country","addressLine1","addressLine2","city","state","zip","note","vatNumber","countryCode","token","contact","invoiceCount","projectCount","tags","description","industry","companyType","employeeCount","foundedYear","estimatedRevenue","fundingStage","totalFunding","headquartersLocation","timezone","linkedinUrl","twitterUrl","instagramUrl","facebookUrl","logoUrl","ceoName","financeContact","financeContactEmail","primaryLanguage","fiscalYearEnd","enrichmentStatus","enrichedAt"]},"description":"Array of customers matching the query criteria"}},"required":["meta","data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create customer","operationId":"createCustomer","x-speakeasy-name-override":"create","description":"Create a new customer for the authenticated team.","tags":["Customers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer. Required for updates, omit for new customers","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags to associate with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]}},"required":["name","email"]}}}},"responses":{"201":{"description":"Customer created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"createdAt":{"type":"string","description":"Date and time when the customer was created in ISO 8601 format","example":"2024-05-01T12:34:56.789Z"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"token":{"type":"string","description":"Unique token for the customer (used for internal identification)","example":"cus_abc123xyz789"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"source":{"type":["string","null"],"description":"Origin system for this customer record (for example: manual, import, quickbooks, xero, agent_counterparty).","example":"manual"},"externalId":{"type":["string","null"],"description":"External reference ID when synced from another system.","example":"cus_ext_123"},"invoiceCount":{"type":"number","description":"Total number of invoices created for this customer","example":12},"projectCount":{"type":"number","description":"Total number of projects associated with this customer","example":3},"totalRevenue":{"type":"number","description":"Total revenue from paid invoices for this customer (in invoice currency). Only returned in list queries.","example":15000.5},"outstandingAmount":{"type":"number","description":"Total outstanding amount from unpaid/overdue invoices (in invoice currency). Only returned in list queries.","example":2500},"lastInvoiceDate":{"type":["string","null"],"description":"Date of the most recent invoice in ISO 8601 format. Only returned in list queries.","example":"2024-04-15"},"invoiceCurrency":{"type":["string","null"],"description":"Primary currency used in invoices for this customer. Only returned in list queries.","example":"USD"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags associated with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]},"description":{"type":["string","null"],"description":"AI-generated description of what the company does","example":"A cloud-based project management platform for remote teams."},"industry":{"type":["string","null"],"description":"Primary industry of the company","example":"Software"},"companyType":{"type":["string","null"],"description":"Business model type","example":"SaaS"},"employeeCount":{"type":["string","null"],"description":"Estimated number of employees","example":"51-200"},"foundedYear":{"type":["number","null"],"description":"Year the company was founded","example":2018},"estimatedRevenue":{"type":["string","null"],"description":"Estimated annual revenue range","example":"$10M-$50M"},"fundingStage":{"type":["string","null"],"description":"Current funding stage","example":"Series A"},"totalFunding":{"type":["string","null"],"description":"Total funding raised","example":"$15M"},"headquartersLocation":{"type":["string","null"],"description":"Company headquarters location","example":"San Francisco, CA"},"timezone":{"type":["string","null"],"description":"IANA timezone of the company headquarters","example":"America/Los_Angeles"},"linkedinUrl":{"type":["string","null"],"description":"LinkedIn company page URL","example":"https://linkedin.com/company/acme"},"twitterUrl":{"type":["string","null"],"description":"Twitter/X profile URL","example":"https://twitter.com/acme"},"instagramUrl":{"type":["string","null"],"description":"Instagram profile URL","example":"https://instagram.com/acme"},"facebookUrl":{"type":["string","null"],"description":"Facebook page URL","example":"https://facebook.com/acme"},"logoUrl":{"type":["string","null"],"description":"URL to the company logo","example":"https://example.com/logo.png"},"ceoName":{"type":["string","null"],"description":"Name of the CEO or founder","example":"Jane Smith"},"financeContact":{"type":["string","null"],"description":"Name of the finance/AP contact for invoicing","example":"John Doe"},"financeContactEmail":{"type":["string","null"],"description":"Email of the finance/AP contact","example":"finance@acme.com"},"primaryLanguage":{"type":["string","null"],"description":"Primary business language (ISO 639-1 code)","example":"en"},"fiscalYearEnd":{"type":["string","null"],"description":"Month when the fiscal year ends","example":"December"},"enrichmentStatus":{"type":["string","null"],"description":"Status of the enrichment process","example":"completed"},"enrichedAt":{"type":["string","null"],"description":"When the customer was last enriched","example":"2024-05-01T12:34:56.789Z"}},"required":["id","name","email","billingEmail","phone","website","createdAt","country","addressLine1","addressLine2","city","state","zip","note","vatNumber","countryCode","token","contact","invoiceCount","projectCount","tags","description","industry","companyType","employeeCount","foundedYear","estimatedRevenue","fundingStage","totalFunding","headquartersLocation","timezone","linkedinUrl","twitterUrl","instagramUrl","facebookUrl","logoUrl","ceoName","financeContact","financeContactEmail","primaryLanguage","fiscalYearEnd","enrichmentStatus","enrichedAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/customers/{id}":{"get":{"summary":"Retrieve a customer","operationId":"getCustomerById","x-speakeasy-name-override":"get","description":"Retrieve a customer by ID for the authenticated team.","tags":["Customers"],"parameters":[{"schema":{"type":"string","description":"Unique identifier of the customer to retrieve","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the customer to retrieve","in":"path","name":"id"}],"responses":{"200":{"description":"Retrieve a customer by ID for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"createdAt":{"type":"string","description":"Date and time when the customer was created in ISO 8601 format","example":"2024-05-01T12:34:56.789Z"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"token":{"type":"string","description":"Unique token for the customer (used for internal identification)","example":"cus_abc123xyz789"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"source":{"type":["string","null"],"description":"Origin system for this customer record (for example: manual, import, quickbooks, xero, agent_counterparty).","example":"manual"},"externalId":{"type":["string","null"],"description":"External reference ID when synced from another system.","example":"cus_ext_123"},"invoiceCount":{"type":"number","description":"Total number of invoices created for this customer","example":12},"projectCount":{"type":"number","description":"Total number of projects associated with this customer","example":3},"totalRevenue":{"type":"number","description":"Total revenue from paid invoices for this customer (in invoice currency). Only returned in list queries.","example":15000.5},"outstandingAmount":{"type":"number","description":"Total outstanding amount from unpaid/overdue invoices (in invoice currency). Only returned in list queries.","example":2500},"lastInvoiceDate":{"type":["string","null"],"description":"Date of the most recent invoice in ISO 8601 format. Only returned in list queries.","example":"2024-04-15"},"invoiceCurrency":{"type":["string","null"],"description":"Primary currency used in invoices for this customer. Only returned in list queries.","example":"USD"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags associated with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]},"description":{"type":["string","null"],"description":"AI-generated description of what the company does","example":"A cloud-based project management platform for remote teams."},"industry":{"type":["string","null"],"description":"Primary industry of the company","example":"Software"},"companyType":{"type":["string","null"],"description":"Business model type","example":"SaaS"},"employeeCount":{"type":["string","null"],"description":"Estimated number of employees","example":"51-200"},"foundedYear":{"type":["number","null"],"description":"Year the company was founded","example":2018},"estimatedRevenue":{"type":["string","null"],"description":"Estimated annual revenue range","example":"$10M-$50M"},"fundingStage":{"type":["string","null"],"description":"Current funding stage","example":"Series A"},"totalFunding":{"type":["string","null"],"description":"Total funding raised","example":"$15M"},"headquartersLocation":{"type":["string","null"],"description":"Company headquarters location","example":"San Francisco, CA"},"timezone":{"type":["string","null"],"description":"IANA timezone of the company headquarters","example":"America/Los_Angeles"},"linkedinUrl":{"type":["string","null"],"description":"LinkedIn company page URL","example":"https://linkedin.com/company/acme"},"twitterUrl":{"type":["string","null"],"description":"Twitter/X profile URL","example":"https://twitter.com/acme"},"instagramUrl":{"type":["string","null"],"description":"Instagram profile URL","example":"https://instagram.com/acme"},"facebookUrl":{"type":["string","null"],"description":"Facebook page URL","example":"https://facebook.com/acme"},"logoUrl":{"type":["string","null"],"description":"URL to the company logo","example":"https://example.com/logo.png"},"ceoName":{"type":["string","null"],"description":"Name of the CEO or founder","example":"Jane Smith"},"financeContact":{"type":["string","null"],"description":"Name of the finance/AP contact for invoicing","example":"John Doe"},"financeContactEmail":{"type":["string","null"],"description":"Email of the finance/AP contact","example":"finance@acme.com"},"primaryLanguage":{"type":["string","null"],"description":"Primary business language (ISO 639-1 code)","example":"en"},"fiscalYearEnd":{"type":["string","null"],"description":"Month when the fiscal year ends","example":"December"},"enrichmentStatus":{"type":["string","null"],"description":"Status of the enrichment process","example":"completed"},"enrichedAt":{"type":["string","null"],"description":"When the customer was last enriched","example":"2024-05-01T12:34:56.789Z"}},"required":["id","name","email","billingEmail","phone","website","createdAt","country","addressLine1","addressLine2","city","state","zip","note","vatNumber","countryCode","token","contact","invoiceCount","projectCount","tags","description","industry","companyType","employeeCount","foundedYear","estimatedRevenue","fundingStage","totalFunding","headquartersLocation","timezone","linkedinUrl","twitterUrl","instagramUrl","facebookUrl","logoUrl","ceoName","financeContact","financeContactEmail","primaryLanguage","fiscalYearEnd","enrichmentStatus","enrichedAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a customer","operationId":"updateCustomer","x-speakeasy-name-override":"update","description":"Update a customer by ID for the authenticated team.","tags":["Customers"],"parameters":[{"schema":{"type":"string","description":"Unique identifier of the customer to retrieve","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the customer to retrieve","in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer. Required for updates, omit for new customers","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags to associate with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]}},"required":["name","email"]}}}},"responses":{"200":{"description":"Customer updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"createdAt":{"type":"string","description":"Date and time when the customer was created in ISO 8601 format","example":"2024-05-01T12:34:56.789Z"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"token":{"type":"string","description":"Unique token for the customer (used for internal identification)","example":"cus_abc123xyz789"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"source":{"type":["string","null"],"description":"Origin system for this customer record (for example: manual, import, quickbooks, xero, agent_counterparty).","example":"manual"},"externalId":{"type":["string","null"],"description":"External reference ID when synced from another system.","example":"cus_ext_123"},"invoiceCount":{"type":"number","description":"Total number of invoices created for this customer","example":12},"projectCount":{"type":"number","description":"Total number of projects associated with this customer","example":3},"totalRevenue":{"type":"number","description":"Total revenue from paid invoices for this customer (in invoice currency). Only returned in list queries.","example":15000.5},"outstandingAmount":{"type":"number","description":"Total outstanding amount from unpaid/overdue invoices (in invoice currency). Only returned in list queries.","example":2500},"lastInvoiceDate":{"type":["string","null"],"description":"Date of the most recent invoice in ISO 8601 format. Only returned in list queries.","example":"2024-04-15"},"invoiceCurrency":{"type":["string","null"],"description":"Primary currency used in invoices for this customer. Only returned in list queries.","example":"USD"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags associated with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]},"description":{"type":["string","null"],"description":"AI-generated description of what the company does","example":"A cloud-based project management platform for remote teams."},"industry":{"type":["string","null"],"description":"Primary industry of the company","example":"Software"},"companyType":{"type":["string","null"],"description":"Business model type","example":"SaaS"},"employeeCount":{"type":["string","null"],"description":"Estimated number of employees","example":"51-200"},"foundedYear":{"type":["number","null"],"description":"Year the company was founded","example":2018},"estimatedRevenue":{"type":["string","null"],"description":"Estimated annual revenue range","example":"$10M-$50M"},"fundingStage":{"type":["string","null"],"description":"Current funding stage","example":"Series A"},"totalFunding":{"type":["string","null"],"description":"Total funding raised","example":"$15M"},"headquartersLocation":{"type":["string","null"],"description":"Company headquarters location","example":"San Francisco, CA"},"timezone":{"type":["string","null"],"description":"IANA timezone of the company headquarters","example":"America/Los_Angeles"},"linkedinUrl":{"type":["string","null"],"description":"LinkedIn company page URL","example":"https://linkedin.com/company/acme"},"twitterUrl":{"type":["string","null"],"description":"Twitter/X profile URL","example":"https://twitter.com/acme"},"instagramUrl":{"type":["string","null"],"description":"Instagram profile URL","example":"https://instagram.com/acme"},"facebookUrl":{"type":["string","null"],"description":"Facebook page URL","example":"https://facebook.com/acme"},"logoUrl":{"type":["string","null"],"description":"URL to the company logo","example":"https://example.com/logo.png"},"ceoName":{"type":["string","null"],"description":"Name of the CEO or founder","example":"Jane Smith"},"financeContact":{"type":["string","null"],"description":"Name of the finance/AP contact for invoicing","example":"John Doe"},"financeContactEmail":{"type":["string","null"],"description":"Email of the finance/AP contact","example":"finance@acme.com"},"primaryLanguage":{"type":["string","null"],"description":"Primary business language (ISO 639-1 code)","example":"en"},"fiscalYearEnd":{"type":["string","null"],"description":"Month when the fiscal year ends","example":"December"},"enrichmentStatus":{"type":["string","null"],"description":"Status of the enrichment process","example":"completed"},"enrichedAt":{"type":["string","null"],"description":"When the customer was last enriched","example":"2024-05-01T12:34:56.789Z"}},"required":["id","name","email","billingEmail","phone","website","createdAt","country","addressLine1","addressLine2","city","state","zip","note","vatNumber","countryCode","token","contact","invoiceCount","projectCount","tags","description","industry","companyType","employeeCount","foundedYear","estimatedRevenue","fundingStage","totalFunding","headquartersLocation","timezone","linkedinUrl","twitterUrl","instagramUrl","facebookUrl","logoUrl","ceoName","financeContact","financeContactEmail","primaryLanguage","fiscalYearEnd","enrichmentStatus","enrichedAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a customer","operationId":"deleteCustomer","x-speakeasy-name-override":"delete","description":"Delete a customer by ID for the authenticated team.","tags":["Customers"],"parameters":[{"schema":{"type":"string","description":"Unique identifier of the customer to retrieve","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the customer to retrieve","in":"path","name":"id"}],"responses":{"200":{"description":"Customer deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the customer","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"},"email":{"type":"string","format":"email","description":"Primary email address of the customer","example":"contact@acme.com"},"billingEmail":{"type":["string","null"],"description":"Billing email addresses of the customer (comma-separated for multiple)","example":"finance@acme.com, accounting@acme.com"},"phone":{"type":["string","null"],"description":"Primary phone number of the customer","example":"+1-555-123-4567"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"createdAt":{"type":"string","description":"Date and time when the customer was created in ISO 8601 format","example":"2024-05-01T12:34:56.789Z"},"country":{"type":["string","null"],"description":"Country name where the customer is located","example":"United States"},"addressLine1":{"type":["string","null"],"description":"First line of the customer's address","example":"123 Main Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the customer's address (suite, apartment, etc.)","example":"Suite 400"},"city":{"type":["string","null"],"description":"City where the customer is located","example":"San Francisco"},"state":{"type":["string","null"],"description":"State or province where the customer is located","example":"California"},"zip":{"type":["string","null"],"description":"ZIP or postal code of the customer's address","example":"94105"},"note":{"type":["string","null"],"description":"Internal notes about the customer for team reference","example":"Preferred contact method is email. Large enterprise client."},"vatNumber":{"type":["string","null"],"description":"VAT (Value Added Tax) number of the customer","example":"US123456789"},"countryCode":{"type":["string","null"],"description":"Country code in ISO 3166-1 alpha-2 format","example":"US"},"token":{"type":"string","description":"Unique token for the customer (used for internal identification)","example":"cus_abc123xyz789"},"contact":{"type":["string","null"],"description":"Primary contact person's name at the customer organization","example":"John Smith"},"source":{"type":["string","null"],"description":"Origin system for this customer record (for example: manual, import, quickbooks, xero, agent_counterparty).","example":"manual"},"externalId":{"type":["string","null"],"description":"External reference ID when synced from another system.","example":"cus_ext_123"},"invoiceCount":{"type":"number","description":"Total number of invoices created for this customer","example":12},"projectCount":{"type":"number","description":"Total number of projects associated with this customer","example":3},"totalRevenue":{"type":"number","description":"Total revenue from paid invoices for this customer (in invoice currency). Only returned in list queries.","example":15000.5},"outstandingAmount":{"type":"number","description":"Total outstanding amount from unpaid/overdue invoices (in invoice currency). Only returned in list queries.","example":2500},"lastInvoiceDate":{"type":["string","null"],"description":"Date of the most recent invoice in ISO 8601 format. Only returned in list queries.","example":"2024-04-15"},"invoiceCurrency":{"type":["string","null"],"description":"Primary currency used in invoices for this customer. Only returned in list queries.","example":"USD"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"name":{"type":"string","description":"Display name of the tag","example":"VIP"}},"required":["id","name"]},"description":"Array of tags associated with the customer for categorization","example":[{"id":"e7a9c1a2-4c2a-4e7a-9c1a-2b7c1e24c2a4","name":"VIP"},{"id":"f1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4","name":"Enterprise"}]},"description":{"type":["string","null"],"description":"AI-generated description of what the company does","example":"A cloud-based project management platform for remote teams."},"industry":{"type":["string","null"],"description":"Primary industry of the company","example":"Software"},"companyType":{"type":["string","null"],"description":"Business model type","example":"SaaS"},"employeeCount":{"type":["string","null"],"description":"Estimated number of employees","example":"51-200"},"foundedYear":{"type":["number","null"],"description":"Year the company was founded","example":2018},"estimatedRevenue":{"type":["string","null"],"description":"Estimated annual revenue range","example":"$10M-$50M"},"fundingStage":{"type":["string","null"],"description":"Current funding stage","example":"Series A"},"totalFunding":{"type":["string","null"],"description":"Total funding raised","example":"$15M"},"headquartersLocation":{"type":["string","null"],"description":"Company headquarters location","example":"San Francisco, CA"},"timezone":{"type":["string","null"],"description":"IANA timezone of the company headquarters","example":"America/Los_Angeles"},"linkedinUrl":{"type":["string","null"],"description":"LinkedIn company page URL","example":"https://linkedin.com/company/acme"},"twitterUrl":{"type":["string","null"],"description":"Twitter/X profile URL","example":"https://twitter.com/acme"},"instagramUrl":{"type":["string","null"],"description":"Instagram profile URL","example":"https://instagram.com/acme"},"facebookUrl":{"type":["string","null"],"description":"Facebook page URL","example":"https://facebook.com/acme"},"logoUrl":{"type":["string","null"],"description":"URL to the company logo","example":"https://example.com/logo.png"},"ceoName":{"type":["string","null"],"description":"Name of the CEO or founder","example":"Jane Smith"},"financeContact":{"type":["string","null"],"description":"Name of the finance/AP contact for invoicing","example":"John Doe"},"financeContactEmail":{"type":["string","null"],"description":"Email of the finance/AP contact","example":"finance@acme.com"},"primaryLanguage":{"type":["string","null"],"description":"Primary business language (ISO 639-1 code)","example":"en"},"fiscalYearEnd":{"type":["string","null"],"description":"Month when the fiscal year ends","example":"December"},"enrichmentStatus":{"type":["string","null"],"description":"Status of the enrichment process","example":"completed"},"enrichedAt":{"type":["string","null"],"description":"When the customer was last enriched","example":"2024-05-01T12:34:56.789Z"}},"required":["id","name","email","billingEmail","phone","website","createdAt","country","addressLine1","addressLine2","city","state","zip","note","vatNumber","countryCode","token","contact","invoiceCount","projectCount","tags","description","industry","companyType","employeeCount","foundedYear","estimatedRevenue","fundingStage","totalFunding","headquartersLocation","timezone","linkedinUrl","twitterUrl","instagramUrl","facebookUrl","logoUrl","ceoName","financeContact","financeContactEmail","primaryLanguage","fiscalYearEnd","enrichmentStatus","enrichedAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/bank-accounts":{"get":{"summary":"List all bank accounts","operationId":"listBankAccounts","x-speakeasy-name-override":"list","description":"Retrieve a list of bank accounts for the authenticated team.","tags":["Bank Accounts"],"parameters":[{"schema":{"type":"boolean","description":"Whether the bank account is enabled."},"required":false,"description":"Whether the bank account is enabled.","in":"query","name":"enabled"},{"schema":{"type":"boolean","description":"Whether the bank account is a manual account."},"required":false,"description":"Whether the bank account is a manual account.","in":"query","name":"manual"}],"responses":{"200":{"description":"Retrieve a list of bank accounts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":["string","null"],"description":"Name of the bank account.","example":"Checking Account"},"currency":{"type":["string","null"],"description":"Currency code of the bank account (e.g., USD, EUR).","example":"USD"},"type":{"type":["string","null"],"description":"Type of the bank account (e.g., depository, credit).","example":"depository"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":["number","null"],"description":"Current balance of the bank account.","example":1500.75},"manual":{"type":["boolean","null"],"description":"Whether the bank account is a manual account.","example":false}},"required":["id","name","currency","type","enabled","balance","manual"],"description":"A single bank account object response.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","currency":"USD","type":"depository","enabled":true,"balance":1500.75,"manual":false}},"description":"Array of bank account objects."}},"required":["data"],"description":"Response containing a list of bank accounts."}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a bank account","operationId":"createBankAccount","x-speakeasy-name-override":"create","description":"Create a new bank account for the authenticated team.","tags":["Bank Accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the bank account.","example":"Checking Account"},"currency":{"type":"string","description":"The currency code for the bank account (ISO 4217).","example":"USD"},"manual":{"type":"boolean","description":"Whether the bank account is a manual account.","example":false}},"required":["name"],"description":"Schema for creating a new bank account.","example":{"name":"Checking Account","currency":"USD","manual":false}}}}},"responses":{"201":{"description":"Bank account created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":["string","null"],"description":"Name of the bank account.","example":"Checking Account"},"currency":{"type":["string","null"],"description":"Currency code of the bank account (e.g., USD, EUR).","example":"USD"},"type":{"type":["string","null"],"description":"Type of the bank account (e.g., depository, credit).","example":"depository"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":["number","null"],"description":"Current balance of the bank account.","example":1500.75},"manual":{"type":["boolean","null"],"description":"Whether the bank account is a manual account.","example":false}},"required":["id","name","currency","type","enabled","balance","manual"],"description":"A single bank account object response.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","currency":"USD","type":"depository","enabled":true,"balance":1500.75,"manual":false}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/bank-accounts/{id}":{"get":{"summary":"Retrieve a bank account","operationId":"getBankAccountById","x-speakeasy-name-override":"get","description":"Retrieve a bank account by ID for the authenticated team.","tags":["Bank Accounts"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The unique identifier of the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"required":true,"description":"The unique identifier of the bank account.","in":"path","name":"id"}],"responses":{"200":{"description":"Bank account details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":["string","null"],"description":"Name of the bank account.","example":"Checking Account"},"currency":{"type":["string","null"],"description":"Currency code of the bank account (e.g., USD, EUR).","example":"USD"},"type":{"type":["string","null"],"description":"Type of the bank account (e.g., depository, credit).","example":"depository"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":["number","null"],"description":"Current balance of the bank account.","example":1500.75},"manual":{"type":["boolean","null"],"description":"Whether the bank account is a manual account.","example":false}},"required":["id","name","currency","type","enabled","balance","manual"],"description":"A single bank account object response.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","currency":"USD","type":"depository","enabled":true,"balance":1500.75,"manual":false}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a bank account","operationId":"updateBankAccount","x-speakeasy-name-override":"update","description":"Update a bank account by ID for the authenticated team.","tags":["Bank Accounts"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The unique identifier of the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"required":true,"description":"The unique identifier of the bank account.","in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":"string","description":"The name of the bank account.","example":"Checking Account"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":"number","description":"Current balance of the bank account.","example":1500.75},"currency":{"type":"string","description":"The currency code for the bank account (ISO 4217).","example":"USD"},"type":{"type":"string","enum":["depository","credit","other_asset","loan","other_liability"],"description":"Type of the bank account.","example":"depository"}},"description":"Schema for updating a bank account.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","enabled":true,"balance":1500.75,"type":"depository"}}}}},"responses":{"200":{"description":"Bank account updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":["string","null"],"description":"Name of the bank account.","example":"Checking Account"},"currency":{"type":["string","null"],"description":"Currency code of the bank account (e.g., USD, EUR).","example":"USD"},"type":{"type":["string","null"],"description":"Type of the bank account (e.g., depository, credit).","example":"depository"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":["number","null"],"description":"Current balance of the bank account.","example":1500.75},"manual":{"type":["boolean","null"],"description":"Whether the bank account is a manual account.","example":false}},"required":["id","name","currency","type","enabled","balance","manual"],"description":"A single bank account object response.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","currency":"USD","type":"depository","enabled":true,"balance":1500.75,"manual":false}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a bank account","operationId":"deleteBankAccount","x-speakeasy-name-override":"delete","description":"Delete a bank account by ID for the authenticated team.","tags":["Bank Accounts"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The unique identifier of the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"required":true,"description":"The unique identifier of the bank account.","in":"path","name":"id"}],"responses":{"200":{"description":"Bank account deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the bank account.","example":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc"},"name":{"type":["string","null"],"description":"Name of the bank account.","example":"Checking Account"},"currency":{"type":["string","null"],"description":"Currency code of the bank account (e.g., USD, EUR).","example":"USD"},"type":{"type":["string","null"],"description":"Type of the bank account (e.g., depository, credit).","example":"depository"},"enabled":{"type":"boolean","description":"Whether the bank account is enabled.","example":true},"balance":{"type":["number","null"],"description":"Current balance of the bank account.","example":1500.75},"manual":{"type":["boolean","null"],"description":"Whether the bank account is a manual account.","example":false}},"required":["id","name","currency","type","enabled","balance","manual"],"description":"A single bank account object response.","example":{"id":"b7e6c2a0-1f2d-4c3b-9a8e-123456789abc","name":"Checking Account","currency":"USD","type":"depository","enabled":true,"balance":1500.75,"manual":false}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tags":{"get":{"summary":"List all tags","operationId":"listTags","x-speakeasy-name-override":"list","description":"Retrieve a list of tags for the authenticated team.","tags":["Tags"],"responses":{"200":{"description":"Retrieve a list of tags for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a new tag","operationId":"createTag","x-speakeasy-name-override":"create","description":"Create a new tag for the authenticated team.","tags":["Tags"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTag"}}}},"responses":{"201":{"description":"Tag created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tags/{id}":{"get":{"summary":"Retrieve a tag","operationId":"getTagById","x-speakeasy-name-override":"get","description":"Retrieve a tag by ID for the authenticated team.","tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The UUID of the tag.","example":"b3b7c8e2-1f2a-4c3d-9e4f-5a6b7c8d9e0f"},"required":true,"description":"The UUID of the tag.","in":"path","name":"id"}],"responses":{"200":{"description":"Retrieve a tag by ID for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a tag","operationId":"updateTag","x-speakeasy-name-override":"update","description":"Update a tag by ID for the authenticated team.","tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The ID of the tag to update.","example":"b3b7c8e2-1f2a-4c3d-9e4f-5a6b7c8d9e0f"},"required":true,"description":"The ID of the tag to update.","in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the tag.","example":"Urgent"}},"required":["name"]}}}},"responses":{"200":{"description":"Tag updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a tag","operationId":"deleteTag","x-speakeasy-name-override":"delete","description":"Delete a tag by ID for the authenticated team.","tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The UUID of the tag to delete.","example":"b3b7c8e2-1f2a-4c3d-9e4f-5a6b7c8d9e0f"},"required":true,"description":"The UUID of the tag to delete.","in":"path","name":"id"}],"responses":{"204":{"description":"Tag deleted"},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/documents":{"get":{"summary":"List all documents","operationId":"listDocuments","x-speakeasy-name-override":"list","description":"Retrieve a list of documents for the authenticated team.","tags":["Documents"],"parameters":[{"schema":{"type":["string","null"],"description":"A cursor for pagination. Pass the value returned from the previous response to get the next page.","example":"20"},"required":false,"description":"A cursor for pagination. Pass the value returned from the previous response to get the next page.","name":"cursor","in":"query"},{"schema":{"type":["array","null"],"items":{"type":"string","minLength":1},"minItems":2,"maxItems":2,"description":"Sort as [column, direction]. Currently documents are sorted by created date descending."},"required":false,"description":"Sort as [column, direction]. Currently documents are sorted by created date descending.","in":"query","name":"sort"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of documents to return per page.","example":20},"required":false,"description":"Number of documents to return per page.","name":"pageSize","in":"query"},{"schema":{"type":["string","null"],"description":"Search query string to filter documents by text.","example":"invoice"},"required":false,"description":"Search query string to filter documents by text.","name":"q","in":"query"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of tag IDs to filter documents by tags.","example":["tag1","tag2"]},"required":false,"description":"Array of tag IDs to filter documents by tags.","name":"tags","in":"query"},{"schema":{"type":["string","null"],"description":"Start date for filtering documents (ISO 8601 date).","example":"2024-01-01"},"required":false,"description":"Start date for filtering documents (ISO 8601 date).","name":"start","in":"query"},{"schema":{"type":["string","null"],"description":"End date for filtering documents (ISO 8601 date).","example":"2024-12-31"},"required":false,"description":"End date for filtering documents (ISO 8601 date).","name":"end","in":"query"}],"responses":{"200":{"description":"Retrieve a list of documents for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":["string","null"],"description":"Cursor for pagination.","example":"20"},"hasPreviousPage":{"type":"boolean","description":"Whether there is a previous page.","example":false},"hasNextPage":{"type":"boolean","description":"Whether there is a next page.","example":true}},"required":["hasPreviousPage","hasNextPage"],"description":"Pagination metadata for the documents list."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the document.","example":"doc_1234567890abcdef"},"title":{"type":["string","null"],"description":"Title of the document.","example":"Invoice April 2024"},"pathTokens":{"type":"array","items":{"type":"string"},"description":"Array of path tokens representing the document's location.","example":["invoices","2024","april","invoice-123.pdf"]},"metadata":{"type":["object","null"],"properties":{"size":{"type":["number","null"],"description":"Size of the document in bytes.","example":204800},"mimetype":{"type":["string","null"],"description":"MIME type of the document.","example":"application/pdf"}},"required":["size","mimetype"],"description":"Metadata about the document."},"processingStatus":{"type":"string","description":"Processing status of the document.","example":"processed"},"summary":{"type":["string","null"],"description":"Summary or extracted content from the document.","example":"Invoice for April 2024, total $1,200.00"},"date":{"type":["string","null"],"description":"Date associated with the document (ISO 8601).","example":"2024-04-30"}},"required":["id","title","pathTokens","metadata","processingStatus","summary","date"],"description":"A single document object response.","example":{"id":"doc_1234567890abcdef","title":"Invoice April 2024","pathTokens":["invoices","2024","april","invoice-123.pdf"],"metadata":{"size":204800,"mimetype":"application/pdf"},"processingStatus":"processed","summary":"Invoice for April 2024, total $1,200.00","date":"2024-04-30"}},"description":"Array of document objects."}},"required":["meta","data"],"description":"Response containing a list of documents and pagination metadata.","example":{"meta":{"cursor":"20","hasPreviousPage":false,"hasNextPage":true},"data":[{"id":"doc_1234567890abcdef","title":"Invoice April 2024","pathTokens":["invoices","2024","april","invoice-123.pdf"],"metadata":{"size":204800,"mimetype":"application/pdf"},"processingStatus":"processed","summary":"Invoice for April 2024, total $1,200.00","date":"2024-04-30"}]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/documents/{id}":{"get":{"summary":"Retrieve a document","operationId":"getDocumentById","x-speakeasy-name-override":"get","description":"Retrieve a document by its unique identifier for the authenticated team.","tags":["Documents"],"parameters":[{"schema":{"type":["string","null"]},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Retrieve a document by its unique identifier","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the document.","example":"doc_1234567890abcdef"},"title":{"type":["string","null"],"description":"Title of the document.","example":"Invoice April 2024"},"pathTokens":{"type":"array","items":{"type":"string"},"description":"Array of path tokens representing the document's location.","example":["invoices","2024","april","invoice-123.pdf"]},"metadata":{"type":["object","null"],"properties":{"size":{"type":["number","null"],"description":"Size of the document in bytes.","example":204800},"mimetype":{"type":["string","null"],"description":"MIME type of the document.","example":"application/pdf"}},"required":["size","mimetype"],"description":"Metadata about the document."},"processingStatus":{"type":"string","description":"Processing status of the document.","example":"processed"},"summary":{"type":["string","null"],"description":"Summary or extracted content from the document.","example":"Invoice for April 2024, total $1,200.00"},"date":{"type":["string","null"],"description":"Date associated with the document (ISO 8601).","example":"2024-04-30"}},"required":["id","title","pathTokens","metadata","processingStatus","summary","date"],"description":"A single document object response.","example":{"id":"doc_1234567890abcdef","title":"Invoice April 2024","pathTokens":["invoices","2024","april","invoice-123.pdf"],"metadata":{"size":204800,"mimetype":"application/pdf"},"processingStatus":"processed","summary":"Invoice for April 2024, total $1,200.00","date":"2024-04-30"}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a document","operationId":"deleteDocument","x-speakeasy-name-override":"delete","description":"Delete a document by its unique identifier for the authenticated team.","tags":["Documents"],"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Document deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/documents/{id}/presigned-url":{"post":{"summary":"Generate pre-signed URL for document","operationId":"getDocumentPreSignedUrl","x-speakeasy-name-override":"getPreSignedUrl","description":"Generate a pre-signed URL for accessing a document. The URL is valid for 60 seconds and allows secure temporary access to the document file.","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the document to generate a pre-signed URL for","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the document to generate a pre-signed URL for","in":"path","name":"id"},{"schema":{"type":["boolean","null"],"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","example":true},"required":false,"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","in":"query","name":"download"}],"responses":{"200":{"description":"Pre-signed URL generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Pre-signed URL for accessing the document, valid for 60 seconds","example":"https://service.dino.id/storage/v1/object/sign/vault/documents/2024/invoice.pdf?token=abc123&expires=1640995200"},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the URL expires","example":"2024-04-15T10:01:00.000Z"},"fileName":{"type":["string","null"],"description":"Original filename of the document","example":"invoice-april-2024.pdf"}},"required":["url","expiresAt","fileName"]}}}},"400":{"description":"Bad request - Document file path not available","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Document not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error - Failed to generate pre-signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/inbox":{"get":{"summary":"List all inbox items","operationId":"listInboxItems","x-speakeasy-name-override":"list","description":"Retrieve a list of inbox items for the authenticated team.","tags":["Inbox"],"parameters":[{"schema":{"type":["string","null"],"description":"Pagination cursor from previous response"},"required":false,"description":"Pagination cursor from previous response","name":"cursor","in":"query"},{"schema":{"type":["string","null"],"description":"Sort direction: asc or desc"},"required":false,"description":"Sort direction: asc or desc","name":"order","in":"query"},{"schema":{"type":["string","null"],"description":"Sort field. Valid values: alphabetical, document_date. Defaults to created date."},"required":false,"description":"Sort field. Valid values: alphabetical, document_date. Defaults to created date.","name":"sort","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of items per page (1-100)"},"required":false,"description":"Number of items per page (1-100)","name":"pageSize","in":"query"},{"schema":{"type":["string","null"],"description":"Search query to filter inbox items"},"required":false,"description":"Search query to filter inbox items","name":"q","in":"query"},{"schema":{"type":["string","null"],"enum":["done","pending","suggested_match","no_match","other",null],"description":"Filter by processing status: done (processed), pending (awaiting action), suggested_match (auto-matched), no_match (unmatched), other"},"required":false,"description":"Filter by processing status: done (processed), pending (awaiting action), suggested_match (auto-matched), no_match (unmatched), other","name":"status","in":"query"},{"schema":{"type":["string","null"],"enum":["all","other",null],"description":"Tab filter: all or other"},"required":false,"description":"Tab filter: all or other","name":"tab","in":"query"}],"responses":{"200":{"description":"Retrieve a list of inbox items for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":["string","null"],"description":"A cursor for pagination, representing the last item from the previous page.","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"hasPreviousPage":{"type":"boolean","description":"Whether there is a previous page of results.","example":false},"hasNextPage":{"type":"boolean","description":"Whether there is a next page of results.","example":true}},"required":["hasPreviousPage","hasNextPage"],"description":"Pagination metadata for the inbox list response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Inbox item ID (UUID)","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"fileName":{"type":"string","description":"Original file name of the uploaded document","example":"invoice-123.pdf"},"filePath":{"type":"array","items":{"type":"string"},"description":"Path segments to the file in storage","example":["inbox","2024","05","invoice-123.pdf"]},"displayName":{"type":"string","description":"Display name for the inbox item","example":"Invoice May 2024"},"amount":{"type":["number","null"],"description":"Amount detected or entered for the inbox item","example":123.45},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the amount","example":"USD"},"contentType":{"type":["string","null"],"description":"MIME type of the uploaded file","example":"application/pdf"},"date":{"type":["string","null"],"description":"Date associated with the inbox item (ISO 8601)","example":"2024-05-01"},"status":{"type":"string","description":"Status of the inbox item","example":"pending"},"createdAt":{"type":"string","description":"Date and time when the inbox item was created (ISO 8601)","example":"2024-05-01T12:34:56.789Z"},"website":{"type":["string","null"],"description":"Website associated with the inbox item, if any","example":"https://vendor.com"},"description":{"type":["string","null"],"description":"Description or notes for the inbox item","example":"Invoice for May 2024 services"},"transaction":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Transaction ID (UUID)","example":"a1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4"},"amount":{"type":"number","description":"Transaction amount","example":123.45},"currency":{"type":"string","description":"Transaction currency (ISO 4217)","example":"USD"},"name":{"type":"string","description":"Transaction name or payee","example":"Acme Corp"},"date":{"type":"string","description":"Transaction date (ISO 8601)","example":"2024-05-01"}},"required":["id","amount","currency","name","date"],"description":"Matched transaction for this inbox item, if any"}},"required":["id","fileName","filePath","displayName","amount","currency","contentType","date","status","createdAt","website","description","transaction"],"description":"Inbox item object"},"description":"List of inbox items"}},"required":["meta","data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/inbox/{id}":{"get":{"summary":"Retrieve a inbox item","operationId":"getInboxItemById","x-speakeasy-name-override":"get","description":"Retrieve a inbox item by its unique identifier for the authenticated team.","tags":["Inbox"],"parameters":[{"schema":{"type":"string","description":"The unique identifier of the inbox item.","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"The unique identifier of the inbox item.","in":"path","name":"id"}],"responses":{"200":{"description":"Retrieve an inbox item by its ID.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Inbox item ID (UUID)","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"fileName":{"type":"string","description":"Original file name of the uploaded document","example":"invoice-123.pdf"},"filePath":{"type":"array","items":{"type":"string"},"description":"Path segments to the file in storage","example":["inbox","2024","05","invoice-123.pdf"]},"displayName":{"type":"string","description":"Display name for the inbox item","example":"Invoice May 2024"},"amount":{"type":["number","null"],"description":"Amount detected or entered for the inbox item","example":123.45},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the amount","example":"USD"},"contentType":{"type":["string","null"],"description":"MIME type of the uploaded file","example":"application/pdf"},"date":{"type":["string","null"],"description":"Date associated with the inbox item (ISO 8601)","example":"2024-05-01"},"status":{"type":"string","description":"Status of the inbox item","example":"pending"},"createdAt":{"type":"string","description":"Date and time when the inbox item was created (ISO 8601)","example":"2024-05-01T12:34:56.789Z"},"website":{"type":["string","null"],"description":"Website associated with the inbox item, if any","example":"https://vendor.com"},"description":{"type":["string","null"],"description":"Description or notes for the inbox item","example":"Invoice for May 2024 services"},"transaction":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Transaction ID (UUID)","example":"a1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4"},"amount":{"type":"number","description":"Transaction amount","example":123.45},"currency":{"type":"string","description":"Transaction currency (ISO 4217)","example":"USD"},"name":{"type":"string","description":"Transaction name or payee","example":"Acme Corp"},"date":{"type":"string","description":"Transaction date (ISO 8601)","example":"2024-05-01"}},"required":["id","amount","currency","name","date"],"description":"Matched transaction for this inbox item, if any"}},"required":["id","fileName","filePath","displayName","amount","currency","contentType","date","status","createdAt","website","description","transaction"],"description":"Inbox item object"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a inbox item","operationId":"deleteInboxItem","x-speakeasy-name-override":"delete","description":"Delete a inbox item by its unique identifier for the authenticated team.","tags":["Inbox"],"parameters":[{"schema":{"type":"string","description":"The unique identifier of the inbox item to delete.","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"The unique identifier of the inbox item to delete.","in":"path","name":"id"}],"responses":{"200":{"description":"Delete a inbox item by its ID.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the deleted inbox item.","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"}},"required":["id"],"description":"Response schema for a successfully deleted inbox item."}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a inbox item","operationId":"updateInboxItem","x-speakeasy-name-override":"update","description":"Update fields of an inbox item by its unique identifier for the authenticated team.","tags":["Inbox"],"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","archived","processing","done","pending","deleted","analyzing","suggested_match","other"]},"displayName":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"number"}}}}}},"responses":{"200":{"description":"Update fields of an inbox item by its unique identifier for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Inbox item ID (UUID)","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"fileName":{"type":"string","description":"Original file name of the uploaded document","example":"invoice-123.pdf"},"filePath":{"type":"array","items":{"type":"string"},"description":"Path segments to the file in storage","example":["inbox","2024","05","invoice-123.pdf"]},"displayName":{"type":"string","description":"Display name for the inbox item","example":"Invoice May 2024"},"amount":{"type":["number","null"],"description":"Amount detected or entered for the inbox item","example":123.45},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the amount","example":"USD"},"contentType":{"type":["string","null"],"description":"MIME type of the uploaded file","example":"application/pdf"},"date":{"type":["string","null"],"description":"Date associated with the inbox item (ISO 8601)","example":"2024-05-01"},"status":{"type":"string","description":"Status of the inbox item","example":"pending"},"createdAt":{"type":"string","description":"Date and time when the inbox item was created (ISO 8601)","example":"2024-05-01T12:34:56.789Z"},"website":{"type":["string","null"],"description":"Website associated with the inbox item, if any","example":"https://vendor.com"},"description":{"type":["string","null"],"description":"Description or notes for the inbox item","example":"Invoice for May 2024 services"},"transaction":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Transaction ID (UUID)","example":"a1b2c3d4-5678-4e7a-9c1a-2b7c1e24c2a4"},"amount":{"type":"number","description":"Transaction amount","example":123.45},"currency":{"type":"string","description":"Transaction currency (ISO 4217)","example":"USD"},"name":{"type":"string","description":"Transaction name or payee","example":"Acme Corp"},"date":{"type":"string","description":"Transaction date (ISO 8601)","example":"2024-05-01"}},"required":["id","amount","currency","name","date"],"description":"Matched transaction for this inbox item, if any"}},"required":["id","fileName","filePath","displayName","amount","currency","contentType","date","status","createdAt","website","description","transaction"],"description":"Inbox item object"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/inbox/{id}/presigned-url":{"post":{"summary":"Generate pre-signed URL for inbox attachment","operationId":"getInboxPreSignedUrl","x-speakeasy-name-override":"getPreSignedUrl","description":"Generate a pre-signed URL for accessing an inbox attachment. The URL is valid for 60 seconds and allows secure temporary access to the attachment file.","tags":["Inbox"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the inbox item to generate a pre-signed URL for","example":"b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4"},"required":true,"description":"Unique identifier of the inbox item to generate a pre-signed URL for","in":"path","name":"id"},{"schema":{"type":["boolean","null"],"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","example":true},"required":false,"description":"Whether to force download the file. If true, the file will be downloaded. If false or omitted, the file will be displayed in the browser if possible.","in":"query","name":"download"}],"responses":{"200":{"description":"Pre-signed URL generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Pre-signed URL for accessing the inbox attachment, valid for 60 seconds","example":"https://service.dino.id/storage/v1/object/sign/vault/inbox/document.pdf?token=abc123&expires=1640995200"},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the URL expires","example":"2024-04-15T10:01:00.000Z"},"fileName":{"type":["string","null"],"description":"Original filename of the inbox attachment","example":"invoice.pdf"}},"required":["url","expiresAt","fileName"]}}}},"400":{"description":"Bad request - Attachment file path not available","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Inbox item not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error - Failed to generate pre-signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/invoices":{"get":{"summary":"List all invoices","operationId":"listInvoices","x-speakeasy-name-override":"list","description":"Retrieve a list of invoices for the authenticated team.","tags":["Invoices"],"parameters":[{"schema":{"type":["string","null"],"description":"A cursor for pagination, representing the last item from the previous page.","example":"25"},"required":false,"description":"A cursor for pagination, representing the last item from the previous page.","in":"query","name":"cursor"},{"schema":{"type":["array","null"],"items":{"type":"string","minLength":1},"minItems":2,"maxItems":2,"description":"Sort as [column, direction]. Columns: created_at, due_date, issue_date, amount, status, customer, invoice_number. Direction: asc or desc.","example":["created_at","desc"]},"required":false,"description":"Sort as [column, direction]. Columns: created_at, due_date, issue_date, amount, status, customer, invoice_number. Direction: asc or desc.","in":"query","name":"sort"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of invoices to return per page (1-100).","example":25},"required":false,"description":"Number of invoices to return per page (1-100).","in":"query","name":"pageSize"},{"schema":{"type":["string","null"],"description":"Search query string to filter invoices by text.","example":"Acme"},"required":false,"description":"Search query string to filter invoices by text.","in":"query","name":"q"},{"schema":{"type":["string","null"],"description":"Start date (inclusive) for filtering invoices, in ISO 8601 format.","example":"2024-01-01"},"required":false,"description":"Start date (inclusive) for filtering invoices, in ISO 8601 format.","in":"query","name":"start"},{"schema":{"type":["string","null"],"description":"End date (inclusive) for filtering invoices, in ISO 8601 format.","example":"2024-01-31"},"required":false,"description":"End date (inclusive) for filtering invoices, in ISO 8601 format.","in":"query","name":"end"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"List of invoice statuses to filter by (e.g., 'paid', 'unpaid', 'overdue').","example":["paid","unpaid"]},"required":false,"description":"List of invoice statuses to filter by (e.g., 'paid', 'unpaid', 'overdue').","in":"query","name":"statuses"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"List of customer IDs to filter invoices.","example":["customer-uuid-1","customer-uuid-2"]},"required":false,"description":"List of customer IDs to filter invoices.","in":"query","name":"customers"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"List of invoice IDs to filter by.","example":["invoice-uuid-1","invoice-uuid-2"]},"required":false,"description":"List of invoice IDs to filter by.","in":"query","name":"ids"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"List of recurring series IDs to filter invoices by (shows all invoices from these series).","example":["recurring-uuid-1","recurring-uuid-2"]},"required":false,"description":"List of recurring series IDs to filter invoices by (shows all invoices from these series).","in":"query","name":"recurringIds"},{"schema":{"type":["boolean","null"],"description":"Filter by recurring status. true = only recurring invoices, false = only non-recurring invoices.","example":true},"required":false,"description":"Filter by recurring status. true = only recurring invoices, false = only non-recurring invoices.","in":"query","name":"recurring"}],"responses":{"200":{"description":"A list of invoices for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"cursor":{"type":["string","null"],"description":"Cursor for pagination; null if there is no next page","example":"25"},"hasPreviousPage":{"type":"boolean","description":"Indicates if there is a previous page of results","example":false},"hasNextPage":{"type":"boolean","description":"Indicates if there is a next page of results","example":true}},"required":["cursor","hasPreviousPage","hasNextPage"],"description":"Pagination metadata"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the invoice","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"},"status":{"type":"string","enum":["draft","overdue","paid","unpaid","canceled","scheduled"],"description":"Current status of the invoice","example":"paid"},"dueDate":{"type":"string","description":"Due date of the invoice in ISO 8601 format","example":"2024-06-30T23:59:59.000Z"},"issueDate":{"type":"string","description":"Issue date of the invoice in ISO 8601 format","example":"2024-06-01T00:00:00.000Z"},"invoiceNumber":{"type":"string","description":"Invoice number as shown to the customer (auto-generated if not provided)","example":"INV-2024-001"},"amount":{"type":["number","null"],"description":"Total amount of the invoice, or null if not yet calculated","example":1500.75},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the invoice amount","example":"USD"},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the customer","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Name of the customer","example":"Acme Corporation"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"email":{"type":["string","null"],"format":"email","description":"Email address of the customer","example":"info@acme.com"}},"required":["id","name","website","email"],"description":"Customer details"},"paidAt":{"type":["string","null"],"description":"Timestamp when the invoice was paid (ISO 8601), or null if unpaid","example":"2024-06-15T12:00:00.000Z"},"reminderSentAt":{"type":["string","null"],"description":"Timestamp when a payment reminder was sent (ISO 8601), or null if never sent","example":"2024-06-10T09:00:00.000Z"},"note":{"type":["string","null"],"description":"Optional note attached to the invoice","example":"Thank you for your business."},"vat":{"type":["number","null"],"description":"Value-added tax amount, or null if not applicable","example":120},"tax":{"type":["number","null"],"description":"Tax amount, or null if not applicable","example":80},"discount":{"type":["number","null"],"description":"Discount amount applied to the invoice, or null if none","example":50},"subtotal":{"type":["number","null"],"description":"Subtotal before taxes and discounts, or null if not calculated","example":1400},"viewedAt":{"type":["string","null"],"description":"Timestamp when the invoice was viewed by the customer (ISO 8601), or null if never viewed","example":"2024-06-05T14:30:00.000Z"},"customerName":{"type":["string","null"],"description":"Name of the customer as shown on the invoice, or null if not set","example":"Acme Corporation"},"sentTo":{"type":["string","null"],"format":"email","description":"Email address to which the invoice was sent, or null if not sent","example":"billing@acme.com"},"sentAt":{"type":["string","null"],"description":"Timestamp when the invoice was sent (ISO 8601), or null if not sent","example":"2024-06-02T08:00:00.000Z"},"createdAt":{"type":"string","description":"Timestamp when the invoice was created (ISO 8601)","example":"2024-06-01T07:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when the invoice was last updated (ISO 8601)","example":"2024-06-15T10:00:00.000Z"},"pdfUrl":{"type":["string","null"],"format":"uri","description":"URL to download the invoice PDF, or null if not generated","example":"https://app.dino.id/api/download/invoice?token=eef58951-1682-4062-b010-425866032390"},"previewUrl":{"type":["string","null"],"format":"uri","description":"URL to preview the invoice in the browser, or null if not generated","example":"https://app.dino.id/i/eef58951-1682-4062-b010-425866032390"}},"required":["id","status","dueDate","issueDate","amount","currency","customer","paidAt","reminderSentAt","note","vat","tax","discount","subtotal","viewedAt","customerName","sentTo","sentAt","createdAt","updatedAt","pdfUrl","previewUrl"],"description":"Invoice object"},"description":"Array of invoice objects"}},"required":["meta","data"],"description":"Response containing a list of invoices and pagination metadata"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an invoice","operationId":"createInvoice","x-speakeasy-name-override":"create","description":"Create an invoice for the authenticated team. The behavior depends on deliveryType: 'create' generates and finalizes the invoice immediately, 'create_and_send' also sends it to the customer, 'scheduled' schedules the invoice for automatic processing at the specified date.","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"customerLabel":{"type":"string"},"title":{"type":"string"},"fromLabel":{"type":"string"},"invoiceNoLabel":{"type":"string"},"issueDateLabel":{"type":"string"},"dueDateLabel":{"type":"string"},"descriptionLabel":{"type":"string"},"priceLabel":{"type":"string"},"quantityLabel":{"type":"string"},"totalLabel":{"type":"string"},"totalSummaryLabel":{"type":"string"},"vatLabel":{"type":"string"},"subtotalLabel":{"type":"string"},"taxLabel":{"type":"string"},"discountLabel":{"type":"string"},"timezone":{"type":"string"},"paymentLabel":{"type":"string"},"noteLabel":{"type":"string"},"logoUrl":{"type":["string","null"]},"currency":{"type":"string"},"dateFormat":{"type":"string"},"includeVat":{"type":"boolean"},"includeTax":{"type":"boolean"},"includeDiscount":{"type":"boolean"},"includeDecimals":{"type":"boolean"},"includePdf":{"type":"boolean"},"sendCopy":{"type":"boolean"},"includeUnits":{"type":"boolean"},"includeQr":{"type":"boolean"},"includeLineItemTax":{"type":"boolean"},"lineItemTaxLabel":{"type":"string"},"taxRate":{"type":["number","null"],"minimum":0,"maximum":100},"vatRate":{"type":["number","null"],"minimum":0,"maximum":100},"size":{"type":"string","enum":["a4","letter"]},"deliveryType":{"type":"string","enum":["create","create_and_send","scheduled"]},"locale":{"type":"string"},"paymentEnabled":{"type":"boolean"},"paymentTermsDays":{"type":"number","minimum":0,"maximum":365},"emailSubject":{"type":["string","null"]},"emailHeading":{"type":["string","null"]},"emailBody":{"type":["string","null"]},"emailButtonText":{"type":["string","null"]},"paymentDetails":{"type":"object","description":"Payment details in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc","marks":[{"type":"bold"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Main St, City, Country"}]},{"type":"paragraph","content":[{"type":"text","text":"Visit our website: "},{"type":"text","text":"https://acme.com","marks":[{"type":"link","attrs":{"href":"https://acme.com"}}]}]}]}},"fromDetails":{"type":"object","description":"Sender details in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc","marks":[{"type":"bold"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Main St, City, Country"}]},{"type":"paragraph","content":[{"type":"text","text":"Visit our website: "},{"type":"text","text":"https://acme.com","marks":[{"type":"link","attrs":{"href":"https://acme.com"}}]}]}]}},"noteDetails":{"type":"object","description":"Default footer notes in TipTap JSONContent format for new invoices","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc","marks":[{"type":"bold"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Main St, City, Country"}]},{"type":"paragraph","content":[{"type":"text","text":"Visit our website: "},{"type":"text","text":"https://acme.com","marks":[{"type":"link","attrs":{"href":"https://acme.com"}}]}]}]}}},"description":"Invoice template details"},"fromDetails":{"type":"object","description":"Sender details in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc, 123 Main St, City, Country"}]}]}},"customerId":{"type":"string","format":"uuid","description":"Unique identifier for the customer (required)","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"paymentDetails":{"type":"object","description":"Payment details in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Bank: 123456, IBAN: DE1234567890"}]}]}},"noteDetails":{"type":"object","description":"Additional notes for the invoice in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Thank you for your business."}]}]}},"dueDate":{"type":"string","format":"date-time","description":"Due date of the invoice in ISO 8601 format. Defaults to issue date + payment terms (30 days) if not provided.","example":"2024-06-30T23:59:59.000Z"},"issueDate":{"type":"string","format":"date-time","description":"Issue date of the invoice in ISO 8601 format. Defaults to current date if not provided.","example":"2024-06-01T00:00:00.000Z"},"invoiceNumber":{"type":"string","description":"Invoice number as shown to the customer (auto-generated if not provided)","example":"INV-2024-001"},"logoUrl":{"type":["string","null"],"description":"URL of the logo to display on the invoice","example":"https://example.com/logo.png"},"vat":{"type":["number","null"],"description":"VAT amount for the invoice","example":150},"tax":{"type":["number","null"],"description":"Tax amount for the invoice","example":50},"discount":{"type":["number","null"],"description":"Discount applied to the invoice","example":100},"topBlock":{"type":"object","description":"Custom content block to display at the top of the invoice in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc","marks":[{"type":"bold"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Main St, City, Country"}]},{"type":"paragraph","content":[{"type":"text","text":"Visit our website: "},{"type":"text","text":"https://acme.com","marks":[{"type":"link","attrs":{"href":"https://acme.com"}}]}]}]}},"bottomBlock":{"type":"object","description":"Custom content block to display at the bottom of the invoice in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Acme Inc","marks":[{"type":"bold"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Main St, City, Country"}]},{"type":"paragraph","content":[{"type":"text","text":"Visit our website: "},{"type":"text","text":"https://acme.com","marks":[{"type":"link","attrs":{"href":"https://acme.com"}}]}]}]}},"amount":{"type":["number","null"],"description":"Total amount of the invoice","example":1500.75},"lineItems":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"number","minimum":0},"unit":{"type":["string","null"]},"price":{"type":"number"},"vat":{"type":["number","null"],"minimum":0},"tax":{"type":["number","null"],"minimum":0},"taxRate":{"type":["number","null"],"minimum":0,"maximum":100},"name":{"type":"object","description":"Line item description in TipTap JSONContent format","example":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Web Development Services"}]}]}},"productId":{"type":"string","format":"uuid","description":"Optional reference to a saved product","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"description":"List of line items for the invoice"},"deliveryType":{"type":"string","enum":["create","create_and_send","scheduled"],"description":"How the invoice should be processed: 'create' - finalize immediately, 'create_and_send' - finalize and send to customer, 'scheduled' - schedule for automatic processing at specified date","example":"create"},"scheduledAt":{"type":"string","format":"date-time","description":"Scheduled date of the invoice in ISO 8601 format with timezone offset (e.g., Z or +00:00). Required when deliveryType is 'scheduled'. Must be in the future.","example":"2024-06-30T23:59:59.000Z"}},"required":["template","customerId","deliveryType"],"description":"Schema for creating an invoice. The deliveryType determines if it stays as a draft, gets finalized immediately, or gets scheduled for later processing.","example":{"template":{"title":"Invoice","customerLabel":"Bill To","fromLabel":"From","invoiceNoLabel":"Invoice #","issueDateLabel":"Issue Date","dueDateLabel":"Due Date","descriptionLabel":"Description","priceLabel":"Rate","quantityLabel":"Qty","totalLabel":"Amount","totalSummaryLabel":"Total","vatLabel":"VAT","taxLabel":"Sales Tax","paymentLabel":"Payment Information","noteLabel":"Notes","logoUrl":"https://example.com/logo.png","currency":"USD","paymentDetails":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Wire Transfer: Chase Bank, Account: 1234567890, Routing: 021000021"}]}]},"fromDetails":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"TechCorp Inc, 123 Business Ave, San Francisco, CA 94105"}]}]},"size":"letter","includeVat":false,"includeTax":true,"discountLabel":"Discount","includeDiscount":false,"includeUnits":true,"includeDecimals":true,"includePdf":true,"sendCopy":true,"includeQr":false,"dateFormat":"MM/dd/yyyy","taxRate":8.5,"vatRate":0,"deliveryType":"create","timezone":"America/Los_Angeles","locale":"en-US"},"fromDetails":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"TechCorp Inc","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"123 Business Ave"}]},{"type":"paragraph","content":[{"type":"text","text":"San Francisco, CA 94105"}]}]},"customerId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","paymentDetails":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Wire Transfer:","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Chase Bank, Account: 1234567890"}]},{"type":"paragraph","content":[{"type":"text","text":"Routing: 021000021"}]}]},"noteDetails":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Payment is due within 30 days of invoice date."}]},{"type":"paragraph","content":[{"type":"text","text":"Thank you for your business!","marks":[{"type":"italic"}]}]}]},"dueDate":"2024-07-15T23:59:59.000Z","issueDate":"2024-06-15T00:00:00.000Z","invoiceNumber":"INV-2024-001","logoUrl":"https://example.com/logo.png","tax":85,"topBlock":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Thank you for choosing TechCorp for your software development needs.","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"This invoice covers the development work completed in June 2024."}]}]},"bottomBlock":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Terms & Conditions:","marks":[{"type":"strong"}]}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Payment is due within 30 days of invoice date"}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Late payments may incur a 1.5% monthly service charge"}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"All work is subject to our standard terms of service"}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Questions? Contact us at billing@techcorp.com or (555) 123-4567","marks":[{"type":"italic"}]}]}]},"amount":1085,"lineItems":[{"name":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Web Development Services","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Custom React application with TypeScript","marks":[{"type":"italic"}]}]}]},"quantity":40,"price":75,"tax":8.5},{"name":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"UI/UX Design","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"User interface design and user experience optimization","marks":[{"type":"italic"}]}]}]},"quantity":20,"price":50,"tax":8.5}],"deliveryType":"create","scheduledAt":"2024-07-01T09:00:00.000Z"}}}}},"responses":{"201":{"description":"Invoice created successfully. Status depends on deliveryType: 'scheduled' for scheduled invoices, 'unpaid' for create/create_and_send.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the draft invoice","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"},"status":{"type":"string","enum":["draft","overdue","paid","unpaid","canceled","scheduled"],"description":"Current status of the invoice","example":"draft"},"createdAt":{"type":"string","description":"Timestamp when the invoice was created (ISO 8601)","example":"2024-06-01T07:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when the invoice was last updated (ISO 8601)","example":"2024-06-01T07:00:00.000Z"},"pdfUrl":{"type":["string","null"],"description":"Direct URL to download the invoice PDF","example":"https://app.dino.id/api/download/invoice?token=eyJ..."},"previewUrl":{"type":["string","null"],"description":"Direct URL to preview the invoice in browser","example":"https://app.dino.id/i/eyJ..."}},"required":["id","status","createdAt","updatedAt","pdfUrl","previewUrl"],"description":"Response after creating a draft invoice"}}}},"400":{"description":"Bad request. Invalid input data or validation errors.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing the validation failure","examples":["scheduledAt is required for scheduled delivery","scheduledAt must be in the future","Invoice number 'INV-001' is already used. Please provide a different invoice number or omit it to auto-generate one."]}},"required":["message"]}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Customer not found"}},"required":["message"]}}}},"409":{"description":"Conflict. Invoice number already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message about the conflict","example":"Invoice number 'INV-2024-001' is already used. Please provide a different invoice number or omit it to auto-generate one."}},"required":["message"]}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Failed to create invoice"}},"required":["message"]}}}}}}},"/invoices/payment-status":{"get":{"summary":"Payment status","operationId":"getInvoicePaymentStatus","x-speakeasy-name-override":"paymentStatus","description":"Get payment status for the authenticated team.","tags":["Invoices"],"responses":{"200":{"description":"Payment status for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"number","description":"Score associated with the invoice payment status","example":85},"paymentStatus":{"type":"string","description":"The payment status of the invoice","example":"good"}},"required":["score","paymentStatus"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/invoices/summary":{"get":{"summary":"Invoice summary","operationId":"getInvoiceSummary","x-speakeasy-name-override":"summary","description":"Get summary of invoices for the authenticated team.","tags":["Invoices"],"parameters":[{"schema":{"type":"array","items":{"type":"string","enum":["draft","overdue","paid","unpaid","canceled","scheduled"]},"description":"Filter summary by invoice statuses","example":["draft","unpaid"]},"required":false,"description":"Filter summary by invoice statuses","in":"query","name":"statuses"}],"responses":{"200":{"description":"Summary of invoices for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","description":"Base currency of the team","example":"USD"},"totalAmount":{"type":"number","description":"Total amount of all invoices converted to base currency","example":224171.25},"invoiceCount":{"type":"number","description":"Total number of invoices","example":15},"breakdown":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","description":"Original currency of the invoices","example":"EUR"},"originalAmount":{"type":"number","description":"Total amount in original currency","example":15000.5},"convertedAmount":{"type":"number","description":"Amount converted to base currency","example":16250.75},"count":{"type":"number","description":"Number of invoices in this currency","example":5}},"required":["currency","originalAmount","convertedAmount","count"]},"description":"Currency breakdown when multiple currencies are involved","example":[{"currency":"EUR","originalAmount":15000.5,"convertedAmount":16250.75,"count":5},{"currency":"GBP","originalAmount":8000.25,"convertedAmount":9200.5,"count":3}]}},"required":["currency","totalAmount","invoiceCount"],"description":"Invoice summary object containing total amount converted to team's base currency and total invoice count.","example":{"currency":"USD","totalAmount":224171.25,"invoiceCount":15,"breakdown":[{"currency":"EUR","originalAmount":15000.5,"convertedAmount":16250.75,"count":5},{"currency":"GBP","originalAmount":8000.25,"convertedAmount":9200.5,"count":3}]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/invoices/{id}":{"get":{"summary":"Retrieve a invoice","operationId":"getInvoiceById","x-speakeasy-name-override":"get","description":"Retrieve a invoice by its unique identifier for the authenticated team.","tags":["Invoices"],"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Retrieve a invoice by its unique identifier for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the invoice","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"},"status":{"type":"string","enum":["draft","overdue","paid","unpaid","canceled","scheduled"],"description":"Current status of the invoice","example":"paid"},"dueDate":{"type":"string","description":"Due date of the invoice in ISO 8601 format","example":"2024-06-30T23:59:59.000Z"},"issueDate":{"type":"string","description":"Issue date of the invoice in ISO 8601 format","example":"2024-06-01T00:00:00.000Z"},"invoiceNumber":{"type":"string","description":"Invoice number as shown to the customer (auto-generated if not provided)","example":"INV-2024-001"},"amount":{"type":["number","null"],"description":"Total amount of the invoice, or null if not yet calculated","example":1500.75},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the invoice amount","example":"USD"},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the customer","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Name of the customer","example":"Acme Corporation"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"email":{"type":["string","null"],"format":"email","description":"Email address of the customer","example":"info@acme.com"}},"required":["id","name","website","email"],"description":"Customer details"},"paidAt":{"type":["string","null"],"description":"Timestamp when the invoice was paid (ISO 8601), or null if unpaid","example":"2024-06-15T12:00:00.000Z"},"reminderSentAt":{"type":["string","null"],"description":"Timestamp when a payment reminder was sent (ISO 8601), or null if never sent","example":"2024-06-10T09:00:00.000Z"},"note":{"type":["string","null"],"description":"Optional note attached to the invoice","example":"Thank you for your business."},"vat":{"type":["number","null"],"description":"Value-added tax amount, or null if not applicable","example":120},"tax":{"type":["number","null"],"description":"Tax amount, or null if not applicable","example":80},"discount":{"type":["number","null"],"description":"Discount amount applied to the invoice, or null if none","example":50},"subtotal":{"type":["number","null"],"description":"Subtotal before taxes and discounts, or null if not calculated","example":1400},"viewedAt":{"type":["string","null"],"description":"Timestamp when the invoice was viewed by the customer (ISO 8601), or null if never viewed","example":"2024-06-05T14:30:00.000Z"},"customerName":{"type":["string","null"],"description":"Name of the customer as shown on the invoice, or null if not set","example":"Acme Corporation"},"sentTo":{"type":["string","null"],"format":"email","description":"Email address to which the invoice was sent, or null if not sent","example":"billing@acme.com"},"sentAt":{"type":["string","null"],"description":"Timestamp when the invoice was sent (ISO 8601), or null if not sent","example":"2024-06-02T08:00:00.000Z"},"createdAt":{"type":"string","description":"Timestamp when the invoice was created (ISO 8601)","example":"2024-06-01T07:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when the invoice was last updated (ISO 8601)","example":"2024-06-15T10:00:00.000Z"},"pdfUrl":{"type":["string","null"],"format":"uri","description":"URL to download the invoice PDF, or null if not generated","example":"https://app.dino.id/api/download/invoice?token=eef58951-1682-4062-b010-425866032390"},"previewUrl":{"type":["string","null"],"format":"uri","description":"URL to preview the invoice in the browser, or null if not generated","example":"https://app.dino.id/i/eef58951-1682-4062-b010-425866032390"}},"required":["id","status","dueDate","issueDate","amount","currency","customer","paidAt","reminderSentAt","note","vat","tax","discount","subtotal","viewedAt","customerName","sentTo","sentAt","createdAt","updatedAt","pdfUrl","previewUrl"],"description":"Invoice object"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"summary":"Update an invoice","operationId":"updateInvoice","x-speakeasy-name-override":"update","description":"Update an invoice by its unique identifier for the authenticated team.","tags":["Invoices"],"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","name":"id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["paid","canceled","unpaid","scheduled","draft"],"description":"New status for the invoice","example":"paid"},"paidAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the invoice was paid (ISO 8601)","example":"2024-06-15T12:00:00.000Z"},"internalNote":{"type":["string","null"],"description":"Internal note for the invoice","example":"Payment received via bank transfer"}},"description":"Schema for updating an invoice"}}}},"responses":{"200":{"description":"Invoice updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the invoice","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"},"status":{"type":"string","enum":["draft","overdue","paid","unpaid","canceled","scheduled"],"description":"Current status of the invoice","example":"paid"},"dueDate":{"type":"string","description":"Due date of the invoice in ISO 8601 format","example":"2024-06-30T23:59:59.000Z"},"issueDate":{"type":"string","description":"Issue date of the invoice in ISO 8601 format","example":"2024-06-01T00:00:00.000Z"},"invoiceNumber":{"type":"string","description":"Invoice number as shown to the customer (auto-generated if not provided)","example":"INV-2024-001"},"amount":{"type":["number","null"],"description":"Total amount of the invoice, or null if not yet calculated","example":1500.75},"currency":{"type":["string","null"],"description":"Currency code (ISO 4217) for the invoice amount","example":"USD"},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the customer","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Name of the customer","example":"Acme Corporation"},"website":{"type":["string","null"],"description":"Website URL of the customer","example":"https://acme.com"},"email":{"type":["string","null"],"format":"email","description":"Email address of the customer","example":"info@acme.com"}},"required":["id","name","website","email"],"description":"Customer details"},"paidAt":{"type":["string","null"],"description":"Timestamp when the invoice was paid (ISO 8601), or null if unpaid","example":"2024-06-15T12:00:00.000Z"},"reminderSentAt":{"type":["string","null"],"description":"Timestamp when a payment reminder was sent (ISO 8601), or null if never sent","example":"2024-06-10T09:00:00.000Z"},"note":{"type":["string","null"],"description":"Optional note attached to the invoice","example":"Thank you for your business."},"vat":{"type":["number","null"],"description":"Value-added tax amount, or null if not applicable","example":120},"tax":{"type":["number","null"],"description":"Tax amount, or null if not applicable","example":80},"discount":{"type":["number","null"],"description":"Discount amount applied to the invoice, or null if none","example":50},"subtotal":{"type":["number","null"],"description":"Subtotal before taxes and discounts, or null if not calculated","example":1400},"viewedAt":{"type":["string","null"],"description":"Timestamp when the invoice was viewed by the customer (ISO 8601), or null if never viewed","example":"2024-06-05T14:30:00.000Z"},"customerName":{"type":["string","null"],"description":"Name of the customer as shown on the invoice, or null if not set","example":"Acme Corporation"},"sentTo":{"type":["string","null"],"format":"email","description":"Email address to which the invoice was sent, or null if not sent","example":"billing@acme.com"},"sentAt":{"type":["string","null"],"description":"Timestamp when the invoice was sent (ISO 8601), or null if not sent","example":"2024-06-02T08:00:00.000Z"},"createdAt":{"type":"string","description":"Timestamp when the invoice was created (ISO 8601)","example":"2024-06-01T07:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when the invoice was last updated (ISO 8601)","example":"2024-06-15T10:00:00.000Z"},"pdfUrl":{"type":["string","null"],"format":"uri","description":"URL to download the invoice PDF, or null if not generated","example":"https://app.dino.id/api/download/invoice?token=eef58951-1682-4062-b010-425866032390"},"previewUrl":{"type":["string","null"],"format":"uri","description":"URL to preview the invoice in the browser, or null if not generated","example":"https://app.dino.id/i/eef58951-1682-4062-b010-425866032390"}},"required":["id","status","dueDate","issueDate","amount","currency","customer","paidAt","reminderSentAt","note","vat","tax","discount","subtotal","viewedAt","customerName","sentTo","sentAt","createdAt","updatedAt","pdfUrl","previewUrl"],"description":"Response after updating an invoice"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a invoice","operationId":"deleteInvoice","x-speakeasy-name-override":"delete","description":"Delete an invoice by its unique identifier for the authenticated team. Only invoices with status 'draft' or 'canceled' can be deleted directly. If the invoice is not in one of these statuses, update its status to 'canceled' before attempting deletion.","tags":["Invoices"],"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Delete a invoice by its unique identifier for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the deleted invoice","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"}},"required":["id"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/search":{"get":{"summary":"Search","operationId":"search","x-speakeasy-name-override":"search","description":"Search across all data, invoices, documents, customers, transactions, and more.","tags":["Search"],"parameters":[{"schema":{"type":"string","description":"The term to search for across all data sources.","example":"Acme"},"required":false,"description":"The term to search for across all data sources.","name":"searchTerm","in":"query"},{"schema":{"type":"string","description":"Language code to use for search relevance and results.","example":"en"},"required":false,"description":"Language code to use for search relevance and results.","name":"language","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":1000,"default":30,"description":"Maximum number of results to return.","example":30},"required":false,"description":"Maximum number of results to return.","name":"limit","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":5,"description":"Maximum number of results to return per table/entity.","example":5},"required":false,"description":"Maximum number of results to return per table/entity.","name":"itemsPerTableLimit","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":1,"default":0.01,"description":"Minimum relevance score threshold for including a result.","example":0.01},"required":false,"description":"Minimum relevance score threshold for including a result.","name":"relevanceThreshold","in":"query"}],"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the search result item.","example":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a"},"type":{"type":"string","description":"Type of the entity returned (e.g., invoice, customer, transaction).","example":"invoice"},"relevance":{"type":"number","description":"Relevance score for the search result.","example":0.92},"created_at":{"type":"string","description":"ISO 8601 timestamp when the entity was created.","example":"2024-06-01T00:00:00.000Z"},"data":{"description":"Additional data for the search result, structure depends on the type.","example":{"invoiceNumber":"INV-2024-001","customerName":"Acme Corporation","amount":1500.75}}},"required":["id","type","relevance","created_at"]},"description":"Search results.","example":[{"id":"b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a","type":"invoice","relevance":0.92,"created_at":"2024-06-01T00:00:00.000Z","data":{"invoiceNumber":"INV-2024-001","customerName":"Acme Corporation","amount":1500.75}}]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/revenue":{"get":{"summary":"Revenue reports","operationId":"getRevenueReports","x-speakeasy-name-override":"revenue","description":"Revenue reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601 format)","example":"2023-01-01"},"required":true,"description":"Start date (ISO 8601 format)","name":"from","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601 format)","example":"2023-12-31"},"required":true,"description":"End date (ISO 8601 format)","name":"to","in":"query"},{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"},{"schema":{"type":"string","enum":["gross","net"],"default":"net","description":"Type of revenue calculation","example":"net"},"required":false,"description":"Type of revenue calculation","name":"revenueType","in":"query"}],"responses":{"200":{"description":"Revenue reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRevenueResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/profit":{"get":{"summary":"Profit reports","operationId":"getProfitReports","x-speakeasy-name-override":"profit","description":"Profit reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601 format)","example":"2023-01-01"},"required":true,"description":"Start date (ISO 8601 format)","name":"from","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601 format)","example":"2023-12-31"},"required":true,"description":"End date (ISO 8601 format)","name":"to","in":"query"},{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"},{"schema":{"type":"string","enum":["gross","net"],"default":"net","description":"Type of revenue calculation","example":"net"},"required":false,"description":"Type of revenue calculation","name":"revenueType","in":"query"}],"responses":{"200":{"description":"Profit reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProfitResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/burn-rate":{"get":{"summary":"Burn rate reports","operationId":"getBurnRateReports","x-speakeasy-name-override":"burn-rate","description":"Burn rate reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601 format)","example":"2023-01-01"},"required":true,"description":"Start date (ISO 8601 format)","name":"from","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601 format)","example":"2023-12-31"},"required":true,"description":"End date (ISO 8601 format)","name":"to","in":"query"},{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"}],"responses":{"200":{"description":"Burn rate reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBurnRateResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/runway":{"get":{"summary":"Runway reports","operationId":"getRunwayReports","x-speakeasy-name-override":"runway","description":"Runway reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"}],"responses":{"200":{"description":"Runway reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRunwayResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/expenses":{"get":{"summary":"Expense reports","operationId":"getExpensesReports","x-speakeasy-name-override":"expenses","description":"Expense reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601 format)","example":"2023-01-01"},"required":true,"description":"Start date (ISO 8601 format)","name":"from","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601 format)","example":"2023-12-31"},"required":true,"description":"End date (ISO 8601 format)","name":"to","in":"query"},{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"}],"responses":{"200":{"description":"Expense reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExpensesResponseSchema"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reports/spending":{"get":{"summary":"Spending reports","operationId":"getSpendingReports","x-speakeasy-name-override":"spending","description":"Spending reports for the authenticated team.","tags":["Reports"],"parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601 format)","example":"2023-01-01"},"required":true,"description":"Start date (ISO 8601 format)","name":"from","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601 format)","example":"2023-12-31"},"required":true,"description":"End date (ISO 8601 format)","name":"to","in":"query"},{"schema":{"type":"string","description":"Currency code (ISO 4217)","example":"USD"},"required":false,"description":"Currency code (ISO 4217)","name":"currency","in":"query"}],"responses":{"200":{"description":"Spending reports for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingResultArray"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-projects":{"get":{"summary":"List all tracker projects","operationId":"listTrackerProjects","x-speakeasy-name-override":"list","description":"List all tracker projects for the authenticated team.","tags":["Tracker Projects"],"parameters":[{"schema":{"type":["string","null"],"description":"Cursor for pagination, representing the last item from the previous page","example":"eyJpZCI6IjEyMyJ9"},"required":false,"description":"Cursor for pagination, representing the last item from the previous page","in":"query","name":"cursor"},{"schema":{"type":"number","minimum":1,"maximum":100,"description":"Number of projects to return per page (1-100)","example":20},"required":false,"description":"Number of projects to return per page (1-100)","in":"query","name":"pageSize"},{"schema":{"type":["string","null"],"description":"Search query string to filter projects by name or description","example":"website"},"required":false,"description":"Search query string to filter projects by name or description","in":"query","name":"q"},{"schema":{"type":["string","null"],"description":"Start date for filtering projects by creation date in YYYY-MM-DD format","example":"2024-04-01"},"required":false,"description":"Start date for filtering projects by creation date in YYYY-MM-DD format","in":"query","name":"start"},{"schema":{"type":["string","null"],"description":"End date for filtering projects by creation date in YYYY-MM-DD format","example":"2024-04-30"},"required":false,"description":"End date for filtering projects by creation date in YYYY-MM-DD format","in":"query","name":"end"},{"schema":{"type":["string","null"],"enum":["in_progress","completed",null],"description":"Filter projects by status","example":"in_progress"},"required":false,"description":"Filter projects by status","in":"query","name":"status"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of customer IDs to filter projects by specific customers","example":["customer-1","customer-2"]},"required":false,"description":"Array of customer IDs to filter projects by specific customers","in":"query","name":"customers"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Array of tag IDs to filter projects by specific tags","example":["tag-1","tag-2"]},"required":false,"description":"Array of tag IDs to filter projects by specific tags","in":"query","name":"tags"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Sort as [column, direction]. Columns: name, created_at, time, amount, assigned, customer, tags. Direction: asc or desc.","example":["created_at","desc"]},"required":false,"description":"Sort as [column, direction]. Columns: name, created_at, time, amount, assigned, customer, tags. Direction: asc or desc.","in":"query","name":"sort"}],"responses":{"200":{"description":"List all tracker projects for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackerProjectsResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a tracker project","operationId":"createTrackerProject","x-speakeasy-name-override":"create","description":"Create a tracker project for the authenticated team.","tags":["Tracker Projects"],"requestBody":{"description":"Tracker project to create","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the project","example":"Website Redesign"},"description":{"type":["string","null"],"description":"Detailed description of the project","example":"Complete redesign of the company website with modern UI/UX and improved performance"},"estimate":{"type":["number","null"],"description":"Estimated total hours required to complete the project","example":120},"billable":{"type":["boolean","null"],"default":false,"description":"Whether the project is billable to the customer","example":true},"rate":{"type":["number","null"],"minimum":1,"description":"Hourly rate for the project in the specified currency","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","enum":["in_progress","completed"],"description":"Current status of the project","example":"in_progress"},"customerId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the customer associated with this project","example":"a1b2c3d4-e5f6-7890-abcd-1234567890ef"},"tags":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"f1e2d3c4-b5a6-7890-1234-567890abcdef"},"value":{"type":"string","description":"Display value of the tag","example":"Design"}},"required":["id","value"]},"description":"Array of tags to associate with the project","example":[{"id":"f1e2d3c4-b5a6-7890-1234-567890abcdef","value":"Design"},{"id":"e2d3c4b5-a6f1-7890-1234-567890abcdef","value":"Frontend"}]}},"required":["name"]},"example":{"name":"New Project"}}}},"responses":{"200":{"description":"Tracker project created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackerProjectResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-projects/{id}":{"patch":{"summary":"Update a tracker project","operationId":"updateTrackerProject","x-speakeasy-name-override":"update","description":"Update a tracker project for the authenticated team.","tags":["Tracker Projects"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the project to retrieve","example":"b7e6c8e2-1f2a-4c3b-9e2d-1a2b3c4d5e6f"},"required":true,"description":"Unique identifier of the project to retrieve","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the project","example":"Website Redesign"},"description":{"type":["string","null"],"description":"Detailed description of the project","example":"Complete redesign of the company website with modern UI/UX and improved performance"},"estimate":{"type":["number","null"],"description":"Estimated total hours required to complete the project","example":120},"billable":{"type":["boolean","null"],"default":false,"description":"Whether the project is billable to the customer","example":true},"rate":{"type":["number","null"],"minimum":1,"description":"Hourly rate for the project in the specified currency","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","enum":["in_progress","completed"],"description":"Current status of the project","example":"in_progress"},"customerId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the customer associated with this project","example":"a1b2c3d4-e5f6-7890-abcd-1234567890ef"},"tags":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tag","example":"f1e2d3c4-b5a6-7890-1234-567890abcdef"},"value":{"type":"string","description":"Display value of the tag","example":"Design"}},"required":["id","value"]},"description":"Array of tags to associate with the project","example":[{"id":"f1e2d3c4-b5a6-7890-1234-567890abcdef","value":"Design"},{"id":"e2d3c4b5-a6f1-7890-1234-567890abcdef","value":"Frontend"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Tracker project updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackerProjectResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"Retrieve a tracker project","operationId":"getTrackerProjectById","x-speakeasy-name-override":"get","description":"Retrieve a tracker project for the authenticated team.","tags":["Tracker Projects"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the project to retrieve","example":"b7e6c8e2-1f2a-4c3b-9e2d-1a2b3c4d5e6f"},"required":true,"description":"Unique identifier of the project to retrieve","name":"id","in":"path"}],"responses":{"200":{"description":"Tracker project by ID for the authenticated team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackerProjectResponse"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a tracker project","operationId":"deleteTrackerProject","x-speakeasy-name-override":"delete","description":"Delete a tracker project for the authenticated team.","tags":["Tracker Projects"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the project to retrieve","example":"b7e6c8e2-1f2a-4c3b-9e2d-1a2b3c4d5e6f"},"required":true,"description":"Unique identifier of the project to retrieve","name":"id","in":"path"}],"responses":{"200":{"description":"Tracker project deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project to delete","example":"b7e6c8e2-1f2a-4c3b-9e2d-1a2b3c4d5e6f"}},"required":["id"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries":{"get":{"summary":"List all tracker entries","operationId":"listTrackerEntries","x-speakeasy-name-override":"list","description":"List all tracker entries for the authenticated team.","tags":["Tracker Entries"],"parameters":[{"schema":{"type":"string","description":"Start date of the range (inclusive) in YYYY-MM-DD format","example":"2024-04-01"},"required":true,"description":"Start date of the range (inclusive) in YYYY-MM-DD format","in":"query","name":"from"},{"schema":{"type":"string","description":"End date of the range (inclusive) in YYYY-MM-DD format","example":"2024-04-30"},"required":true,"description":"End date of the range (inclusive) in YYYY-MM-DD format","in":"query","name":"to"},{"schema":{"type":"string","format":"uuid","description":"Optional project ID to filter tracker entries by specific project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"required":false,"description":"Optional project ID to filter tracker entries by specific project","in":"query","name":"projectId"}],"responses":{"200":{"description":"List all tracker entries for the authenticated team.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"totalDuration":{"type":"number","description":"Total duration of all tracker entries in the response in seconds","example":86400},"totalAmount":{"type":"number","description":"Total monetary amount for all tracker entries in the response","example":1800},"from":{"type":"string","description":"Start date of the queried range in YYYY-MM-DD format","example":"2024-04-01"},"to":{"type":"string","description":"End date of the queried range in YYYY-MM-DD format","example":"2024-04-30"}},"required":["totalDuration","totalAmount","from","to"],"description":"Metadata about the tracker entries response including totals and date range"},"result":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]}},"description":"Tracker entries grouped by date, where each key is a date in YYYY-MM-DD format and the value is an array of tracker entries for that date"}},"required":["meta","result"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a tracker entry","operationId":"createTrackerEntry","x-speakeasy-name-override":"create","description":"Create a tracker entry for the authenticated team.","tags":["Tracker Entries"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","format":"date-time","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"dates":{"type":"array","items":{"type":"string","description":"Date in YYYY-MM-DD format","example":"2024-04-15"},"description":"Array of dates for which to create tracker entries","example":["2024-04-15","2024-04-16"]},"assignedId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user assigned to this tracker entry. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"projectId":{"type":"string","format":"uuid","description":"Unique identifier of the project associated with this tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"description":{"type":["string","null"],"description":"Optional description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800}},"required":["start","stop","dates","projectId","duration"]}}}},"responses":{"201":{"description":"Tracker entry created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]},"description":"Array of created tracker entries"}},"required":["data"],"description":"Response schema for created tracker entries"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/bulk":{"post":{"summary":"Create multiple tracker entries","operationId":"createTrackerEntriesBulk","x-speakeasy-name-override":"createBulk","description":"Create multiple tracker entries in a single request for efficient data migration.","tags":["Tracker Entries"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","format":"date-time","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"dates":{"type":"array","items":{"type":"string","description":"Date in YYYY-MM-DD format","example":"2024-04-15"},"description":"Array of dates for which to create tracker entries","example":["2024-04-15","2024-04-16"]},"assignedId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user assigned to this tracker entry. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"projectId":{"type":"string","format":"uuid","description":"Unique identifier of the project associated with this tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"description":{"type":["string","null"],"description":"Optional description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800}},"required":["start","stop","dates","projectId","duration"]},"minItems":1,"maxItems":100,"description":"Array of tracker entries to create (maximum 100 entries per request)","example":[{"start":"2024-04-15T09:00:00.000Z","stop":"2024-04-15T17:00:00.000Z","dates":["2024-04-15"],"assignedId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","projectId":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2","description":"Working on authentication feature","duration":28800},{"start":"2024-04-16T09:00:00.000Z","stop":"2024-04-16T17:00:00.000Z","dates":["2024-04-16"],"assignedId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","projectId":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2","description":"Working on dashboard feature","duration":28800}]}},"required":["entries"]}}}},"responses":{"201":{"description":"Tracker entries created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]},"description":"Array of created tracker entries"}},"required":["data"],"description":"Response schema for created tracker entries"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/{id}":{"patch":{"summary":"Update a tracker entry","operationId":"updateTrackerEntry","x-speakeasy-name-override":"update","description":"Update a tracker entry for the authenticated team.","tags":["Tracker Entries"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry to delete","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"required":true,"description":"Unique identifier of the tracker entry to delete","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","format":"date-time","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"dates":{"type":"array","items":{"type":"string","description":"Date in YYYY-MM-DD format","example":"2024-04-15"},"description":"Array of dates for which to create tracker entries","example":["2024-04-15","2024-04-16"]},"assignedId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user assigned to this tracker entry. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"projectId":{"type":"string","format":"uuid","description":"Unique identifier of the project associated with this tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"description":{"type":["string","null"],"description":"Optional description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800}},"required":["start","stop","dates","projectId","duration"]}}}},"responses":{"200":{"description":"Tracker entry updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":"number","description":"Duration of the tracker entry in seconds","example":28800},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":"string","description":"Stop time of the tracker entry in ISO 8601 format","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]},"description":"Array of created tracker entries"}},"required":["data"],"description":"Response schema for created tracker entries"}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a tracker entry","operationId":"deleteTrackerEntry","x-speakeasy-name-override":"delete","description":"Delete a tracker entry for the authenticated team.","tags":["Tracker Entries"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry to delete","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"required":true,"description":"Unique identifier of the tracker entry to delete","name":"id","in":"path"}],"responses":{"200":{"description":"Tracker entry deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry to delete","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"}},"required":["id"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/timer/start":{"post":{"summary":"Start a timer","operationId":"startTimer","x-speakeasy-name-override":"startTimer","description":"Start a new timer or continue from a paused entry.","tags":["Tracker Timer"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Unique identifier of the project to track time for","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"assignedId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user to assign the timer to. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"description":{"type":["string","null"],"description":"Optional description for the timer session","example":"Working on implementing timer feature"},"start":{"type":"string","format":"date-time","description":"Start time in ISO 8601 format. If not provided, will use current time","example":"2024-04-15T09:00:00.000Z"},"continueFromEntry":{"type":"string","format":"uuid","description":"Continue from a specific paused entry ID","example":"c4d5e6f7-2a3b-4c5d-8e9f-3a4b5c6d7e8f"}},"required":["projectId"]}}}},"responses":{"201":{"description":"Timer started successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":["number","null"],"description":"Duration of the timer entry in seconds. -1 indicates running, null for paused, positive number for completed","example":-1},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":["string","null"],"description":"Stop time of the tracker entry in ISO 8601 format. Null for running timers.","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/timer/stop":{"post":{"summary":"Stop a timer","operationId":"stopTimer","x-speakeasy-name-override":"stopTimer","description":"Stop the current running timer or a specific timer entry.","tags":["Tracker Timer"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid","description":"Unique identifier of the specific timer entry to stop. If not provided, will stop the current running timer for the user","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"assignedId":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user whose timer should be stopped. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"stop":{"type":"string","format":"date-time","description":"Stop time in ISO 8601 format. If not provided, will use current time","example":"2024-04-15T17:00:00.000Z"}}}}}},"responses":{"200":{"description":"Timer stopped successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":["number","null"],"description":"Duration of the timer entry in seconds. -1 indicates running, null for paused, positive number for completed","example":-1},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":["string","null"],"description":"Stop time of the tracker entry in ISO 8601 format. Null for running timers.","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"discarded":{"type":"boolean","enum":[true],"description":"Always true for discarded timer entries (duration < 60s)","example":true},"duration":{"type":"number"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"trackerProject":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"start":{"type":["string","null"]},"stop":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["id","discarded","duration","start","stop","description"]}]}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/timer/current":{"get":{"summary":"Get current timer","operationId":"getCurrentTimer","x-speakeasy-name-override":"getCurrentTimer","description":"Get the currently running timer for the authenticated user.","tags":["Tracker Timer"],"parameters":[{"schema":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user whose current timer should be retrieved. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"required":false,"description":"Unique identifier of the user whose current timer should be retrieved. If not provided, will use the authenticated user","name":"assignedId","in":"query"}],"responses":{"200":{"description":"Current timer retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the tracker entry","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the tracker entry was created in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"duration":{"type":["number","null"],"description":"Duration of the timer entry in seconds. -1 indicates running, null for paused, positive number for completed","example":-1},"start":{"type":"string","description":"Start time of the tracker entry in ISO 8601 format","example":"2024-04-15T09:00:00.000Z"},"stop":{"type":["string","null"],"description":"Stop time of the tracker entry in ISO 8601 format. Null for running timers.","example":"2024-04-15T17:00:00.000Z"},"teamId":{"type":"string","description":"Unique identifier of the team that owns this tracker entry","example":"team-1234"},"description":{"type":["string","null"],"description":"Description or notes for the tracker entry","example":"Worked on implementing user authentication feature"},"rate":{"type":["number","null"],"description":"Hourly rate applied to this tracker entry","example":75},"currency":{"type":["string","null"],"description":"Currency code for the rate in ISO 4217 format","example":"USD"},"billed":{"type":"boolean","description":"Whether this tracker entry has been billed to the customer","example":false},"date":{"type":"string","description":"Date of the tracker entry in YYYY-MM-DD format","example":"2024-04-15"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"fullName":{"type":"string","description":"Full name of the user","example":"Jane Doe"},"avatarUrl":{"type":"string","description":"URL to the user's avatar image","example":"https://cdn.dino.id/avatar.jpg"}},"required":["id","fullName","avatarUrl"],"description":"User information for the person who created this tracker entry"},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project","example":"b3b6e2c2-1f2a-4e3b-9c1d-2a4b6e2c21f2"},"createdAt":{"type":"string","description":"Date and time when the project was created in ISO 8601 format","example":"2024-03-01T10:00:00.000Z"},"rate":{"type":["number","null"],"description":"Default hourly rate for the project","example":75},"currency":{"type":["string","null"],"description":"Currency code for the project rate in ISO 4217 format","example":"USD"},"status":{"type":"string","description":"Current status of the project","example":"in_progress"},"description":{"type":["string","null"],"description":"Description of the project","example":"Complete website redesign with modern UI/UX"},"name":{"type":"string","description":"Name of the project","example":"Website Redesign Project"},"billable":{"type":["boolean","null"],"description":"Whether the project is billable to the customer","example":true},"estimate":{"type":["number","null"],"description":"Estimated total hours for the project","example":120},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer","example":"customer-1234"},"name":{"type":"string","description":"Name of the customer or organization","example":"Acme Corporation"}},"required":["id","name"],"description":"Customer information associated with the project"}},"required":["id","createdAt","rate","currency","status","description","name","billable","estimate","customer"],"description":"Project information associated with this tracker entry"}},"required":["id","createdAt","duration","start","stop","teamId","description","rate","currency","billed","date","user","project"]}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tracker-entries/timer/status":{"get":{"summary":"Get timer status","operationId":"getTimerStatus","x-speakeasy-name-override":"getTimerStatus","description":"Get timer status including elapsed time for the authenticated user.","tags":["Tracker Timer"],"parameters":[{"schema":{"type":["string","null"],"format":"uuid","description":"Unique identifier of the user whose current timer should be retrieved. If not provided, will use the authenticated user","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"required":false,"description":"Unique identifier of the user whose current timer should be retrieved. If not provided, will use the authenticated user","name":"assignedId","in":"query"}],"responses":{"200":{"description":"Timer status retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"isRunning":{"type":"boolean","description":"Whether there is currently a running timer","example":true},"currentEntry":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"start":{"type":["string","null"]},"description":{"type":["string","null"]},"projectId":{"type":"string","format":"uuid"},"trackerProject":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","start","description","projectId","trackerProject"],"description":"Current running timer details, null if not running"},"elapsedTime":{"type":"number","description":"Elapsed time in seconds for the current running timer","example":1800}},"required":["isRunning","currentEntry","elapsedTime"]}},"required":["data"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/accounts":{"get":{"summary":"List agent accounts","operationId":"listTreasuryAccounts","tags":["Treasury"],"responses":{"200":{"description":"List of agent spend accounts with budget info","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"budgetPeriod":{"type":"string"},"budgetLimitCents":{"type":"number"},"maxTransactionCents":{"type":"number"},"approvalThresholdCents":{"type":["number","null"]},"spentThisPeriodCents":{"type":"number"},"currency":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","status","budgetPeriod","budgetLimitCents","maxTransactionCents","approvalThresholdCents","spentThisPeriodCents","currency","createdAt"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/approvals":{"get":{"summary":"List spend requests","operationId":"listTreasuryApprovals","tags":["Treasury"],"parameters":[{"schema":{"type":"string","enum":["approved","declined","needs_approval","completed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"agentAccountId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of spend requests","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"agentName":{"type":["string","null"]},"merchantName":{"type":"string"},"amountCents":{"type":"number"},"currency":{"type":"string"},"decisionReason":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","agentName","merchantName","amountCents","currency","decisionReason","createdAt"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/approvals/{id}/approve":{"post":{"summary":"Approve a spend request","operationId":"approveTreasuryRequest","tags":["Treasury"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Spend request approved","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved"]}},"required":["id","status"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/approvals/{id}/decline":{"post":{"summary":"Decline a spend request","operationId":"declineTreasuryRequest","tags":["Treasury"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Spend request declined","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["declined"]}},"required":["id","status"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/ledger":{"get":{"summary":"List ledger entries","operationId":"listTreasuryLedger","tags":["Treasury"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"agentAccountId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of ledger entries","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentAccountId":{"type":"string"},"agentName":{"type":["string","null"]},"amountCents":{"type":"number"},"currency":{"type":"string"},"merchantName":{"type":"string"},"decisionStatus":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","agentAccountId","agentName","amountCents","currency","merchantName","decisionStatus","decisionReason","createdAt"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/keys":{"get":{"summary":"List spending keys","operationId":"listTreasuryKeys","tags":["Treasury"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"agentAccountId","in":"query"}],"responses":{"200":{"description":"List of Dino spending keys","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"keyPrefix":{"type":"string"},"mode":{"type":"string"},"status":{"type":"string"},"lastUsedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","keyPrefix","mode","status","lastUsedAt","createdAt"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/keys/{id}":{"delete":{"summary":"Revoke a spending key","operationId":"revokeTreasuryKey","tags":["Treasury"],"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"},"status":{"type":"string","enum":["revoked"]}},"required":["id","status"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/wallet":{"get":{"summary":"Get team wallet balance","operationId":"getTreasuryWallet","tags":["Treasury"],"responses":{"200":{"description":"Team wallet balance","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"currency":{"type":"string"},"availableBalanceCents":{"type":"number"},"pendingBalanceCents":{"type":"number"},"reservedBalanceCents":{"type":"number"},"status":{"type":"string"},"provider":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","currency","availableBalanceCents","pendingBalanceCents","reservedBalanceCents","status","provider","createdAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/funding-sources":{"get":{"summary":"List funding sources","operationId":"listTreasuryFundingSources","tags":["Treasury"],"responses":{"200":{"description":"List of funding sources (payment methods)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"displayBrand":{"type":["string","null"]},"displayLast4":{"type":["string","null"]},"chargeOnDemand":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","provider","type","status","displayBrand","displayLast4","chargeOnDemand","createdAt"]}}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/treasury/deposit":{"post":{"summary":"Deposit funds into the team wallet","operationId":"createTreasuryDeposit","tags":["Treasury"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","default":"usd"},"fundingSourceId":{"type":"string","format":"uuid"},"idempotencyKey":{"type":"string"}},"required":["amountCents"]}}}},"responses":{"201":{"description":"Deposit initiated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"number"},"feeCents":{"type":"number"},"creditedAmountCents":{"type":"number"},"currency":{"type":"string"},"provider":{"type":"string"},"providerPaymentIntentId":{"type":["string","null"]},"financialAccountId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","amountCents","feeCents","creditedAmountCents","currency","provider","providerPaymentIntentId","financialAccountId","createdAt"]}}}},"default":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"webhooks":{},"x-tagGroups":[{"name":"Agent Bank","tags":["Agent spend","Spend requests","Checkout","Cross-team transfers","Crypto payouts","Treasury"]},{"name":"Books","tags":["Bank Accounts","Transactions","Customers","Invoices","Invoice Payments","Reports","Search","Documents","Inbox","Tags"]},{"name":"Workspace","tags":["OAuth","Teams","Users","Notifications","Tracker Projects","Tracker Entries","Tracker Timer","Desktop","Files","Integrations","Webhooks"]}]}