zitadel users create
Create a user.
Usage
npx @zitadel/cli@latest users create [flags]Flags
| Flag | Description |
|---|---|
-e, --env <value> | Environment to run against, e.g. production. Defaults to ZITADEL_ENV, then the hosting platform's build (VERCEL_ENV, or Netlify's CONTEXT), then development. |
--env-file <value> | Read ZITADEL_* values from this file ahead of the process environment. A relative path is read from the current directory, not from --cwd. Cannot be combined with --env. |
Required field flags
| Flag | Description |
|---|---|
--schema <value> | (required) The schema that defines the content of attributes. |
--attributes <value> | (required) Repeatable attributes entry: key=value for a string, key:=value for JSON. The user's schema-defined content. Can be given more than once. |
Raw body flags
| Flag | Description |
|---|---|
--data <value> | Whole body as a JSON object. Field flags and --set apply over it. Not with --file. |
--file <value> | Read the body from a JSON file; - reads stdin. Field flags and --set apply over it. Not with --data. |
--set <value> | Set one field by its dot path: path=value, or path:=json for JSON. Repeatable; applied after the field flags, in order. A key that contains a dot is set through its parent: --set 'parent:={"a.b":"x"}'. Can be given more than once. |
It also takes the global flags.
Examples
npx @zitadel/cli@latest users create --schema <schema> --attributes <key>=<value> --json
npx @zitadel/cli@latest users create --data '{...}' --json
npx @zitadel/cli@latest users create --file ./user.jsonAPI
It calls Create user, POST /users, in the Users API.
Was this helpful?