Skip to main content

Create user

Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains labels and descriptions for the user. The title field can be optionally added for a user-friendly name.

Example:{"email":"john.doe@raystack.org","title":"John Doe",metadata:{"label": {"key1": "value1"}, "description": "User Description"}}

Request Body required
    name string

    The name of the user. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores and must start with a letter. If not provided, Frontier automatically generates a name from the user email.

    email string required

    The email of the user. The email must be unique within the entire Frontier instance.
    Example:"john.doe@raystack.org"

    metadata object

    Metadata object for users that can hold key value pairs pre-defined in User Metaschema. The metadata object can be used to store arbitrary information about the user such as label, description etc. By default the user metaschema contains labels and descriptions for the user. Update the same to add more fields to the user metadata object.
    Example:{"label": {"key1": "value1"}, "description": "User Description"}

    title string

    The title can contain any UTF-8 character, used to provide a human-readable name for the user. Can also be left empty.
    Example:"John Doe"

    avatar string

    The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern ^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$.

Responses

A successful response.


Schema
    user object
    id string
    name can either be empty or must start with a character

    Unique name of the user.

    title string

    Name of the user.

    email string
    metadata object
    createdAt date-time

    The time the user was created.

    updatedAt date-time

    The time the user was last updated.

    state string

    The state of the user (enabled or disabled).

    avatar string

    The base64 encoded image string of the user avatar. Should be less than 2MB.

Loading...