---
title: "Get a role by ID"
method: GET
path: "/v1/roles/{roleId}"
tags: ["Roles"]
---

# Get a role by ID

`GET /v1/roles/{roleId}`

Get a role by ID in Comp AI. Create custom roles and resolve permission sets for organization-level access control.

## Path parameters

- `roleId` string, required

## Response `200`

Role details

- object
  - `id` string
  - `name` string
  - `permissions` object
  - `isBuiltIn` boolean
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `401` — Unauthorized
- `404` — Role not found

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/versions/726b9523fb22/schema)
