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
}Create custodial wallets
Create a new wallet custodied by a third-party provider.
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
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Idempotency keys ensure API requests are executed only once within a 24-hour window.
Body
The input for creating a custodial wallet.
The chain type of the custodial wallet.
ethereum, solana The resource ID of the beneficiary of the custodial wallet, given by the licensing provider.
1The provider of the custodial wallet.
bridge Owner input specifying a Privy user ID.
- OwnerInputUser
- OwnerInputPublicKey
Show child attributes
Show child attributes
Additional signers for the wallet.
Show child attributes
Show child attributes
An optional list of up to one policy ID to enforce on the wallet.
124Response
Newly created custodial wallet.
Information about a custodial wallet.
The chain type of the custodial wallet.
ethereum, solana Information about the custodian managing this wallet.
Show child attributes
Show child attributes
A unique identifier for a key quorum.
24Additional signers for the wallet.
Show child attributes
Show child attributes
Was this page helpful?

