Identities API
This API allows managing borrower identities in the system. It provides endpoints to create, read, update, and delete identities, as well as manage their attachments.
The Identity Object
The Identity object represents an identity associated with a borrower in the system.
Attributes
| Attribute | Description | Type |
|---|---|---|
id | Unique identifier of the identity | String |
borrowerId | ID of the associated borrower | String |
key | Key identifying the type of identity | String |
label | Descriptive label of the identity | String |
value | Value of the identity | String |
priority | Priority of the identity | Integer |
tags | Tags associated with the identity | Array of String |
createdAt | Creation date and time | String (ISO 8601) |
updatedAt | Last update date and time | String (ISO 8601) |
hasAttachments | Indicates if it has attachments | Boolean |
Sensitive identities
If the identity key is configured as sensitive in its DataModel (isSensitive: true):
- The
valuereturned byGET/LISTendpoints is masked as__sensitive__. - Plaintext is only available via the unmask endpoint below (subject to permissions).
Available Operations
Create a New Identity
Creates a new identity for a borrower.
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
borrowerId | ID of the borrower | String | Yes |
key | Identity key | String | Yes |
value | Identity value | String | No |
tags | Associated tags | Array of String | No |
Note: If the identity key is sensitive, the service will encrypt the provided value. Subsequent reads return the masked sentinel __sensitive__.
Request Example:
Successful Response:
Get an Identity
Retrieves information of a specific identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to retrieve |
Successful Response:
The response will be a complete Identity object, as described above.
Unmask an Identity (Sensitive keys only)
Returns the plaintext value for a sensitive identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to unmask |
Successful Response:
Note: This endpoint requires private read permission (e.g. bc.private.read) and is not allowed for form tokens.
Update an Identity
Updates information of an existing identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to update |
Input Parameters:
| Parameter | Description | Type |
|---|---|---|
value | New value of the identity | String |
tags | New list of tags | Array of String |
Request Example:
Successful Response:
The response will be the updated Identity object.
Note: If the identity key is sensitive, updating value will re-encrypt it. Reads will still return __sensitive__, and unmask will return the updated plaintext.
Delete an Identity
Deletes an identity from the system.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to delete |
Successful Response:
Status code 204 (No Content) if the deletion was successful.
List Identities
Retrieves a paginated list of identities with filtering and sorting options.
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
borrower-id | ID of the borrower to filter | String |
search | Text to search in identities | String |
page | Page number (default: 1) | Integer |
per-page | Items per page (default: 10) | Integer |
key | Filter by identity key | String |
value | Filter by identity value | String |
sort-by | Field to sort by | String |
sort-direction | Sorting direction (asc or desc) | String |
Successful Response:
The response will be a paginated list of Identity objects.
Notes:
- When querying by
value, you must also providekey. valuequeries are not allowed for sensitive identity keys.
Add an Attachment to an Identity
Adds an attachment to a specific identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to add attachment to |
Input Parameters:
| Parameter | Description | Type |
|---|---|---|
url | URL of the attachment | String |
label | Descriptive label of the attachment | String |
Request Example:
Successful Response:
Status code 201 (Created) if the attachment was added successfully.
Get Attachments of an Identity
Retrieves the list of attachments for a specific identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity to get attachments from |
Successful Response:
The response will be a list of Attachment objects.
Delete an Attachment from an Identity
Deletes a specific attachment from an identity.
Path Parameters:
| Parameter | Description |
|---|---|
identity_id | ID of the identity |
attachment_id | ID of the attachment to delete |
Successful Response:
Status code 204 (No Content) if the deletion was successful.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.