---
title: "Fetch a single role by its ID"
method: GET
path: "/roles/{roleId}"
tags: ["Role"]
---

# Fetch a single role by its ID

`GET /roles/{roleId}`

Returns the full details of the role identified by `roleId` within the tenant specified by the required `tenant-id` header. Use this when you already hold a role ID and need the role's name, description, and metadata; to list all available roles use `GET /roles`. The `roleId` path parameter is the string identifier returned when the role was created (e.g. `"role-123-456-789"`). Returns a single role object (`RoleResponseDto`) on success. Returns 400 if the `tenant-id` header is absent or blank. Note: if no role with the given ID exists, the current implementation returns 500 rather than 404 (tracked in CP-36405); verify the ID against `GET /roles` to find valid values.

## Path parameters

- `roleId` string, required

## Headers

- `tenant-id` string

## Response `200`

Role retrieved successfully

- RoleResponseDto — Role information response
  - `id` string — Role ID
  - `name` string — Role name
  - `tenantId` string — Tenant ID
  - `description` string — Role description
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `createdBy` string — ID of the user who created the role
  - `updatedBy` string — ID of the user who last updated the role

## Other responses

- `400` — Bad request - Invalid request parameters or missing required headers
- `401` — Authentication required - Valid authentication token is missing or invalid
- `403` — Forbidden - User does not have the required permissions to read roles
- `500` — Internal server error - An unexpected error occurred while processing the request. No response body is returned. Note: a non-existent role ID currently also surfaces here as a 500 rather than a 404, since not-found conditions are not distinguished from other failures (tracked in CP-36405).

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
