Everything an AI agent can do with the Mercury API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints29
API versionv1
Last updated23 June 2026
Orientation

How the Mercury API works.

The Mercury API is how an app or AI agent works with a Mercury banking account: reading account balances and transaction history, managing recipients, sending money to a saved recipient, and issuing or freezing cards. Access is granted through an API token, and a token is created at a read-only or a read-and-write level, with write-capable tokens required to be locked to a set of approved IP addresses. Mercury serves a single versioned API and can push an event to a registered endpoint when something changes.

29Endpoints
8Capability groups
17Read
12Write
2Permissions
Authentication
Mercury authenticates a call with an API token created in the dashboard under Settings then Tokens. The token is sent as a Bearer token in the Authorization header, or as the username in HTTP Basic auth with an empty password. A separate OAuth 2.0 flow lets a third-party integration connect on a user's behalf.
Permissions
A token is created as Read Only, Read and Write, or Custom. A Read Only token cannot move money or change data; a Read and Write token can send money and manage recipients and must be restricted to approved IP addresses. A Custom token grants only the scopes it is given, and any write scope also requires the IP restriction.
Versioning
Mercury serves a single API under the v1 path and does not mint a new version string for additive changes. New endpoints and fields, like the Cards, Categories, and webhook events, ship through the dated changelog, so an integration tracks the changelog rather than pinning a dated version.
Data model
Mercury is resource-oriented: accounts hold transactions, recipients hold the payee details a payment is sent to, and treasury and credit accounts sit alongside checking and savings. A list is cursor-paginated, a write returning money uses an idempotency key, and a state change can emit an event delivered to a webhook.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Mercury determines what it can reach. There is a route for making calls with an API token, a route for receiving events, and a hosted server that exposes Mercury tools to agents, and each is governed by the token behind it and the read or write level that token carries.

Ways to connect

REST API

The REST API takes JSON request bodies, returns JSON, and pages through lists with a cursor, under https://api.mercury.com/api/v1. A call authenticates with an API token, sent as a Bearer token or as the HTTP Basic auth username with an empty password. The token's read-only or read-and-write level sets what the call can do.

Best forConnecting an app or AI agent to Mercury.
Governed byThe API token and its read or write level.
Docs ↗

MCP server

A first-party hosted Model Context Protocol server at https://mcp.mercury.com/mcp exposes Mercury data to AI clients like Claude and ChatGPT as a custom connector. It authenticates with OAuth 2.0, supporting Dynamic Client Registration, and is scoped to read-only access, covering tools like getAccount, getAccounts, getTransaction, listTransactions, getRecipients, getTreasury, and getOrganization. Mercury does not offer a self-hosted MCP.

Best forConnecting an AI agent to Mercury for read-only analysis through MCP.
Governed byThe OAuth grant, scoped to read-only.
Docs ↗

Webhooks

Mercury POSTs an event to an HTTPS endpoint registered through the API when something changes, like a transaction being created or updated or an account balance changing. The webhook carries a signing secret, returned only at creation, that the receiver uses to verify the event came from Mercury. Failed deliveries are retried with exponential backoff, and filters can narrow which events are sent.

Best forReceiving Mercury account events at an app or AI agent.
Governed byThe signing secret on the webhook.
Docs ↗

OAuth 2.0

A third-party integration can connect to a Mercury account on a user's behalf through an OAuth 2.0 authorization-code flow, starting at the authorize endpoint and exchanging the code for an access token at the token endpoint. This is the route for apps that act for many Mercury users rather than holding one organization's static token.

Best forThird-party apps connecting on behalf of Mercury users.
Governed byThe OAuth grant and the access token it produces.
Docs ↗
Authentication

Read Only token

A Read Only token can fetch accounts, transactions, recipients, cards, treasury, and statements, but cannot move money or change data. It does not require IP whitelisting. It is sent as a Bearer token or as the HTTP Basic auth username with an empty password.

TokenAPI token (secret-token:...)
Best forReporting and analysis that never changes data.
Docs ↗

Read and Write token

A Read and Write token can do everything a Read Only token can, plus send money and manage recipients without separate admin approval. Mercury requires it to be restricted to approved IP addresses or ranges, so a request from an unapproved address is rejected.

TokenAPI token (secret-token:...), IP-restricted
Best forAutomations that move money or manage payees from a fixed set of IPs.
Docs ↗

Custom token

A Custom token grants only the scopes selected when it is created, so it carries the fewest permissions a task needs. Scopes cannot be edited after creation. Any write scope on a Custom token also requires the IP restriction; a write-free Custom token does not.

TokenAPI token (secret-token:...), scoped
Best forLeast-privilege access limited to specific scopes.
Docs ↗

OAuth 2.0

OAuth 2.0 lets a third-party integration connect on a Mercury user's behalf, rather than using one organization's static token. The flow starts at the authorize endpoint and exchanges a code for an access token at the token endpoint.

TokenOAuth access token
Best forApps connecting to many Mercury users.
Docs ↗
Capability map

What an AI agent can do in Mercury.

The Mercury API is split into areas an agent can act on, like accounts, transactions, recipients, sending money, cards, and treasury. Each area has its own methods, and writes in some areas move real money or issue spending cards.

Endpoint reference

Every Mercury API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Accounts

Methods for reading accounts, their balances, cards, transactions, and statements.4

Reachable by a Read Only token; exposes account balances.

Acts onaccount
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onaccount
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncard
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only; supports date, status, and category filters.

Acts ontransaction
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Transactions

Methods for reading transactions and editing their notes, categories, and attachments.4

Read-only; cursor-paginated with filters.

Acts ontransaction
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts ontransaction
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes metadata only; does not move money. Needs a write-capable token.

Acts ontransaction
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Needs a write-capable token.

Acts onattachment
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Send money

Methods for sending money to a recipient and moving funds between accounts.2

Moves real money; needs a write-capable, IP-restricted token, a recipientId, amount, paymentMethod, and idempotencyKey. A domesticWire also needs a purpose. May require approval depending on account controls.

Acts ontransaction
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventtransaction.created
Rate limitStandard limits apply

Moves money between owned accounts; needs a write-capable token.

Acts oninternal_transfer
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventtransaction.created
Rate limitStandard limits apply

Recipients

Methods for creating and reading the payees a payment can be sent to.4

Adds a payee; needs a write-capable token.

Acts onrecipient
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onrecipient
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onrecipient
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes a payee's details; needs a write-capable token.

Acts onrecipient
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Cards

Methods for issuing, reading, freezing, and cancelling cards.7

Issues a real spending card; needs userId, type, kind, and a write-capable token.

Acts oncard
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncard
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncard
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes card limits or label; needs a write-capable token.

Acts oncard
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Pauses a card; the card must be active. Needs a write-capable token.

Acts oncard
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Reactivates a frozen card; needs a write-capable token.

Acts oncard
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Permanently cancels a card; needs a write-capable token.

Acts oncard
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Treasury & credit

Methods for reading treasury accounts, their transactions and statements, and credit accounts.3

Read-only.

Acts ontreasury_account
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts ontransaction
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncredit_account
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Statements

Methods for reading account statements and downloading them as PDF.2

Read-only.

Acts onstatement
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onstatement
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Events & webhooks

Methods for reading events and registering webhooks to receive them.3

Read-only.

Acts onevent
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Registers where events are delivered; the signing secret is returned only on creation. Needs a write-capable token.

Acts onwebhook
Permission (capability)Read and Write
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onwebhook
Permission (capability)Read Only
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Mercury can notify an app when something happens in an account, like a transaction posting or a balance changing. It POSTs an event to a registered endpoint, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
transaction.createdA new transaction was created in an account, like an outbound payment being initiated./api/v1/account/:id/transactions
/api/v1/internal-transfers
transaction.updatedAn existing transaction changed, like its status moving from pending to posted.In-app only
checkingAccount.balance.updatedThe balance of a checking account changed.In-app only
savingsAccount.balance.updatedThe balance of a savings account changed.In-app only
treasuryAccount.balance.updatedThe balance of a treasury account changed.In-app only
creditAccount.balance.updatedThe balance of a credit account changed.In-app only
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Mercury pages through lists with a cursor and meters how fast an app can call. It does not publish a fixed per-method request ceiling, so an integration should handle a rate-limit response and back off.

Request rate

Mercury does not publish a fixed numeric request ceiling per method in its developer docs. It meters request volume and an integration should treat a rate-limit response as a signal to slow down, retrying with exponential backoff. Write-capable tokens are further constrained by IP restriction rather than by a documented per-method quota, so a request from an unapproved address is rejected regardless of rate.

Pagination

List endpoints are cursor-paginated. A response carries pagination cursors, like a next-page and previous-page cursor, that an integration follows to walk through results. Transaction and account lists also accept filters such as date ranges and status to narrow what is returned before paging.

Request size

Amounts on a send-money request are in US dollars with a minimum of 0.01. A webhook signing secret is returned only once, at creation, and cannot be retrieved later. Attachments can be uploaded to transactions and recipients, and statements and invoices can be downloaded as PDF.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
401unauthorizedNo valid API token was provided, or the token has been deleted or downgraded below what the request needs.Send a valid token in the Authorization header, and confirm it still holds the required read or write level.
403forbiddenThe token is valid but lacks permission for the request, for example a Read Only token attempting a write, or a write token calling from an IP address outside the approved list.Use a token with the needed write level, and call from an approved IP address.
404not_foundThe requested object does not exist or is not visible to this token's organization.Verify the id and confirm it belongs to an account the token can see.
429too_many_requestsRequests arrived faster than Mercury allows.Back off and retry with exponential backoff, and smooth the request rate.
Versioning & freshness

Version history.

Mercury serves a single versioned API and ships dated changes through its changelog rather than minting a new version string for additive features.

Version history

What changed, and when

Latest versionv1
v1Current version
Mercury API v1 (current)

Mercury serves a single versioned API under the v1 path and ships additive changes through its changelog rather than minting a new version string. The entries below are notable dated additions; relative dates are approximate to the month, taken from the public changelog.

What changed
  • Cards API: issue and manage virtual debit and credit cards via the API.
  • Categories API: create, edit, and delete expense categories.
  • Send Money API: checks and domestic wires added as payment methods.
  • Treasury statements, SAFE data endpoints, attachment uploads, and webhooks all added over the prior months.
2026-06
Cards API

Mercury added an API to issue and manage cards, covering virtual debit and credit cards, spending limits, and lifecycle actions like freeze, unfreeze, and cancel.

What changed
  • Create, read, update, freeze, unfreeze, and cancel cards via the API.
2026-05
Categories API

The categories endpoints were expanded to create, edit, and delete expense categories programmatically.

What changed
  • Programmatic create, edit, and delete of expense categories.
2026-02
Send Money payment methods and Treasury statements

The Send Money API gained checks and domestic wires as payment methods, treasury statement retrieval was added, and a Mercury node launched for the n8n automation platform.

What changed
  • Send Money API supports checks and domestic wires.
  • Treasury statements retrievable via the API.
  • Community n8n node for Mercury.
2026-01
SAFE data, balance events, and attachment uploads

Three SAFE data endpoints were added, webhooks and events gained account-balance notifications, and attachment uploads to transactions and recipients became available.

What changed
  • SAFE data endpoints.
  • Account-balance change events and webhooks.
  • Attachment uploads on transactions and recipients.
2025-12
Webhooks and recipient attachments

Webhooks were introduced so an integration can receive real-time notifications instead of polling, and recipient endpoints began returning associated attachments.

What changed
  • Webhooks for real-time account notifications.
  • Recipient endpoints return associated attachments with pre-signed URLs.

Build against v1 and track the changelog for additive changes.

Mercury API changelog ↗
Questions

Mercury API, answered.

How does a Mercury API token authenticate a request?+
A token is created in the Mercury dashboard under Settings then Tokens. It is sent on each request as a Bearer token in the Authorization header (Authorization: Bearer secret-token:...), or as the username in HTTP Basic auth with an empty password. The token belongs to the organization that created it and reaches the accounts that organization can see.
What is the difference between a Read Only and a Read and Write token?+
A Read Only token can fetch accounts, transactions, recipients, and statements, but cannot move money or change data. A Read and Write token can also send money and manage recipients without separate admin approval, and Mercury requires it to be locked to approved IP addresses. A Custom token grants only the scopes selected at creation, and any write scope carries the same IP requirement.
Why does Mercury require IP whitelisting on write tokens?+
A Read and Write or write-scoped Custom token can initiate transfers, so Mercury requires it to be restricted to a set of approved IP addresses or ranges. A request that carries a valid write token but comes from an address outside the allowed list is rejected. Read Only and write-free Custom tokens do not need the restriction.
How does an agent send money through the API?+
An agent calls the send-money endpoint on an account with the id of a recipient that already exists in Mercury, an amount, a payment method (ach, check, or domesticWire), and an idempotency key. A domestic wire also requires a purpose. The transfer processes immediately or, depending on the account's controls, can require approval before it is sent.
Does Mercury automatically reduce or delete unused tokens?+
Yes. A token holding higher permissions than it has used within a 45-day window is automatically downgraded to the level it actually uses, and a token not used at all within any 45-day period is deleted. Admins are notified seven days before either change, and using the token resets the window.
Does Mercury offer a hosted MCP server for AI agents?+
Yes. Mercury hosts a Model Context Protocol server at https://mcp.mercury.com/mcp that an AI client like Claude or ChatGPT can connect to as a custom connector. It authenticates with OAuth 2.0, supporting Dynamic Client Registration, and is scoped to read-only access, so an agent can analyze account data through it but cannot move money. Mercury does not offer a self-hosted MCP.
Related

More finance API guides for agents

What is Bollard AI?

Control what every AI agent can do in Mercury.

Bollard AI sits between a team's AI agents and Mercury. Grant each agent exactly the access it needs, read or write, area by area, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Mercury token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Mercury
Finance Agent
View accounts & balances ResourceOffReadFull use
Send money to recipient ActionOffReadFull use
Transactions ResourceOffReadFull use
Recipients ResourceOffReadFull use
Freeze a card ActionOffReadFull use
Per-agent access, set in Bollard AI, not in Mercury