> ## 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.

# Workspace Members Methods

> HoneyHive TypeScript Control Plane SDK Workspace Members namespace reference

#### create

> **create**(`request`: [`CreateWorkspaceMemberRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/CreateWorkspaceMemberRequest)): `Promise`\<[`CreateWorkspaceMemberResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/CreateWorkspaceMemberResponse)>

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

Invite someone to a workspace

Invite one email address to a workspace, and return the member. The address is stored
lowercased. An address with no HoneyHive user yet gets one, and the invitee receives an
email. An email sent for a request made with an API key names the inviter as a HoneyHive
teammate.

The invitee also becomes a member, with no roles, of the workspace's virtual data plane and
organization, wherever they are not one already.

The new member has no roles, and is `INVITED` until they first sign in. Sign-in keeps any
roles set before then and adds the roles the organization's roles manifest gives invited
members. To give them roles now, set their roles with the `user_id` this returns.

Inviting an address that is already a member returns that member unchanged, and sends no
email, so sending the same invite again is safe. The workspace is identified by the
`workspace_id` path parameter alone. The `x-hh-workspace-id` header does not participate.

Available on self-hosted deployments that do not enable an SSO group scheme. Elsewhere this
operation returns 404. An API key that carries a membership permission can carry no
permission other than the roles and membership permissions, and is created on an
organization.

#### delete

> **delete**(`request`: [`DeleteWorkspaceMemberRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/DeleteWorkspaceMemberRequest)): `Promise`\<[`DeleteWorkspaceMemberResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/DeleteWorkspaceMemberResponse)>

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

Remove someone from a workspace

Remove a user from a workspace and from every project in it, which also withdraws a pending
invite. The user's current sessions must reauthorize. Their HoneyHive user stays, along with
their memberships of the workspace's virtual data plane and organization. The workspace and
the user are identified by the path parameters alone. The `x-hh-workspace-id` header does
not participate.

Available on self-hosted deployments that do not enable an SSO group scheme. Elsewhere this
operation returns 404. An API key that carries a membership permission can carry no
permission other than the roles and membership permissions, and is created on an
organization.

#### list

> **list**(`request`: [`ListWorkspaceMembersRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/ListWorkspaceMembersRequest)): `Promise`\<[`ListWorkspaceMembersResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/ListWorkspaceMembersResponse)>

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

List a workspace's members

Return one page of a workspace's members, oldest membership first. Each member carries their
roles in the workspace and whether they have signed in yet. The workspace is identified by
the `workspace_id` path parameter alone. The `x-hh-workspace-id` header does not
participate.

Available on self-hosted deployments that do not enable an SSO group scheme. Elsewhere this
operation returns 404. An API key that carries a membership permission can carry no
permission other than the roles and membership permissions, and is created on an
organization.

#### update

> **update**(`request`: [`UpdateWorkspaceMemberRequest`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/UpdateWorkspaceMemberRequest)): `Promise`\<[`UpdateWorkspaceMemberResponse`](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/workspace-members/UpdateWorkspaceMemberResponse)>

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

Set a member's roles in a workspace

Replace a member's roles in a workspace with the roles given, and return the member. The
member's current sessions must reauthorize, so the new roles apply immediately. The member
may still be `INVITED`. The workspace and the member are identified by the path parameters
alone. The `x-hh-workspace-id` header does not participate.

Each role must be one the organization's roles manifest defines for workspaces, which are
the roles the HoneyHive app offers there. Any other role is refused with 400, including one
a manifest change removed, so writing back roles read before such a change can fail. When
the organization has no valid roles manifest in force, the roles cannot be checked and the
request is refused with 409.

Available on self-hosted deployments that do not enable an SSO group scheme. Elsewhere this
operation returns 404. An API key that carries a membership permission can carry no
permission other than the roles and membership permissions, and is created on an
organization.


## Related topics

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


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