Create Users

Administrators have the ability to create additional users, enable these users as administers and have API capabilities enabled. This functionality is restricted solely to administrators. To create an additional user, the administrator initiates a POST request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/partners/v1/Users

This request requires the additional data to be included in the body of the request.

Body Parameter Data Element Details:

NameTypeDescription
namestring | nullusers full name
emailstring | nullusers email address
isAdminbooleanindicates if this user is an administrator
showApibooleanindicates if this user has access to APIs
POST /partners/v1/users HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Content-Type: application/json
Authorization: Bearer ••••••

{
    "name": "Postman Add",
    "email": "[email protected]",
    "isAdmin": false
}

A successful request will generate a response of 202 – Accepted

{
    "keyId": "ffd7a02f-f330-470f-b5a7-14d91368e520",
    "displayName": "Doc Test 2",
    "startDateTime": "2024-05-31T17:12:21.9923852+00:00",
    "endDateTime": "2025-04-22T18:05:23.7290172+00:00",
    "hint": "OOU",
    "secretText": "OOU8Q~M~11111111111111111111111111111111"
}

Error Handling:
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
422 – Unprocessable Content

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


Get All User Details

Users have the ability to access a comprehensive list of all users associated with the partner they are affiliated with. This list includes user-specific details such as username, first name, last name, and additional relevant information. For a detailed breakdown of all data elements received, refer to the Response Data Element Details section below. To obtain this list, initiate a GET request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/partners/v1/Users

This request requires the additional data to be included in the query of the request.

Query Parameter Data Element Details:

NameTypeDescription
usernamestring
paginateResultsbooleanindicates whether the request should be paginated
pageint32indicates the page to return
perPageint32indicates how many items are on a page
sortOnstringindicates the attribute by which the data is sorted
sortAscendingbooleanindicates if the data is sorted in ascending or descending order
GET /partners/v1/users?paginateResults=true&page=0&perPage=10&sortAscending=true HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 200 – Success.

{
    "pageSize": 10,
    "pageOffset": 0,
    "totalPages": 1,
    "totalItemCount": 1,
    "items": [
        {
            "id": "9fa44d26-60b6-4d24-8edf-0d2a1dc79d2c",
            "name": "test admin",
            "isAdmin": true,
            "isPrimaryAdmin": false,
            "accountEnabled": true,
            "email": "[email protected]",
            "lastLoggedInAt": "0001-01-01T00:00:00",
            "roles": [],
            "showApi": false,
            "isFrozen": false
        }
    ]
}

Response Data Element Details:

NameTypeDescription
pageSizeint32number of items displayed on a page
pageOffsetint32offset index indicating starting point for page items
totalPagesint32total number of pages
totalItemCountint32total count of items across all pages
itemsarray of objects | nullitems model
> idstringusers id
> namestring | nullusers full name
> isAdminbooleanindicates if this user in an administrator
> isPrimaryAdminbooleanindicates if this user is the primary administrator
> accountEnabledboolean
> emailstring | nullusers email address
> lastLoggedInAtdate-timedate and time this user last logged in
> rolesarray of strings | null
> showApibooleanindicates if this user has access to APIs
> isFrozenbooleanindicates if this user profile is frozen

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Unprocessable Content

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


Get Specific User Details

Similar to the prior request, a user can obtain the same level of information for a specific user if they know the userID. To get user information for a specific user, initiate a GET request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/partners/v1/Users/{userId}

This request requires the additional data to be included in the path of the request.

Path Parameter Data Element Details:

NameTypeDescription
userIdstringthe id related to a specific user
GET /partners/v1/users/ffd7a02f-f330-470f-b5a7-14d91368e520 HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 200 – Success.

{
    "id": "ffd7a02f-f330-470f-b5a7-14d91368e520",
    "name": "test",
    "isAdmin": true,
    "isPrimaryAdmin": false,
    "accountEnabled": true,
    "email": "[email protected]",
    "lastLoggedInAt": "2024-05-01T14:51:01Z",
    "roles": [],
    "showApi": false,
    "isFrozen": false
}

Response Data Element Details

NameTypeDescription
idstringusers ID
namestring | nullusers full name
isAdminbooleanindicates if this user in an administrator
isPrimaryAdminbooleanindicates if this user in the primary administrator
accountEnabledboolean
emailstring | nullusers email address
lastLoggedInAtdate-timedate and time this user last logged in
rolesarray of strings | null
showApibooleanindicates if this user has access to APIs
isFrozenbooleanindicates if this user profile is frozen

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Unprocessable Content

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


Update User Information

Administrators have the ability to update a user profile. This functionality is restricted solely to administrators. The information that can be updated via API is the user name, administrator rights, roles, and if they can access APIs. To update a user profile, the administrator initiates a PUT request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/partners/v1/Users

This request requires the additional data to be included in the body of the request.

Body Parameter Data Element Details:

NameTypeDescription
idstringthe id related to a specific user
namestring | nullusers full name
isAdminboolean | nullindicates if this user is an administrator
Rolesarray of strings | null
showApiboolean | nullindicates if this user has access to APIs
PUT /partners/v1/users HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Content-Type: application/json
Authorization: Bearer ••••••
Content-Length: 108

{
    "id": "7a201833-c4c8-4a32-b601-85f1756d829d",
    "name": "Postman Update",
    "isAdmin": false
}

A successful request will generate a response of 202 -Accepted

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Unprocessable Content

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


Delete User

Administrators have the ability to delete user profiles via API. This functionality is restricted solely to administrators. To delete a user profile, the administrator initiates a DELETE request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/partners/v1/Users/{userId}

This request requires the additional data to be included in the path of the request.
Path Parameter Data Element Details:

NameTypeDescription
userIdstringthe id related to a specific user
DELETE /partners/v1/credentials/1095155f-d828-4568-1111-78f543b4a84b HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 204 – No Content.

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Unprocessable Content

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.