Users & Teams
Authorization: Bearer {AuthorizationToken}
10001Comma separated user IDs
ckweru5xg000142qyx3m0sdsComma separated emails
ben.kenney@example.comComma separated RiskBase references
RB-YNAVYJComma separated RiskBase custom references
your-stored-custom-referenceGET /users HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"total": 2,
"users": [
{
"id": "cksq4xkxh012173wh9agrq0iz",
"forename": "Ben",
"surname": "Kenney",
"email": "ben.kenney@example.com",
"teams": [
"cksq5ee6607bwedwhkb6ra827",
"cksq5ee7m07mtedwhhqwwbdpw"
],
"provisionType": "riskbase"
},
{
"id": "cksq4xgao07ctwgwhkn2ovl45",
"forname": "Brandon",
"surname": "Boyd",
"email": "brandon.kenney@example.com",
"teams": [],
"provisionType": "riskbase"
}
]
}This POST request is used to create a new user. If a user already exists, they will be added to the organisation. The authentication type will be set to passwordless by default.
Authorization: Bearer {AuthorizationToken}
The user's email address
ben.boyd@riskbase.ukBenBoydcustom-referencefalseExample: trueyok0w80s0sckwwgo0c8sko4oIndicates whether the operation created a new user within an organisation.
trueIndicates whether the operation linked an existing user to the organisation rather than creating a new user.
POST /users HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 144
{
"email": "ben.boyd@riskbase.uk",
"forename": "Ben",
"surname": "Boyd",
"customReference": "custom-reference",
"roles": [
{
"value": "text"
}
],
"active": true
}{
"id": "yok0w80s0sckwwgo0c8sko4o",
"usercreated": true,
"userLinked": false
}Authorization: Bearer {AuthorizationToken}
10001Comma separated teams IDs
ckweru5xg000142qyx3m0sdsGET /teams HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"total": 10,
"teams": [
{
"id": "cksq5ee6607bwedwhkb6ra827",
"name": "Remedial Works",
"description": "Users responsible for actioning remedial works",
"users": [
"cksq4xkxh012173wh9agrq0iz"
]
},
{
"id": "cksq5ee7m07mtedwhhqwwbdpw",
"name": "Assessors",
"description": "",
"users": [
"cksq50h7g0638hywhasfzw7cd",
"cksq4xg9g073gwgwh269ug5vb",
"cl1djtphd0001b0wh11hgfazk"
]
}
]
}Add users to a team
Invalid user IDs are silently ignored.
Triggers the
teamwebhook.
Authorization: Bearer {AuthorizationToken}
User IDs to add to the team
falsePATCH /teams/{teamId}/users/add HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"users": [
"cksq50h7g0638hywhasfzw7cd",
"cksq4xg9g073gwgwh269ug5vb"
]
}Remove users from a team.
Users are also removed as responsible for the team. (See
Get Property Team Users.)Invalid user IDs are silently ignored.
Triggers the
teamwebhook.
Authorization: Bearer {AuthorizationToken}
User IDs to remove from the team
falsePATCH /teams/{teamId}/users/remove HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"users": [
"cksq50h7g0638hywhasfzw7cd",
"cksq4xg9g073gwgwh269ug5vb"
]
}Last updated
Was this helpful?