Overview
Server-to-server JSON over HTTPS. Every success response is wrapped in { data, meta }.
What this API does
Read wallet balances and transaction history, register payout destinations, request payouts, and cancel a payout before anyone approves it. Every payout passes compliance checks and a human approval by a person in your organisation before it reaches the network. An API key can only send to destinations your organisation has already verified, and it can never approve its own request.
| Field | Type | Notes |
|---|---|---|
| Base URL | string | Sandbox https://stagingvault.megtrust.com/api/v1 · Production https://vault.megtrust.com/api/v1 (Environments) |
| Auth | Ed25519 | Per-request signature. No bearer token, no shared secret. |
| Amounts | string | Always decimal strings — never parse as float. |
| Envelope | object | { data, meta } on success; { error: { code, message } } on failure. |
In the API a payout is a withdrawal: you request one with POST /api/v1/withdrawals. These docs use
"payout" for the business action and "withdrawal" for the resource.
Getting started
Three steps, in order:
- Generate keys — create your keypair, register the public half.
- Sign a request — build the canonical string and sign it.
- Your first call — a complete working client to copy.
Then follow the guides for what you are building: receive funds, send a payout, and reconcile transactions.
Downloads
These files are public and contain no credentials.
- OpenAPI reference — OpenAPI 3.1, for Postman or a code generator.
- Node.js client — signs every request; standard library only.
- Integration guide — the whole integration in one file.
- API connector for AI agents — a local MCP server that calls the API with your key.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/wallets | Workspace wallets, deposit addresses, balances |
| GET | /api/v1/wallets/{id} | One wallet; foreign or unknown IDs return 404 |
| GET | /api/v1/transactions | On-chain movements, newest first; page with cursor |
| GET | /api/v1/transactions/{id} | One transaction, as its legs |
| GET | /api/v1/counterparties | Destination book; check can_send |
| POST | /api/v1/counterparties | Register a pending destination |
| GET | /api/v1/withdrawals | Recorded payouts; follow meta.next_offset, or look one up by idempotency_key |
| POST | /api/v1/withdrawals | Request a payout; requires Idempotency-Key |
| GET | /api/v1/withdrawals/{id} | Refresh a payout's status and network hash |
| POST | /api/v1/withdrawals/{id}/cancel | Cancel a payout that is still pending approval |
Full request and response schemas are in the API reference.