Skip to main content
POST
/
v1
/
custodial_wallets
Create custodial wallet
curl --request POST \
  --url https://api.privy.io/v1/custodial_wallets \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '
{
  "chain_type": "ethereum",
  "provider": "bridge",
  "provider_user_id": "1234567890"
}
'
HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/custodial_wallets")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"chain_type\": \"ethereum\",\n \"provider\": \"bridge\",\n \"provider_user_id\": \"1234567890\"\n}")
.asString();
const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({chain_type: 'ethereum', provider: 'bridge', provider_user_id: '1234567890'})
};

fetch('https://api.privy.io/v1/custodial_wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.io/v1/custodial_wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chain_type' => 'ethereum',
'provider' => 'bridge',
'provider_user_id' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.privy.io/v1/custodial_wallets"

payload := strings.NewReader("{\n \"chain_type\": \"ethereum\",\n \"provider\": \"bridge\",\n \"provider_user_id\": \"1234567890\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "id": "id2tptkqrxd39qo9j423etij",
  "address": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2",
  "chain_type": "ethereum",
  "custody": {
    "provider": "bridge",
    "provider_user_id": "1234567890"
  },
  "policy_ids": [],
  "additional_signers": [],
  "owner_id": null
}

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

privy-idempotency-key
string

Idempotency keys ensure API requests are executed only once within a 24-hour window.

Body

application/json

The input for creating a custodial wallet.

chain_type
enum<string>
required

The chain type of the custodial wallet.

Available options:
ethereum,
solana
provider_user_id
string
required

The resource ID of the beneficiary of the custodial wallet, given by the licensing provider.

Minimum string length: 1
provider
enum<string>
required

The provider of the custodial wallet.

Available options:
bridge
owner
OwnerInputUser · object

Owner input specifying a Privy user ID.

additional_signers
AdditionalSignerItemInput · object[]

Additional signers for the wallet.

policy_ids
string<cuid2>[]

An optional list of up to one policy ID to enforce on the wallet.

Maximum array length: 1
Required string length: 24

Response

200 - application/json

Newly created custodial wallet.

Information about a custodial wallet.

id
string
required
address
string
required
chain_type
enum<string>
required

The chain type of the custodial wallet.

Available options:
ethereum,
solana
custody
WalletCustodian · object
required

Information about the custodian managing this wallet.

owner_id
string<cuid2> | null
required

A unique identifier for a key quorum.

policy_ids
string[]
Required string length: 24
additional_signers
WalletAdditionalSignerItem · object[]

Additional signers for the wallet.