---
title: "Export your wallet's private key for self-custody — import to MetaMask/Rabby"
method: POST
path: "/api/wallet/export"
tags: ["wallet"]
---

# Export your wallet's private key for self-custody — import to MetaMask/Rabby

`POST /api/wallet/export`

## Request

- Base URL: `https://x711.io`
- URL: `https://x711.io/api/wallet/export`
- Auth: API key in header `X-API-Key`

Returns the raw private key for your custodial wallet. Store it securely. x711 cannot recover it after export. The wallet continues to work normally — export does not delete or disable it.

## Response `200`

Private key returned

- object
  - `private_key` string: Raw hex private key (0x...)
  - `wallet_address` string
  - `chain_id` integer
  - `warning` string
  - `self_custody_instructions` object

## Other responses

- `401`: Missing or invalid API key
- `404`: No wallet provisioned — call GET /api/wallet first

---

[API](https://skmtc.dev/x711/apis/x711-universal-agent-gas-station-api.md) · [All operations](https://skmtc.dev/x711/apis/x711-universal-agent-gas-station-api/llms.txt) · [OpenAPI document](https://skmtc.dev/x711/apis/x711-universal-agent-gas-station-api/revisions/8ed6c60350a6?raw)
