> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# List organization roles

> Read local and inherited organization roles with their permissions. Use role IDs to match users to roles when their display names are the same.

Requires `roles:read`; `roles:write` also permits reading.

Each role includes its ID, name, description, permissions, and `is_inherited` flag. An inherited role is read-only in this organization. A local and inherited role can share the same name, so match users' roles by ID.


## OpenAPI

````yaml get /roles
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /roles:
    get:
      summary: List roles
      description: >-
        Retrieve the roles defined in the organization (built-in and custom)
        with their permissions. Match `id` against the `roles` array on
        organization users.
      operationId: listRoles
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RolePublicDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    RolePublicDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/RolePublicDto'
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        name:
          type: string
        is_inherited:
          description: >-
            Inherited roles are read-only in this organization. A local and
            inherited role may share a name; use their IDs to distinguish them.
          type: boolean
        description:
          type:
            - string
            - 'null'
        permissions:
          type: array
          items:
            type: string
            enum:
              - '*'
              - sessions:read
              - sessions:write
              - team-sessions:read
              - team-sessions:write
              - assigned-sessions:read
              - assigned-sessions:write
              - hybrid-inbox:read
              - phone-outbound-all-numbers:write
              - sessions-personal-views:write
              - sessions-shared-views:read
              - sessions-shared-views:write
              - sessions-create:write
              - sessions-sub-sessions:write
              - merge-sessions:write
              - sessions-delete-own-messages:write
              - contacts:read
              - contacts:write
              - companies:read
              - companies:write
              - sequences:read
              - sequences:write
              - ai-training:read
              - ai-training:write
              - reports:read
              - reports:write
              - help-center:read
              - help-center:write
              - help-center-content:read
              - help-center-content:write
              - workflows:read
              - workflows:write
              - workflows:execute
              - actions:read
              - actions:write
              - mini-apps:read
              - mini-apps:write
              - companion:read
              - companion:write
              - redaction:read
              - redaction:write
              - voc:read
              - voc:write
              - audit-logs:read
              - settings:read
              - settings:write
              - settings-general:read
              - settings-general:write
              - settings-billing:read
              - settings-billing:write
              - settings-api-keys:read
              - settings-api-keys:write
              - settings-autopilot:read
              - settings-autopilot:write
              - settings-structured-fields:read
              - settings-structured-fields:write
              - settings-webhooks:read
              - settings-webhooks:write
              - settings-secrets:read
              - settings-secrets:write
              - settings-handoff:read
              - settings-handoff:write
              - settings-translations:read
              - settings-translations:write
              - settings-sso:read
              - settings-sso:write
              - settings-security:read
              - settings-security:write
              - settings-integrations:read
              - settings-integrations:write
              - settings-members:read
              - settings-members:write
              - settings-agent-availability:read
              - settings-agent-availability:write
              - settings-tags:read
              - settings-tags:write
              - settings-sla:read
              - settings-sla:write
              - settings-csat:read
              - settings-csat:write
              - settings-reports:read
              - settings-reports:write
              - settings-office-hours:read
              - settings-office-hours:write
              - settings-channels:read
              - settings-channels:write
              - settings-channels-voice:read
              - settings-channels-voice:write
              - settings-email-fleet:read
              - settings-email-fleet:write
              - settings-helpdesk:read
              - settings-helpdesk:write
              - settings-custom-statuses:read
              - settings-custom-statuses:write
              - settings-availability-statuses:read
              - settings-availability-statuses:write
              - settings-personal-profile:read
              - settings-personal-profile:write
              - settings-groups:read
              - settings-groups:write
              - settings-roles:read
              - settings-roles:write
              - settings-scim-role-mappings:read
              - settings-scim-role-mappings:write
              - settings-macros:read
              - settings-macros:write
              - settings-skills:read
              - settings-skills:write
      required:
        - id
        - name
        - description
        - permissions
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.