Creates a new user for the specified environment.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/environments/{environmentId}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias": "An example name",
"firstName": "An example name",
"lastName": "An example name",
"jobTitle": "An example name",
"phoneNumber": "An example name",
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"tShirtSize": "An example name",
"team": "An example name",
"policiesConsent": true,
"country": "US",
"username": "johndoe",
"btcWallet": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
"kdaWallet": "k:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
"ltcWallet": "LUttH43tQ4x4qniCKr1Rqo8ESeXFPdv9ax",
"ckbWallet": "ckt1q9876543210abcdefghijklmnopqrstuvwxyz",
"kasWallet": "kaspa:qrelgny7sr3vahq69yykxx36m65gvmhryxrlwngfzgu8xkdslum2yxjp3ap8m",
"dogeWallet": "DPcy35vmuk8GXcfu1vgFFEeij3BuYYJQKB",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"emailVerifiedAt": "2023-11-07T05:31:56Z",
"email": "hello-world@foobar.com",
"wallets": [
{
"publicWalletAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "ETH",
"walletName": "An example name",
"walletProvider": "browserExtension",
"additionalWalletAddresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>"
}
]
}
],
"oauthAccounts": [
{
"provider": "emailOnly",
"accountId": "An example name",
"emails": [
"hello-world@foobar.com"
],
"displayName": "An example name",
"username": "An example name",
"photos": [
"<string>"
],
"profile": {}
}
]
}
'{
"user": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
],
"walletPublicKey": "<string>",
"wallet": "<string>",
"chain": "ETH",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"sessions": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userAgent": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
],
"wallets": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"name": "An example name",
"chain": "ETH",
"publicKey": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"provider": "browserExtension",
"properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"lastSelectedAt": "<string>"
}
],
"chainalysisChecks": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"result": "OK",
"walletPublicKey": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"response": "<string>"
}
],
"oauthAccounts": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"provider": "emailOnly",
"accountUsername": "<string>"
}
],
"mfaDevices": [
{
"type": "totp",
"verified": true,
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z",
"default": true,
"alias": "<string>"
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the environment
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
User new fields data
User fields that can be updated on dashboard or through the rest API which do not involve any uniqueness checks or further verification
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Free-form JSON object for storing custom user attributes and KYC data (max 512 KB)
pending, complete 255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
255^$|^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Whether the user has accepted the required terms of service and privacy policies
Standard ISO 3166-1 alpha-2 two-letter country code
255^[A-Z]{2}$"US"
Alphanumeric with slugs and underscores username
255^$|^[\p{L}\p{N}_-]{3,20}$"johndoe"
BTC wallet address
^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,59}$"3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5"
KDA wallet address
^k:[0-9a-fA-F]{64}$"k:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
LTC wallet address
^[LM3][a-km-zA-HJ-NP-Z1-9]{26,53}$"LUttH43tQ4x4qniCKr1Rqo8ESeXFPdv9ax"
CKB wallet address
^(ckb1q|ckt1q)[0-9a-z]{25,111}$"ckt1q9876543210abcdefghijklmnopqrstuvwxyz"
KAS wallet address
^kaspa:[1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]{56,}$"kaspa:qrelgny7sr3vahq69yykxx36m65gvmhryxrlwngfzgu8xkdslum2yxjp3ap8m"
DOGE wallet address
^D[a-zA-Z0-9_.-]{33}$"DPcy35vmuk8GXcfu1vgFFEeij3BuYYJQKB"
Enable or disable email notifications for this user
Enable or disable Discord notifications for this user
Enable or disable newsletter subscription emails for this user
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
When provided, the user email will be marked as verified in our system and the user will be allowed to sign in with that email. When social is enabled and the social provider has a verified email, we will automatically associate that social with the existing user.
If email is trusted and verified, please provide a emailVerifiedAt timestamp. This will ensure that a user signing in with this email can access the correctly-created user account.
255^$|(^([!#-'*+\/-9=?A-Z^-~-]+(\.[!#-'*+\/-9=?A-Z^-~-]+)*|"([]!#-[^-~ \t]|([\t -~]))+")@([!#-'*+\/-9=?A-Z^-~-]+(\.[!#-'*+\/-9=?A-Z^-~-]+)*|[\t -Z^-~]*)$)"hello-world@foobar.com"
List of wallets to create and link to this user in bulk
Show child attributes
List of OAuth accounts to create and link to this user in bulk
Show child attributes
Successfully created new user
Show child attributes
Was this page helpful?
curl --request POST \
--url https://app.dynamicauth.com/api/v0/environments/{environmentId}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias": "An example name",
"firstName": "An example name",
"lastName": "An example name",
"jobTitle": "An example name",
"phoneNumber": "An example name",
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"tShirtSize": "An example name",
"team": "An example name",
"policiesConsent": true,
"country": "US",
"username": "johndoe",
"btcWallet": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
"kdaWallet": "k:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
"ltcWallet": "LUttH43tQ4x4qniCKr1Rqo8ESeXFPdv9ax",
"ckbWallet": "ckt1q9876543210abcdefghijklmnopqrstuvwxyz",
"kasWallet": "kaspa:qrelgny7sr3vahq69yykxx36m65gvmhryxrlwngfzgu8xkdslum2yxjp3ap8m",
"dogeWallet": "DPcy35vmuk8GXcfu1vgFFEeij3BuYYJQKB",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"emailVerifiedAt": "2023-11-07T05:31:56Z",
"email": "hello-world@foobar.com",
"wallets": [
{
"publicWalletAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "ETH",
"walletName": "An example name",
"walletProvider": "browserExtension",
"additionalWalletAddresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>"
}
]
}
],
"oauthAccounts": [
{
"provider": "emailOnly",
"accountId": "An example name",
"emails": [
"hello-world@foobar.com"
],
"displayName": "An example name",
"username": "An example name",
"photos": [
"<string>"
],
"profile": {}
}
]
}
'{
"user": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
],
"walletPublicKey": "<string>",
"wallet": "<string>",
"chain": "ETH",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"sessions": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userAgent": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
],
"wallets": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"name": "An example name",
"chain": "ETH",
"publicKey": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"provider": "browserExtension",
"properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"lastSelectedAt": "<string>"
}
],
"chainalysisChecks": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"result": "OK",
"walletPublicKey": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"response": "<string>"
}
],
"oauthAccounts": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"provider": "emailOnly",
"accountUsername": "<string>"
}
],
"mfaDevices": [
{
"type": "totp",
"verified": true,
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"createdAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z",
"default": true,
"alias": "<string>"
}
]
}
}