Skip to main content

Authorized Users APIs

Add Authorized Users

Add authorized users for a customer. The Customer Update webhook event will be fired.

Note

When adding an authorized user with the same Email as an existing authorized users of the customer, the existing authorized user info will be updated according to the info in the request.

VerbPOST
URLhttps://api.s.unit.sh/customers/:customerId/authorized-users
Required Scopecustomers-write
Data TypeaddAuthorizedUsers
Timeout (Seconds)5

Attributes

authorizedUsers
Array of authorized users. The provided array items will be added to the existing ones.

Response

Response is a JSON:API document.

200 OK

data
Customer resource. be either business or individual, as indicated by the type field.
Add Customer Authorized Users:
curl -X POST 'https://api.s.unit.sh/customers/10000/authorized-users'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "addAuthorizedUsers",
"attributes": {
"authorizedUsers": [
{
"fullName": {
"first": "Erlich",
"last": "Backman"
},
"email": "erlich@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "1234567890"
},
"canConnectWithAuthVendor": true
}
]
}
}
}'

Get by Id

Get an authorized user resource by id.

VerbGET
URLhttps://api.s.unit.sh/customers/{customerId}/authorized-users/{authorizedUserId}
Timeout (Seconds)5

Response

Response is a JSON:API document.

200 OK

data
Authorized user resource.
curl -X GET 'https://api.s.unit.sh/customers/8/authorized-users/20' \
-H "Authorization: Bearer ${TOKEN}"

List

List of authorized user resources. Filtering can be applied.

VerbGET
URLhttps://api.s.unit.sh/customers/{customerId}/authorized-users
Required Scopecustomers
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
filter[jwtSubject]string(empty)Optional. Filter authorized users by JWT subject.
filter[phone]Phone(empty)Optional. Filter authorized users by phone.
curl -X GET 'https://api.s.unit.sh/customers/8/authorized-users?filter[ids][0]=20&filter[phone]={"countryCode": "1","number": "1234567890"}' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

data
Array of authorized user resources.
Example Response:
{
"data": [
{
"type": "authorizedUser",
"id": "42",
"attributes": {
"fullName": {
"first": "Richard",
"last": "Hendricks"
},
"email": "richard@piedpiper.com",
"phone": {
"countryCode": "1",
"number": "5555555555"
},
"createdAt": "2020-05-13T09:07:47.645Z",
"status": "Enabled",
"evaluationStatus": "Evaluated",
"evaluationId": "10020",
"alertId": "159753159753",
"canConnectWithAuthVendor": true
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"banks": {
"data": {
"type": "banks",
"id": [
"1"
]
}
}
}
},
{
"type": "authorizedUser",
"id": "88",
"attributes": {
"fullName": {
"first": "Jone",
"last": "Doe"
},
"email": "jone.doe@unit-finance.com",
"phone": {
"countryCode": "1",
"number": "2025550108"
},
"createdAt": "2020-05-13T09:07:47.645Z",
"jwtSubject": "3438c4c8-5061-70ba-5b5d-71418d796f60",
"status": "Disabled",
"evaluationStatus": "Evaluated",
"evaluationId": "10028",
"alertId": "159753159456",
"canConnectWithAuthVendor": false
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10001"
}
},
"org": {
"data": {
"type": "org",
"id": "1"
}
}
}
}
]
}

Remove Authorized Users

Remove existing authorized users from a customer. The Customer Update webhook event will be fired.

Note

Authorized users emails are unique, when removing an authorized user it is identified only by its email address

VerbDELETE
URLhttps://api.s.unit.sh/customers/:customerId/authorized-users
Required Scopecustomers-write
Data TyperemoveAuthorizedUsers
Timeout (Seconds)5

Attributes

authorizedUsersEmails
Array of emails (strings)
The list of authorized users emails to remove from the customer.

Response

Response is a JSON:API document.

200 OK

data
Customer resource. be either business or individual, as indicated by the type field.
Remove Customer Authorized Users:
curl -X DELETE 'https://api.s.unit.sh/customer/10000/authorized-users'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "removeAuthorizedUsers",
"attributes": {
"authorizedUsersEmails": [
"jared@piedpiper.com"
]
}
}
}'