{"openapi":"3.1.0","info":{"title":"Mercury (BYOK) API","version":"0.1.0","description":"Mercury (BYOK) lets an AI assistant read your own Mercury data through the Mercury API with a key you supply (Mercury API token, read-only (paste the whole value, including the secret-token: prefix)). Read-only: 12 tools (list_accounts, list_account_transactions, list_transactions, get_transaction, list_account_statements, list_categories, list_credit_accounts, list_treasury_accounts, list_cards,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-mercury.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mercury/docs"},"termsOfService":"https://connectorbay.com/byok-mercury/terms"},"servers":[{"url":"https://byok-mercury.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mercury/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_accounts":{"post":{"operationId":"list_accounts","summary":"List the bank accounts with name, nickname, kind, type, status, current balance and available balance. Account and routi","description":"List the bank accounts with name, nickname, kind, type, status, current balance and available balance. Account and routing numbers are not returned. Use for \"What are the balances of my Mercury accounts\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last account of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_account_transactions":{"post":{"operationId":"list_account_transactions","summary":"List the transactions of one account (default: last 30 days) with amount, status, counterparty, description, note and ca","description":"List the transactions of one account (default: last 30 days) with amount, status, counterparty, description, note and category. Use for \"Show the last 20 transactions on my Mercury operations account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Account id (UUID) from list_accounts.","maxLength":200,"title":"Account Id","type":"string"},"start":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Earliest date; default is 30 days ago. Format YYYY-MM-DD or an ISO 8601 time.","title":"Start"},"end":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Latest date; default is today. Format YYYY-MM-DD or an ISO 8601 time.","title":"End"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to find in the description, note, memo or counterparty name.","title":"Search"},"status":{"anyOf":[{"enum":["pending","sent","cancelled","failed","reversed","blocked"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this status.","title":"Status"},"mercury_category":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this Mercury category, for example Advertising or SoftwareAndTechnology.","title":"Mercury Category"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order asc or desc (default desc).","title":"Order"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of results to skip, for paging.","title":"Offset"}},"required":["account_id"],"title":"list_account_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_transactions":{"post":{"operationId":"list_transactions","summary":"List transactions across all accounts, filtered by created or posted date, status, account, card, search text or categor","description":"List transactions across all accounts, filtered by created or posted date, status, account, card, search text or category, with cursor paging. Use for \"Which Mercury transactions mention 'AWS' this quarter\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Earliest creation date; default is your first transaction. Format YYYY-MM-DD or an ISO 8601 time.","title":"Start"},"end":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Latest creation date; default is today. Format YYYY-MM-DD or an ISO 8601 time.","title":"End"},"posted_start":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Earliest posted date. Format YYYY-MM-DD or an ISO 8601 time.","title":"Posted Start"},"posted_end":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Latest posted date. Format YYYY-MM-DD or an ISO 8601 time.","title":"Posted End"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Text to find in the description, note, memo or counterparty name.","title":"Search"},"status":{"anyOf":[{"enum":["pending","sent","cancelled","failed","reversed","blocked"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this status.","title":"Status"},"account_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this account id (UUID).","title":"Account Id"},"card_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this card id.","title":"Card Id"},"mercury_category":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this Mercury category.","title":"Mercury Category"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last transaction of the previous page (UUID); leave empty for the first page.","title":"Start After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"}},"title":"list_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_transaction":{"post":{"operationId":"get_transaction","summary":"Get one transaction by its id with amount, status, kind, counterparty, description, note, category and dates. Use for \"S","description":"Get one transaction by its id with amount, status, kind, counterparty, description, note, category and dates. Use for \"Show the Mercury transaction 11111111-1111-1111-1111-111111111111\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"transaction_id":{"description":"Transaction id (UUID).","maxLength":200,"title":"Transaction Id","type":"string"}},"required":["transaction_id"],"title":"get_transactionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_account_statements":{"post":{"operationId":"list_account_statements","summary":"List the monthly statements of one account with period start and end and ending balance (download links are not returned","description":"List the monthly statements of one account with period start and end and ending balance (download links are not returned). Use for \"What was my Mercury account balance at the end of each month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Account id (UUID) from list_accounts.","maxLength":200,"title":"Account Id","type":"string"},"start":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Earliest statement date. Format YYYY-MM-DD or an ISO 8601 time.","title":"Start"},"end":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Latest statement date. Format YYYY-MM-DD or an ISO 8601 time.","title":"End"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last statement of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"required":["account_id"],"title":"list_account_statementsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_categories":{"post":{"operationId":"list_categories","summary":"List the custom expense categories of the organization. Use for \"What custom expense categories do I have in Mercury\".","description":"List the custom expense categories of the organization. Use for \"What custom expense categories do I have in Mercury\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last category of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_categoriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_credit_accounts":{"post":{"operationId":"list_credit_accounts","summary":"List the credit accounts with current balance, available balance and status. Use for \"How much credit is available on my","description":"List the credit accounts with current balance, available balance and status. Use for \"How much credit is available on my Mercury credit account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_credit_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_treasury_accounts":{"post":{"operationId":"list_treasury_accounts","summary":"List the treasury accounts with current balance, available balance and status. Use for \"What is in my Mercury treasury a","description":"List the treasury accounts with current balance, available balance and status. Use for \"What is in my Mercury treasury account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last treasury account of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_treasury_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_cards":{"post":{"operationId":"list_cards","summary":"List debit and credit cards with nickname, last four digits, type, status, account and card holder id. Use for \"Which Me","description":"List debit and credit cards with nickname, last four digits, type, status, account and card holder id. Use for \"Which Mercury cards are frozen\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only cards of this account id.","title":"Account Id"},"status":{"anyOf":[{"enum":["active","frozen","cancelled","inactive","expired","suspended"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this status.","title":"Status"},"type":{"anyOf":[{"enum":["virtual","physical"],"type":"string"},{"type":"null"}],"default":null,"description":"virtual or physical.","title":"Type"},"kind":{"anyOf":[{"enum":["debit","credit"],"type":"string"},{"type":"null"}],"default":null,"description":"debit or credit.","title":"Kind"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last card of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_cardsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_invoices":{"post":{"operationId":"list_invoices","summary":"List the invoices you issued through Mercury with number, customer id, amount, status, dates and currency. Use for \"Whic","description":"List the invoices you issued through Mercury with number, customer id, amount, status, dates and currency. Use for \"Which of my Mercury invoices are unpaid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order asc or desc (default desc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last invoice of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_invoicesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_invoice_customers":{"post":{"operationId":"list_invoice_customers","summary":"List the customers you invoice through Mercury with id and name. Use for \"Who are my Mercury invoicing customers\".","description":"List the customers you invoice through Mercury with id and name. Use for \"Who are my Mercury invoicing customers\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum results (1 to 1000).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort order asc or desc (default asc).","title":"Order"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last customer of the previous page (UUID); leave empty for the first page.","title":"Start After"}},"title":"list_invoice_customersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_send_money_requests":{"post":{"operationId":"list_send_money_requests","summary":"List pending or past send-money approval requests with amount, status, memo, payment method and scheduled date. Use for ","description":"List pending or past send-money approval requests with amount, status, memo, payment method and scheduled date. Use for \"Are any Mercury payments waiting for approval\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only requests from this account id.","title":"Account Id"},"status":{"anyOf":[{"enum":["pendingApproval","approved","rejected","cancelled"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this status.","title":"Status"},"start_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last request of the previous page (UUID); leave empty for the first page.","title":"Start After"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum results.","title":"Limit"}},"title":"list_send_money_requestsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}