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

# Get tenant role



## OpenAPI

````yaml get /v1/tenants/{id}/roles/{roleId}
openapi: 3.0.0
info:
  title: Auth APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com/auth
  - url: https://staging.api.eu.aptlydone.com/auth
  - url: https://api.us.aptlydone.com/auth
  - url: https://api.eu.aptlydone.com/auth
security: []
tags: []
paths:
  /v1/tenants/{id}/roles/{roleId}:
    get:
      tags:
        - tenants
      summary: Get tenant role
      operationId: TenantController_getTenantRoleById_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: roleId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Tenant role fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRoleResponseDtoResponse'
      security:
        - accessToken: []
components:
  schemas:
    TenantRoleResponseDtoResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP Status code
          example: 200
        timestamp:
          type: string
          description: Timestamp of the response
          example: '2026-01-12T09:10:12.337Z'
        message:
          type: string
          description: Response message
          example: Success
        data:
          description: Response data
          allOf:
            - $ref: '#/components/schemas/TenantRoleResponseDto'
      required:
        - statusCode
        - timestamp
        - message
        - data
    TenantRoleResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 955aa514-ab2c-4277-9b07-1e22761528b2
          description: Unique identifier of the tenant role
        roleName:
          type: string
          example: so through
          description: Name of the role
        tenantId:
          type: string
          example: 6d188158-b229-4acc-aea2-bae43e166f3a
          description: Tenant ID
        description:
          type: string
          nullable: true
          example: >-
            noisily provided which hourly black supposing bourgeoisie meaty
            integer yarmulke
          description: Role description
        isCustom:
          type: boolean
          example: true
          description: Whether this is a custom role
          default: false
        canDeactivate:
          type: boolean
          example: true
          description: Whether this role can be deactivated
          default: true
        status:
          type: string
          example: ACTIVE
          description: Role status
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
        isDeleted:
          type: boolean
          example: false
          description: Whether the role is marked as deleted
          default: false
        deletedOn:
          format: date-time
          type: string
          nullable: true
          example: '2025-04-01T19:45:37.028Z'
          description: Deletion timestamp
        isDeactivated:
          type: boolean
          example: false
          description: Whether the role is deactivated
          default: false
        deactivatedOn:
          format: date-time
          type: string
          nullable: true
          example: '2025-06-26T21:47:10.121Z'
          description: Deactivation timestamp
        createdOn:
          format: date-time
          type: string
          example: '2026-01-12T08:23:02.411Z'
          description: Creation timestamp
          default: now()
        updatedOn:
          format: date-time
          type: string
          example: '2026-01-12T07:18:22.373Z'
          description: Last update timestamp
          default: now()
        roleId:
          type: string
          description: Role Auto Generated ID
          example: '10000'
        usersCount:
          type: number
          description: Number of active users associated with the given role
          example: 7
        relationshipMappings:
          description: Relationship key mappings associated with this role
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/RelationshipMappingDto'
      required:
        - id
        - roleName
        - tenantId
        - description
        - isCustom
        - canDeactivate
        - status
        - isDeleted
        - deletedOn
        - isDeactivated
        - deactivatedOn
        - createdOn
        - updatedOn
        - roleId
    RelationshipMappingDto:
      type: object
      properties:
        relationshipKeyName:
          type: string
          example: create:documents
          description: Relationship key name
        isEnabled:
          type: boolean
          example: true
          description: Whether this relationship mapping is checked/enabled
          default: false
        status:
          type: object
          example: ACTIVE
          description: Mapping status
          default: ACTIVE
      required:
        - relationshipKeyName
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````