# MegTrust API - **Get started** - [Overview](/docs): Server-to-server JSON over HTTPS. Every success response is wrapped in { data, meta }. - [Environments](/docs/get-started/environments): A sandbox to build against and production for real funds. Separate keys for each. - [Generate keys](/docs/get-started/generate-keys): You hold the private key. We only ever see the public one. - [Sign a request](/docs/get-started/sign-a-request): Every call carries its own signature. Nothing is reusable. - [Your first call](/docs/get-started/first-call): A complete client. Copy it, set your Key ID, run it. - **Guides** - [Receive funds](/docs/guides/receive-funds): How to show a deposit address safely, and how to know the funds arrived. - [Send a payout](/docs/guides/send-a-payout): Request a withdrawal into your organisation's approval flow, follow it to settlement, and recover it safely after a timeout. - [Cancel a payout](/docs/guides/cancel-a-payout): Withdraw a payout request before anyone approves it. - [Destinations](/docs/guides/destinations): Register the addresses you pay out to. A destination is usable only once can_send is true. - [Reconcile transactions](/docs/guides/reconcile-transactions): Page through every on-chain movement in and out of your wallets, and look up a single transaction. - [Webhooks](/docs/guides/webhooks): Optional — status is always readable from the API, so build on polling first. - [Errors](/docs/guides/errors): Every failure is { error: { code, message } }. Branch on code — messages may be reworded. - [Rate limits](/docs/guides/rate-limits): 120 requests per minute, per key. - [Go-live checklist](/docs/guides/go-live-checklist): What to prove in the sandbox, and the one check to repeat in production. - **AI tools** - [Connect your AI tool to these docs](/docs/ai-tools/docs-mcp): A hosted, read-only MCP server that lets your coding assistant search and read these docs and the OpenAPI document. - [API connector MCP](/docs/ai-tools/api-connector-mcp): Your agent launches a local connector that signs requests with your own API key. - [llms.txt](/docs/ai-tools/llms-txt): Plain-text versions of these docs for language models and scripts. - **API reference** - [API reference](/docs/api-reference): Every endpoint, parameter and schema, generated from the OpenAPI document. - [List workspace wallets](/docs/api-reference/list_wallets): Balances are decimal strings and identify the network. Unreadable balances return an error instead of zero. - [Read one workspace wallet](/docs/api-reference/get_wallet) - [Read recent movements](/docs/api-reference/list_transactions): On-chain movements, newest first, cursor-paged: follow meta.next_cursor until it is null. A page can hold slightly fewer rows than limit (network fees fold into their payout row) or more (a move between two of your own wallets is two rows). Payouts waiting for approval are not listed here; follow them in /api/v1/withdrawals. - [Read one movement](/docs/api-reference/get_transaction): Every leg of one movement, as an array: one for a deposit or payout, two for a move between two of your own wallets (list rows already share the id). 404 transaction_not_found for anything outside your workspace. - [List destinations](/docs/api-reference/list_counterparties) - [Register a pending destination](/docs/api-reference/create_counterparty) - [List recorded withdrawals](/docs/api-reference/list_withdrawals): Scoped to this key's workspace. Follow meta.next_offset (null at the end); new rows may shift offsets, so deduplicate by id. Use the detail endpoint to refresh status. - [Request a withdrawal under organisation policy](/docs/api-reference/request_withdrawal): 202 is accepted for processing, never proof of settlement. One persisted idempotency key per payment, unique within the organisation. Same key and validated body return the original row (200); a conflicting body returns 409. Replays do not reissue failed or received rows. No approval endpoint is exposed. - [Refresh withdrawal status](/docs/api-reference/get_withdrawal): Returns last recorded state with meta.stale=true if a live refresh fails. Final rows use recorded state. Polling never approves or retries a payment. - [Cancel a pending withdrawal](/docs/api-reference/cancel_withdrawal): Withdraws a payout that is still pending_approval. No body and no Idempotency-Key; repeating it is safe and returns the cancelled withdrawal. 409 withdrawal_not_cancellable once an approver has acted or the payout has moved past pending_approval. - [Delivery to your registered HTTPS receiver](/docs/api-reference/clientevent): Verify raw bytes with the endpoint secret: HMAC-SHA256(timestamp + '.' + raw body), ±5 minutes. Durably deduplicate event.id. Deliveries may be delayed, duplicated and out of order; up to eight attempts. Respond within 10 seconds after durably accepting the event. - **Updates** - [Changelog](/docs/changelog): Changes to the MegTrust Client API. Breaking changes ship as a new version path; v1 only grows.