For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Users & Teams

Get Users

get
Authorizations
AuthorizationstringRequired

Authorization: Bearer {AuthorizationToken}

Query parameters
limitinteger · min: 1 · max: 1000OptionalDefault: 1000
pageintegerOptionalDefault: 1
accountstring · UIDOptional

Comma separated user IDs

Example: ckweru5xg000142qyx3m0sds
emailstring · emailOptional

Comma separated emails

Example: ben.kenney@example.com
referencestring · stringOptional

Comma separated RiskBase references

Example: RB-YNAVYJ
customReferencestring · stringOptional

Comma separated RiskBase custom references

Example: your-stored-custom-reference
Responses
200Success
application/json
totalintegerOptional
get/users
GET /users HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "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"
    }
  ]
}

Create or Link User

post

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.

Authorizations
AuthorizationstringRequired

Authorization: Bearer {AuthorizationToken}

Body
emailstring · emailRequired

The user's email address

Example: ben.boyd@riskbase.uk
forenamestringRequiredExample: Ben
surnamestringRequiredExample: Boyd
customReferencestringOptionalExample: custom-reference
activebooleanOptionalDefault: falseExample: true
Responses
200Success
application/json
idstring · UIDOptionalExample: yok0w80s0sckwwgo0c8sko4o
usercreatedbooleanOptional

Indicates whether the operation created a new user within an organisation.

Example: true
userLinkedbooleanOptional

Indicates whether the operation linked an existing user to the organisation rather than creating a new user.

post/users
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
}

Get Teams

get
Authorizations
AuthorizationstringRequired

Authorization: Bearer {AuthorizationToken}

Query parameters
limitinteger · min: 1 · max: 1000OptionalDefault: 1000
pageintegerOptionalDefault: 1
teamstring · UIDOptional

Comma separated teams IDs

Example: ckweru5xg000142qyx3m0sds
Responses
200Success
application/json
totalintegerOptional
get/teams
GET /teams HTTP/1.1
Host: api3.riskbase.uk
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "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 Team

patch

Add users to a team

  • Invalid user IDs are silently ignored.

  • Triggers the team webhook.

Authorizations
AuthorizationstringRequired

Authorization: Bearer {AuthorizationToken}

Path parameters
teamIdstring · UIDRequired
Body
usersstring · UID[]Required

User IDs to add to the team

skipWebhookbooleanOptionalDefault: false
Responses
204Success
patch/teams/{teamId}/users/add
PATCH /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"
  ]
}
204Success

Remove Users from Team

patch

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 team webhook.

Authorizations
AuthorizationstringRequired

Authorization: Bearer {AuthorizationToken}

Path parameters
teamIdstring · UIDRequired
Body
usersstring · UID[]Required

User IDs to remove from the team

skipWebhookbooleanOptionalDefault: false
Responses
204Success
patch/teams/{teamId}/users/remove
PATCH /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"
  ]
}
204Success

Last updated

Was this helpful?