Get Updated Roles

Prev Next
Get
/api/v1/roles.sync

Gets the roles in the workspace that were created, updated, or deleted after a given date.

Changelog

Version Description
3.1.0 Added
Header parameters
X-User-Id
stringRequired

The authenticated user ID.

ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired

The authenticated user token.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Query parameters
updatedSince
string (date-time)

Date as an ISO string. Roles updated at or after this date are returned in update, and roles deleted after this date are returned in remove.

Example2017-11-25T15:08:17.248Z
Responses
200

OK

Success Example
{
  "roles": {
    "update": [
      {
        "_id": "admin",
        "scope": "Users",
        "description": "Admin",
        "mandatory2fa": false,
        "name": "admin",
        "protected": true,
        "_updatedAt": "2026-11-07T02:22:08.393Z"
      },
      {
        "_id": "moderator",
        "scope": "Subscriptions",
        "description": "Moderator",
        "mandatory2fa": false,
        "name": "moderator",
        "protected": true,
        "_updatedAt": "2026-11-07T02:22:08.408Z"
      },
      {
        "_id": "680fc8d0825d98f164760591",
        "name": "TOTP",
        "scope": "Users",
        "description": "TOTP",
        "protected": false,
        "mandatory2fa": true,
        "_updatedAt": "2025-04-28T18:31:33.121Z"
      }
    ],
    "remove": [
      {
        "_id": "anonymous",
        "__collection__": "roles",
        "_deletedAt": "2026-10-27T19:31:44.643Z",
        "_updatedAt": "2026-10-03T03:00:56.098Z",
        "description": "",
        "mandatory2fa": false,
        "name": "anonymous",
        "protected": true,
        "scope": "Users"
      }
    ]
  },
  "success": true
}
Expand All
object
roles
object
update
Array of object

Roles created or updated at or after the updatedSince date.

object
_id
string

The role ID. For default roles, this is the same as the role name. For custom roles, this is a generated ID.

name
string

The role name.

scope
string

Whether the role applies to the whole workspace (Users) or to rooms (Subscriptions).

Valid values[ "Users", "Subscriptions" ]
description
string

The role description. Can be an empty string.

mandatory2fa
boolean

Whether users with this role must use two-factor authentication. This field is optional and can be missing from older roles.

protected
boolean

Whether the role is a protected default role that can't be deleted.

_updatedAt
string (date-time)

The date the role was last updated.

remove
Array of object

Roles deleted after the updatedSince date.

object
_id
string

The role ID.

name
string

The role name.

scope
string
Valid values[ "Users", "Subscriptions" ]
description
string
mandatory2fa
boolean
protected
boolean
__collection__
string

The collection the role was deleted from. Always roles.

_deletedAt
string (date-time)

The date the role was deleted.

_updatedAt
string (date-time)

The date the role was last updated before it was deleted.

success
boolean
Valid values[ true ]
400

Bad Request

Invalid date
{
  "success": false,
  "error": "updatedSince must be a valid date string [error-invalid-param]",
  "errorType": "error-invalid-param"
}
Unknown query parameter
{
  "success": false,
  "error": "must NOT have additional properties",
  "errorType": "error-invalid-params"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string