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

> ## Agent Instructions
> Setting OneCLI up for your person? Follow https://onecli.sh/docs/quickstart.md. Never ask for or accept a key, token or password in the chat: OneCLI needs none.
> No OneCLI credential? Run `onecli connect`, or follow https://onecli.sh/auth.md. A person approves every new agent in their browser.
> Already connected? `onecli status`, `onecli items` and `onecli check <METHOD> <URL>` tell you what you can use. Full guide: https://onecli.sh/skill.md
> Search these docs over MCP at https://onecli.sh/docs/mcp. Report a wrong or unclear page with its `submit_feedback` tool.

# Members and roles: invite your team to OneCLI

> Invite people to your OneCLI Cloud organization, give each one a role, and suspend, remove or hand over ownership, from the dashboard or the API.

> [!NOTE]
>
> Teams are a OneCLI Cloud feature. Self-hosted OneCLI is for one person.

A member is a person in your organization. Each member has one role: **Owner**, **Admin** or **Member**.

## Roles

| Role | What they can do |
| - | - |
| Owner | Everything an admin can. Only an owner makes someone else an owner, changes an owner's role, or transfers ownership. |
| Admin | Invites people, changes roles, suspends and removes members, and manages groups, shared items and sign-in. |
| Member | Uses the vaults shared with them. A member cannot see the member list. |

An owner cannot be suspended or removed, and cannot leave. Change their role first. Nobody changes their own role.

## Invite a person

> [tab] Dashboard
>
> **1. Open the team page**
>
> In the sidebar, under **Organization**, click **Team**.
>
> **2. Create the invitation**
>
> Click **Invite**. Choose the role, **Admin** or **Member**, and enter their email address. Click **Create invitation**.
>
> **3. Share the link**
>
> OneCLI emails the link when mail is set up. You can also click **Copy invitation link** and send it yourself.

> [tab] API
>
> ```bash theme={null}
> curl -X POST https://api.onecli.sh/v2/invites \
>   -H "Authorization: Bearer $ONECLI_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"email": "alex.kim@acme.com", "role": "member"}'
> ```
>
> The answer carries the link once. See [Invites](https://onecli.sh/docs/api-reference/invites).

An invite lasts 7 days and its link works once. Inviting the same email again replaces the earlier invite, and the old link stops working. Open and expired invites show on the **Pending** tab, where you can click **Cancel invitation**.

The person opens the link, signs in with the invited email, and joins with the role the invite offers.

## Change, suspend or remove a member

On the **Team** page, the **Members** tab lists everyone with their role. Open a member's actions to pick one:

* **Change role**: make them an admin or a member. Only an owner can make someone an owner.
* **Suspend member** and **Reinstate member**: a suspended member, and any API key they made, is refused until you reinstate them. An owner cannot be suspended.
* **Remove member**: before you confirm, OneCLI shows the personal vaults that removing them deletes.
* **Transfer ownership**: an owner makes an active admin an owner, and becomes an admin.

| Action | API call |
| - | - |
| List members | `GET /v2/members` |
| Change a role, suspend or reinstate | `PATCH /v2/members/{id}` |
| See what removal deletes | `GET /v2/members/{id}/removal-preview` |
| Remove a member | `DELETE /v2/members/{id}` |
| Transfer ownership | `POST /v2/members/{id}/transfer-ownership` |

`PATCH /v2/members/{id}` makes one change per call. Transfer ownership and making someone an owner need a signed-in session, not an API key. See [Members](https://onecli.sh/docs/api-reference/members) for each call.

## Leave an organization

At the bottom of the **Team** page, use **Leave organization**. OneCLI shows the vaults that leaving deletes before you confirm. With the API, call `DELETE /v2/members/{id}` with your own id, from a signed-in session.

## Give roles through groups

A group from your directory can give its members a role, **Admin** or **Member**, so a whole team gets the same role at once. See [Shared vaults and groups](https://onecli.sh/docs/teams/shared-vaults.md) and [SSO and directory sync](https://onecli.sh/docs/teams/sso-and-directory-sync.md).

## Next steps

* [Shared vaults and groups](https://onecli.sh/docs/teams/shared-vaults.md): choose who can use each vault
* [SSO and directory sync](https://onecli.sh/docs/teams/sso-and-directory-sync.md): sign in through your identity provider
* [Members API](https://onecli.sh/docs/api-reference/members) and [Invites API](https://onecli.sh/docs/api-reference/invites)


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