Skip to main content
POST
/
wallet
/
create
Create wallet
curl --request POST \
  --url https://api.onswitch.xyz/wallet/create \
  --header 'Content-Type: application/json' \
  --header 'x-service-key: <api-key>' \
  --data '
{
  "name": "My Wallet",
  "callback_url": "https://your-app.com/webhook"
}
'
{
  "success": true,
  "message": "Wallet created successfully",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "id": "699a6555fd4cab59e6175f79",
    "name": "My Wallet",
    "private_key": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
    "address": {
      "Base": "0x1234567890123456789012345678901234567890",
      "Solana": "..."
    },
    "note": "Do not share your private key. This key grants full control of your account."
  }
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Body

application/json
name
string
required

Display name for the wallet

callback_url
string<uri>

Webhook URL to receive wallet notifications.

Response

Wallet created successfully

success
boolean
required
message
string
required
timestamp
string<date-time>
required
data
object
required