API reference
Wallets
Account funding
Transactions
Users
Add custom metadata
Adds custom metadata to a user by user ID.
POST
/
v1
/
users
/
{user_id}
/
custom_metadata
Copy
Ask AI
curl --request POST \
--url https://api.privy.io/v1/users/{user_id}/custom_metadata \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"custom_metadata": {
"key": "value"
}
}'
Copy
Ask AI
{
"id": "did:privy:cm3np4u9j001rc8b73seqmqqk",
"created_at": 1731974895,
"linked_accounts": [
{
"address": "[email protected]",
"type": "email",
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"verified_at": 1674788927
},
{
"type": "farcaster",
"fid": 4423,
"owner_address": "0xE6bFb4137F3A8C069F98cc775f324A84FE45FdFF",
"username": "payton",
"display_name": "payton ↑",
"bio": "engineering at /privy. building pixelpool.xyz, the first Farcaster video client. nyc. 👨💻🍎🏳️🌈 nf.td/payton",
"profile_picture": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
"profile_picture_url": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
"verified_at": 1740678402,
"first_verified_at": 1740678402,
"latest_verified_at": 1741194370
},
{
"type": "passkey",
"credential_id": "Il5vP-3Tm3hNmDVBmDlREgXzIOJnZEaiVnT-XMliXe-BufP9GL1-d3qhozk9IkZwQ_",
"authenticator_name": "1Password",
"created_with_browser": "Chrome",
"created_with_os": "Mac OS",
"created_with_device": "Macintosh",
"enrolled_in_mfa": true,
"verified_at": 1741194420,
"first_verified_at": 1741194420,
"latest_verified_at": 1741194420
}
],
"mfa_methods": [
{
"type": "passkey",
"verified_at": 1741194420
}
],
"has_accepted_terms": true,
"is_guest": false
}
Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Path Parameters
ID of the user.
Body
application/json
Response
200 - application/json
User with updated custom metadata.
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://api.privy.io/v1/users/{user_id}/custom_metadata \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"custom_metadata": {
"key": "value"
}
}'
Copy
Ask AI
{
"id": "did:privy:cm3np4u9j001rc8b73seqmqqk",
"created_at": 1731974895,
"linked_accounts": [
{
"address": "[email protected]",
"type": "email",
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"verified_at": 1674788927
},
{
"type": "farcaster",
"fid": 4423,
"owner_address": "0xE6bFb4137F3A8C069F98cc775f324A84FE45FdFF",
"username": "payton",
"display_name": "payton ↑",
"bio": "engineering at /privy. building pixelpool.xyz, the first Farcaster video client. nyc. 👨💻🍎🏳️🌈 nf.td/payton",
"profile_picture": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
"profile_picture_url": "https://supercast.mypinata.cloud/ipfs/QmNexfCxdnFzWdJqKVgrjd27UGLMexNaw5FXu1XKR3cQF7?filename=IMG_2799.png",
"verified_at": 1740678402,
"first_verified_at": 1740678402,
"latest_verified_at": 1741194370
},
{
"type": "passkey",
"credential_id": "Il5vP-3Tm3hNmDVBmDlREgXzIOJnZEaiVnT-XMliXe-BufP9GL1-d3qhozk9IkZwQ_",
"authenticator_name": "1Password",
"created_with_browser": "Chrome",
"created_with_os": "Mac OS",
"created_with_device": "Macintosh",
"enrolled_in_mfa": true,
"verified_at": 1741194420,
"first_verified_at": 1741194420,
"latest_verified_at": 1741194420
}
],
"mfa_methods": [
{
"type": "passkey",
"verified_at": 1741194420
}
],
"has_accepted_terms": true,
"is_guest": false
}
Assistant
Responses are generated using AI and may contain mistakes.