Users
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:
Name | Type | Description |
---|---|---|
name | string | null | users full name |
string | null | users email address | |
isAdmin | boolean | indicates if this user is an administrator |
showApi | boolean | indicates 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:
Name | Type | Description |
---|---|---|
username | string | |
paginateResults | boolean | indicates whether the request should be paginated |
page | int32 | indicates the page to return |
perPage | int32 | indicates how many items are on a page |
sortOn | string | indicates the attribute by which the data is sorted |
sortAscending | boolean | indicates 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:
Name | Type | Description |
---|---|---|
pageSize | int32 | number of items displayed on a page |
pageOffset | int32 | offset index indicating starting point for page items |
totalPages | int32 | total number of pages |
totalItemCount | int32 | total count of items across all pages |
items | array of objects | null | items model |
> id | string | users id |
> name | string | null | users full name |
> isAdmin | boolean | indicates if this user in an administrator |
> isPrimaryAdmin | boolean | indicates if this user is the primary administrator |
> accountEnabled | boolean | |
string | null | users email address | |
> lastLoggedInAt | date-time | date and time this user last logged in |
> roles | array of strings | null | |
> showApi | boolean | indicates if this user has access to APIs |
> isFrozen | boolean | indicates 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:
Name | Type | Description |
---|---|---|
userId | string | the 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
Name | Type | Description |
---|---|---|
id | string | users ID |
name | string | null | users full name |
isAdmin | boolean | indicates if this user in an administrator |
isPrimaryAdmin | boolean | indicates if this user in the primary administrator |
accountEnabled | boolean | |
string | null | users email address | |
lastLoggedInAt | date-time | date and time this user last logged in |
roles | array of strings | null | |
showApi | boolean | indicates if this user has access to APIs |
isFrozen | boolean | indicates 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:
Name | Type | Description |
---|---|---|
id | string | the id related to a specific user |
name | string | null | users full name |
isAdmin | boolean | null | indicates if this user is an administrator |
Roles | array of strings | null | |
showApi | boolean | null | indicates 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:
Name | Type | Description |
---|---|---|
userId | string | the 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.
Updated 3 months ago