Create a user​
Create a new user with an optional data schema.
Request Body required
Possible values: non-empty
and <= 200 characters
Optionally set a unique identifier of the user. If unset, ZITADEL will take care of it.
organization object required
authenticators object
contact object
Possible values: non-empty
and <= 200 characters
Define the schema the user's data schema by providing it's ID.
Provide data about the user. It will be validated based on the specified schema.
Request Body required
Possible values: non-empty
and <= 200 characters
Optionally set a unique identifier of the user. If unset, ZITADEL will take care of it.
organization object required
authenticators object
contact object
Possible values: non-empty
and <= 200 characters
Define the schema the user's data schema by providing it's ID.
Provide data about the user. It will be validated based on the specified schema.
Request Body required
Possible values: non-empty
and <= 200 characters
Optionally set a unique identifier of the user. If unset, ZITADEL will take care of it.
organization object required
authenticators object
contact object
Possible values: non-empty
and <= 200 characters
Define the schema the user's data schema by providing it's ID.
Provide data about the user. It will be validated based on the specified schema.
- 200
- 201
- 403
- 404
- default
A successful response.
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.257Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.258Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.258Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
User successfully created
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.258Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.258Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
Schema
details object
The email code will be set if a contact email was set with a return_code verification option.
The phone code will be set if a contact phone was set with a return_code verification option.
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:05.258Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "SKJd342k",
"phoneCode": "IFi39dk2"
}
Returned when the user does not have permission to access the resource.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v3alpha/users
Authorization
name: OAuth2type: oauth2scopes:openid,urn:zitadel:iam:org:project:id:zitadel:aud
flows: { "authorizationCode": { "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize", "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token", "scopes": { "openid": "openid", "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud" } } }
Request
Request
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "69629026806489455",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"authenticators": {
"usernames": [
{
"username": "gigi-giraffe",
"isOrganizationSpecific": true
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
}
},
"contact": {
"email": {
"address": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"number": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}
},
"schemaId": "69629026806489455",
"data": {
"name": "Gigi",
"description": "the giraffe"
}
}'