POST
/
v1
/
users
curl --request POST \
  --url https://api.privy.io/v1/users \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "linked_accounts": [
    {
      "address": "[email protected]",
      "type": "email"
    }
  ]
}'
{
  "id": "did:privy:clddy332f002tyqpq3b3lv327",
  "created_at": 1674788927,
  "mfa_methods": [],
  "has_accepted_terms": false,
  "is_guest": false,
  "linked_accounts": [
    {
      "address": "[email protected]",
      "type": "email",
      "first_verified_at": 1674788927,
      "latest_verified_at": 1674788927,
      "verified_at": 1674788927
    }
  ]
}

Authorizations

Authorization
string
header
required

App secret authentication

Headers

privy-app-id
string
required

ID of your Privy app

Body

application/json
linked_accounts
object[]
required
create_n_ethereum_wallets
number

Number of Ethereum embedded wallets to pregenerate. Cannot be used with create_ethereum_wallet.

Required range: 1 <= x <= 10
create_ethereum_wallet
boolean

Create an Ethereum embedded wallet. Cannot be used with create_n_ethereum_wallets.

create_solana_wallet
boolean

Create a Solana embedded wallet.

create_ethereum_smart_wallet
boolean

Create a smart wallet. Requires create_ethereum_wallet to also be true.

custom_metadata
object

Custom metadata associated with the user.

Response

200 - application/json
Newly created user object.
id
string
required
linked_accounts
object[]
required
mfa_methods
object[]
required
created_at
number
required

Unix timestamp of when the user was created in milliseconds.

has_accepted_terms
boolean
required

Indicates if the user has accepted the terms of service.

is_guest
boolean
required

Indicates if the user is a guest account user.

custom_metadata
object

Custom metadata associated with the user.

Was this page helpful?