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

# List roles with where they are used

> Every configured or assigned role with counts of contacts, active projects, library templates, automations and other settings that reference it. Pass type and name to get one role with its contact list.



## OpenAPI

````yaml /api-reference/cx/swagger.json get /contacts/roles/_usage
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /contacts/roles/_usage:
    get:
      tags:
        - contacts
      summary: List roles with where they are used
      description: >-
        Every configured or assigned role with counts of contacts, active
        projects, library templates, automations and other settings that
        reference it. Pass type and name to get one role with its contact list.
      parameters:
        - description: Contact | External | Internal
          name: type
          in: query
          schema:
            type: string
        - description: Role name
          name: name
          in: query
          schema:
            type: string
      responses:
        '200':
          description: roles
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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