> For the complete documentation index, see [llms.txt](https://stablemesh.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stablemesh.gitbook.io/docs/home/stablemesh-doc/developers/api.md).

# Open API

The Stable Mesh **Open API** lets clients issue and manage cards programmatically. It is a server-to-server REST API authenticated with a single secret **API key** — the same Stripe-style model you already know.

***

## Base URLs

| Environment   | Base URL                                     |
| ------------- | -------------------------------------------- |
| Production    | `https://api.stablemesh.io`                  |
| Sandbox / Dev | `https://api-server-dev-1440.up.railway.app` |

All endpoints below are relative to a base URL and live under the `/v1` prefix, e.g. `https://api.stablemesh.io/v1/card/create`.

***

## How it works

* **One account, one balance.** Your account holds a single **USDT balance**. You top it up by depositing USDT on-chain (see [Wallet & Funding](/docs/home/stablemesh-doc/developers/api/wallet.md)).
* **Cards draw from that balance.** Creating a card or topping one up **deducts from your USDT balance**. The card's spending limit is kept in lock-step with its balance, so a card can never spend more than you funded.
* **Card inventory.** Cards are issued on a Visa BIN. Inventory is provisioned by Stable Mesh ahead of time; `card/create` assigns you a card from that inventory.

***

## Conventions

* Every request is `POST` with a JSON body and a `Content-Type: application/json` header.
* Authentication is the `X-API-KEY` header on every request — see [Authentication](/docs/home/stablemesh-doc/developers/api/authentication.md).
* All monetary amounts are decimal strings/numbers. Card balances are denominated in **USD**; your wallet balance is **USDT**.
* Responses are JSON. Action endpoints return an envelope `{ "code": 0, "message": "ok" }` on success; `code` is non-zero on error (see [Errors](/docs/home/stablemesh-doc/developers/api/errors.md)).

***

## Endpoints at a glance

| Area                                                                     | Endpoint                                       | Purpose                   |
| ------------------------------------------------------------------------ | ---------------------------------------------- | ------------------------- |
| [Wallet](/docs/home/stablemesh-doc/developers/api/wallet.md)             | `POST /v1/wallet/assetList`                    | List your crypto balances |
| [Wallet](/docs/home/stablemesh-doc/developers/api/wallet.md)             | `POST /v1/wallet/getAddress`                   | Get your deposit address  |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/binList`                        | List available card BINs  |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/create`                         | Issue a card              |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/list`                           | List your cards           |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/detail`                         | Card details              |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/asset`                          | Card balance              |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/deposit`                        | Top up a card             |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/sensitiveInfo`                  | Reveal PAN / CVV / expiry |
| [Cards](/docs/home/stablemesh-doc/developers/api/cards.md)               | `POST /v1/card/freeze` · `unfreeze` · `cancel` | Manage card state         |
| [Transactions](/docs/home/stablemesh-doc/developers/api/transactions.md) | `POST /v1/bill/list`                           | List card transactions    |

{% hint style="info" %}
Need credentials? API keys are issued by the Stable Mesh team during onboarding. Contact your account manager to provision an account and your first key.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stablemesh.gitbook.io/docs/home/stablemesh-doc/developers/api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
