---
title: "Returns the role with the specified name."
method: GET
path: "/roles/{roleName}"
tags: ["roles"]
---

# Returns the role with the specified name.

`GET /roles/{roleName}`

<Check title="Required Permissions" icon="key">The user must be an admin or have `workspace-manage-config:read` permissions.</Check>

## Path parameters

- `roleName` string, required

## Headers

- `Authorization` string, required

## Response `200`

OK

- Role — The role model.
  - `name` string, required — The name of the role. Must be unique.
  - `isAdminRole` boolean — Whether this is the admin role. Only one role can be the admin role.
  - `isGuestRole` boolean — Whether this is the guest role. Only one role can be the guest role.
  - `id` string, uuid — The id of the role.
  - `isAgentRole` boolean — Whether this is a retained role from the legacy agent-as-user model. The role cannot be modified.
  - `isPreset` boolean — Whether this role is one of the preset roles. Preset roles can be edited, archived and deleted.
  - `isArchived` boolean — Whether the role has been archived.
  - `createdBy` string, uuid — The id of the user who created this role.
  - `createdOn` string, date-time — The date this role was created.
  - `updatedBy` string, uuid — The id of the user who updated this role.
  - `updatedOn` string, date-time — The date this role was last modified.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
