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

# Roles Methods

> HoneyHive TypeScript Control Plane SDK Roles namespace reference

#### get

> **get**(`request`: [`GetRolesManifestRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/roles/GetRolesManifestRequest)): `Promise`\<[`GetRolesManifestResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/roles/GetRolesManifestResponse)>

**Accepted keys:** [Control plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

Get an organization's roles manifest

Return the latest version of an organization's roles manifest: the YAML that defines its
roles and the permissions each one grants, as the organization settings page in the
HoneyHive app shows it. The organization is identified by the `org_id` path parameter
alone. The `x-hh-org-id` header does not participate.

Available on self-hosted deployments only. Elsewhere this operation returns 404. An API key
that carries `org.roles.get` or `org.roles.set` can carry no permission other than the
roles and membership permissions, and is created on an organization.

#### update

> **update**(`request`: [`UpdateRolesManifestRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/roles/UpdateRolesManifestRequest)): `Promise`\<[`UpdateRolesManifestResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/roles/UpdateRolesManifestResponse)>

**Accepted keys:** [Control plane fine-grained API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

Replace an organization's roles manifest

Save a new version of an organization's roles manifest, which becomes the latest version.
Every member's current session must reauthorize, so the new roles apply to everyone
immediately. The organization is identified by the `org_id` path parameter alone. The
`x-hh-org-id` header does not participate.

When an API key makes the request, two further rules apply:

* If the organization's current roles manifest already has this content, nothing is saved
  and that version is returned, so applying the same manifest repeatedly is safe.
* A manifest that would leave no onboarded, active member holding `org.roles.get`,
  `org.roles.set`, `org.fine_grained_api_key_cp.list` and
  `org.fine_grained_api_key_cp.delete` is refused with 409, so someone in the organization
  can always revoke the key.

Available on self-hosted deployments only. Elsewhere this operation returns 404. An API key
that carries `org.roles.get` or `org.roles.set` can carry no permission other than the
roles and membership permissions, and is created on an organization.


## Related topics

- [Org Members Methods](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/org-members/index.md)
- [Workspace Members Methods](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/index.md)
- [Project Members Methods](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/project-members/index.md)


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