Stytch · Schema
api_user_v1_CreateRequest
Request type
AuthenticationIdentityPasswordlessSecurityB2BConnected AppsMCPAI AgentsDeveloper Tools
Properties
| Name | Type | Description |
|---|---|---|
| string | The email address of the end user. | |
| name | object | The name of the user. Each field in the name object is optional. |
| attributes | object | |
| phone_number | string | The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/ho |
| create_user_as_pending | boolean | Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false. If true, users will be saved with status pending in Stytch's backend until authenticated. If false, users will |
| trusted_metadata | object | The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details. |
| untrusted_metadata | object | The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critica |
| external_id | string | An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. |
| roles | array | Roles to explicitly assign to this User. See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/api_user_v1_CreateRequest",
"title": "api_user_v1_CreateRequest",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address of the end user."
},
"name": {
"$ref": "#/components/schemas/api_user_v1_Name",
"description": "The name of the user. Each field in the name object is optional."
},
"attributes": {
"$ref": "#/components/schemas/api_attribute_v1_Attributes"
},
"phone_number": {
"type": "string",
"description": "The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail."
},
"create_user_as_pending": {
"type": "boolean",
"description": "Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.\n If true, users will be saved with status pending in Stytch's backend until authenticated.\n If false, users will be created as active. An example usage of\n a true flag would be to require users to verify their phone by entering the OTP code before creating\n an account for them."
},
"trusted_metadata": {
"type": "object",
"additionalProperties": true,
"description": "The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details."
},
"untrusted_metadata": {
"type": "object",
"additionalProperties": true,
"description": "The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details."
},
"external_id": {
"type": "string",
"description": "An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters."
},
"roles": {
"type": "array",
"items": {
"type": "string"
},
"description": "Roles to explicitly assign to this User.\n See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment."
}
},
"description": "Request type"
}