> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mercury.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mercury.ferndocs.com/_mcp/server.

# Get account by ID

GET https://api.mercury.com/api/v1/account/{accountId}

Retrieve details of a specific Mercury account by ID, including balances and routing information.

Reference: https://mercury.ferndocs.com/api-reference/accounts/get

## Authentication

- `Authorization` header (bearer token, required) — Bearer token authentication for Mercury API. Use your API token in the Authorization header: `Authorization: Bearer TOKEN` Example: `Authorization: Bearer secret-token:mercury_production_wma_24SCp4G81X3yHL4Wq8FgzuaP9ye3VKf2mgTDctXyRg5HY_yrucrem` Your Mercury API token should include the 'secret-token:' prefix. Tokens can be generated from your Mercury dashboard settings.

## Servers

- `https://api.mercury.com/api/v1` (Production, default)
- `https://api-sandbox.mercury.com/api/v1` (Sandbox)

## Request

### Path parameters

- `accountId` (string, required)

## Response

### 200

- `accountNumber` (string, required) — The bank account number.
- `availableBalance` (double, required) — Available balance in USD.
- `createdAt` (string, required) — Timestamp when the account was created.
- `currentBalance` (double, required) — Current balance in USD, including pending transactions.
- `dashboardLink` (string, required) — URL to view this account in the Mercury dashboard.
- `id` (string, required) — Unique identifier for the Mercury account.
- `kind` (string, required) — Account classification (e.g., checking, savings).
- `legalBusinessName` (string, required) — Legal business name associated with this account.
- `name` (string, required) — Account display name in the Mercury dashboard.
- `routingNumber` (string, required) — The routing number for ACH and wire transfers.
- `status` (enum, required) — Account lifecycle status (active, pending, deleted, archived).
  - Allowed values: `active`, `deleted`, `pending`, `archived`
- `type` (enum, required) — The product type of the account.
  - Allowed values: `mercury`, `external`, `recipient`
- `canReceiveTransactions` (boolean, optional, nullable) — Whether this account can receive incoming transactions.
- `nickname` (string, optional, nullable) — User-defined nickname for the account.

## Errors

### 404 Not Found Error

`accountId` not found

- `any`

## Examples

**Response**

```json
{
  "accountNumber": "string",
  "availableBalance": 1.1,
  "createdAt": {},
  "currentBalance": 1.1,
  "dashboardLink": "string",
  "id": "string",
  "kind": "string",
  "legalBusinessName": "string",
  "name": "string",
  "routingNumber": "string",
  "status": "active",
  "type": "mercury",
  "canReceiveTransactions": true,
  "nickname": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.mercury.com/api/v1/account/accountId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.mercury.com/api/v1/account/accountId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mercury.com/api/v1/account/accountId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.mercury.com/api/v1/account/accountId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.mercury.com/api/v1/account/accountId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.mercury.com/api/v1/account/accountId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.mercury.com/api/v1/account/accountId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercury.com/api/v1/account/accountId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```