Skip to main content
GET
List assignable roles
This endpoint lists the system roles and custom roles you can assign with Update User Role. Custom role names are not unique. Use id when you assign a role. The call is authorized by the workspace API key’s USER_MANAGEMENT_API scope. It does not run as the person who created the key, so it keeps working after that admin leaves the workspace.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Prerequisites

  • API Key with the USER_MANAGEMENT_API scope
  • The API key must be created by a workspace admin

Behavior

  • System roles come first, in this order: member, editor, admin. kind is system. name is Member, Editor, or Admin. description is empty. id is that lowercase role name.
  • Custom roles follow, oldest first. kind is custom. Deleted custom roles are left out.
  • Each role has id, kind, name, and description. Permission settings are not included.
  • The call takes no query parameters.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Response

Assignable roles

roles
object[]
required

System roles first (member, editor, admin), then live custom roles from oldest to newest. Deleted custom roles are omitted.