Users

Create a User

Create a new User with the provided details

post/users

Request body

firstNamestring

First name of the user

lastNamestring

Last name of the user

usernamestring

Unique alphanumeric username, max 20 characters

emailstring email required

Email address of the user

passwordstring required

Strong password for the user account

role'admin' | 'developer' | 'supportAgent' | 'viewer' required

Role assigned to the user

Example request

{
  "firstName": "John",
  "lastName": "Doe",
  "username": "johndoe",
  "email": "john@example.com",
  "password": "P@ssw0rd!2024",
  "role": "developer"
}

Response

OK

createdAtstring date-time required

The date and time when the entity was created.

updatedAtstring date-time nullable required

The date and time when the entity was last updated.

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

idstring required

The unique identifier of the user

firstNamestring nullable required

First name of the user

lastNamestring nullable required

Last name of the user

usernamestring nullable required

Username of the user, can be used for authorization.

emailstring required

Email of the user, can be used for authorization.

role'admin' | 'developer' | 'supportAgent' | 'viewer' required

Role of the user

immutableboolean required

Indicates if the user is immutable, meaning it cannot be modified or deleted by other users.

Example response

{
  "createdAt": "2024-02-18T12:00:00Z",
  "updatedAt": "2024-02-21T12:15:00Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "firstName": "John",
  "lastName": "Doe",
  "username": "johndoe",
  "email": "john@example.com",
  "sessions": [
    {
      "createdAt": "2024-02-18T12:00:00Z",
      "updatedAt": "2024-02-21T12:15:00Z",
      "metadata": {
        "key1": "value1",
        "key2": "value2"
      },
      "lastActiveAt": "2026-01-15T10:30:00.000Z"
    }
  ],
  "role": "supportAgent"
}

Changes