Create employee

Use case

In this use case, we will create a new employee with the following data set:

Use case data
API parameters with values

We will create a record for a Test Employee.

"username": "[email protected]",
"email": "[email protected]",
"firstName": "Test",
"lastName": "Employee"

Test Employee is a Customer Support representative.

"roles": [
    "CUSTOMER_SERVICE"
  ]

The employee password must be 12 to 20 characters long and contain one upper-case letter, one digit, and one special character.

"password": "Vys%k6;)#,bab"

The name of the tenant where new employee is created.

"tenantCode": "BANK"

Sample API call

To create a new employee, make the following API call.

https://auth-api.sandbox.tuumplatform.com/api/v1/employees

Learn more about the create employee endpoint in the Tuum developer portal.

Sample request

Below is an example request body of the API call for creating an employee.

{
  "username": "[email protected]",
  "email": "[email protected]",
  "firstName": "Test",
  "lastName": "Employee",
  "roles": [
    "CUSTOMER_SERVICE"
  ],
  "password": "Vys%k6;)#,bab",
  "tenantCode": "BANK"
}

Sample response

Below you find an example response body to the API call above.

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "employeeId": "ID-1183",
        "firstName": "Test",
        "lastName": "Employee",
        "username": "[email protected]",
        "email": "[email protected]",
        "authenticationMethod": "PASSWORD",
        "defaultTenantCode": "MB",
        "roles": [
            "CUSTOMER_SERVICE"
        ],
        "tenants": [
            {
                "tenantEmployeeId": "ID-1213",
                "defaultTenant": true,
                "tenantId": "ID-1000",
                "tenantCode": "BANK",
                "roles": [
                    "CUSTOMER_SERVICE"
                ]
            }
        ],
        "externalId": null,
        "lastLogin": "2024-11-25T12:28:04.635156Z",
        "blockedUntil": null,
        "failedAttempts": 0
    }
}

Result

As a result, a new employee with the employeeId: ID-1183 was created.

Last updated

Was this helpful?