POST
/
v1
/
user_with_recovery
curl --request POST \
  --url https://api.privy.io/v1/user_with_recovery \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "signer": {
    "subject_id": "clgmdmpce0004ic08tl6qy4i9"
  },
  "linked_accounts": [{
    "type": "email",
    "address": "[email protected]"
  }],
  "wallet": {
    "chain_type": "ethereum"
  }
}'
{
  "user_id": "clgmdmpce0004ic08tl6qy4i9",
  "wallet_id": "clwjfdaxn0001ciy7xko7204e"
}

This feature is currently in development and will be available in an upcoming release.

This endpoint creates a user, with an associated wallet and authentication accounts. After creation, you can make a request to authenticate with a valid user JWT to obtain a one-time user authorization key to use to take actions on the user’s wallet.

curl --request POST \
  --url https://api.privy.io/v1/user_with_recovery \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "signer": {
    "subject_id": "clgmdmpce0004ic08tl6qy4i9"
  },
  "linked_accounts": [{
    "type": "email",
    "address": "[email protected]"
  }],
  "wallet": {
    "chain_type": "ethereum"
  }
}'
{
  "user_id": "clgmdmpce0004ic08tl6qy4i9",
  "wallet_id": "clwjfdaxn0001ciy7xko7204e"
}

Authorization

Supply app secret authorization headers.

Body

signer
{subject_id: string}
required

The JWT subject ID of the user.

linked_accounts
{type: 'email', address: string}[]
required

The email address of the user.

wallet
{chain_type: 'ethereum' | 'solana', policy_ids: string[]}
required

The configuration for the wallet to create.

Response

user_id
string
required

The ID of the user created.

wallet_id
string
required

The ID of the wallet associated with the user.