WorkOS · Schema

CreateRoleDto

AuthenticationIdentity ProviderSSOSAMLOIDCSCIMDirectory SyncAuthorizationFGAAudit LogsMFAB2B SaaSAgentsMCP

Properties

Name Type Description
slug string A unique slug for the role.
name string A descriptive name for the role.
description stringnull An optional description of the role.
resource_type_slug string The slug of the resource type the role is scoped to.
View JSON Schema on GitHub

JSON Schema

workos-createroledto-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateRoleDto",
  "title": "CreateRoleDto",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "maxLength": 48,
      "description": "A unique slug for the role.",
      "example": "editor"
    },
    "name": {
      "type": "string",
      "maxLength": 48,
      "description": "A descriptive name for the role.",
      "example": "Editor"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 150,
      "description": "An optional description of the role.",
      "example": "Can edit resources"
    },
    "resource_type_slug": {
      "type": "string",
      "maxLength": 48,
      "description": "The slug of the resource type the role is scoped to.",
      "example": "organization"
    }
  },
  "required": [
    "slug",
    "name"
  ]
}