> ## Documentation Index
> Fetch the complete documentation index at: https://support.configview.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mercury setup

ConfigView reads your Mercury (business banking) organization through the Mercury **API** (`https://api.mercury.com/api/v1`), using a **Read Only API token** that a Mercury admin creates. ConfigView sends only `GET` requests. It never moves money, issues cards or changes anything in Mercury.

You will end up with **1 secret** (`MERCURY_API_TOKEN`) in ConfigView when setup is complete.

> **Scope of this integration today.** ConfigView reads who has a Mercury login and their organization role, every card with its owner and status (virtual or physical, debit or credit, agent and single-use flags, whether a spend limit is set), the accounts (name, type, status), the organization (name, plan, billing cadence) and the webhook endpoints (target host, status, event types). It does **not** read balances, transactions, statements, payees, account or routing numbers, card numbers, expiry dates, names on cards, spend-limit amounts or your EIN.

***

## What you need

* A Mercury user who is allowed to create API tokens (**Settings > Tokens**)

***

## Step 1: Open the Mercury page in ConfigView

Open ConfigView in a second browser tab and leave it open:

`https://{companyname}.configview.com/admin/integrations/mercury`

***

## Step 2: Create a Read Only token

1. In Mercury open **Settings > Tokens** and create a new token
2. Choose the type **Read Only**. Read Only tokens do not need an IP whitelist, and ConfigView never writes, so do not choose Read and Write. (A Custom token with read scopes also works; scopes cannot be edited later.)
3. Copy the whole token, **including the `secret-token:` prefix**. Mercury shows it once.
4. In the ConfigView tab paste it into `MERCURY_API_TOKEN` under **Credentials** and save

***

## Step 3: Connect and verify

1. Click **Connect**. ConfigView creates its tables and schedules every collector at your default run time:

| Script | Notes |
| - | - |
| **Users** | Everyone with a Mercury login, with their organization role. |
| **Cards** | Every card with its owner, status and type. Counts and flags only, no numbers or amounts. |
| **Accounts** | Account name, nickname, type, kind and status. No balances or numbers. |
| **Organization** | The organization's name, plan and billing cadence. |
| **Webhooks** | Webhook endpoints: host, status and event types. |

2. Click **Verify now**. The health check reads the secret and makes one small call to the organization endpoint, then probes users, cards and webhooks.

If a check fails:

* **401 from the organization call.** The token is wrong, is missing the `secret-token:` prefix, or Mercury deleted it after 45 unused days. Create a new one.
* **A probe shows as skipped.** The token's type or scopes do not cover that area. Nothing to fix unless you want it.

***

## Data Tables

Each table has a `run_at` column and keeps only the newest run.

| Table | Source | Key Columns |
| - | - | - |
| `mercury_users` | `GET /users` | user\_id, email, first\_name, last\_name, organization\_role |
| `mercury_cards` | `GET /cards` | card\_id, account\_id, user\_id, status, card\_type, card\_kind, is\_agent\_card, is\_single\_use, has\_spend\_limit, spend\_limit\_interval, budget\_count |
| `mercury_accounts` | `GET /accounts` | account\_id, name, nickname, account\_type, account\_kind, status |
| `mercury_organization` | `GET /organization` | organization\_id, organization\_kind, legal\_business\_name, subscription\_tier, billing\_cadence |
| `mercury_webhooks` | `GET /webhooks` | webhook\_id, url\_host, status, event\_types, filter\_path\_count |

***

## Things worth knowing

**Leavers.** The users list has no status field, so a removed person simply disappears from it. A card whose owner is no longer in the list is flagged by the catalog: check whether it should be cancelled.

**Roles.** Mercury roles are `administrator`, `bookkeeper`, `customUser`, `cardOnlyUser` and `employee`. There is no last-sign-in date in the API.

**Spend limits.** ConfigView stores only whether a card has a limit and how it resets, never the amount.

**Rate limit.** Mercury publishes no numeric limit. ConfigView paces itself at 60 requests a minute, waits as long as Mercury asks on HTTP 429, and reads lists 500 per page.

**Token lifetime.** Mercury deletes tokens unused for 45 days. The daily collectors count as use, so a connected ConfigView keeps the token alive.

## What isn't collected

* Transactions, statements, transfers, auto-transfer rules and payees (accounts of type `recipient` are skipped)
* Balances, account numbers and routing numbers
* Card numbers, last four digits, expiry, names on cards, spend-limit and budget amounts, merchant lock names
* EIN and DBA names
* Webhook signing secrets and full webhook URLs (host only)
* The events feed (it carries financial changes)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.