---
question: Does a workspace invite create an account for a new email?
kind: task
via_web: available
via_cli: available
via_python: na
via_api: available
via_config: na
ref_web: Settings › Members
ref_cli: abi workspace members add
ref_api: POST /api/workspaces/{id}/members/invite
prereq: You are an owner or admin of the workspace.
next:
  - /capabilities/platform/workspace-settings
  - /capabilities/platform/organization-and-members
---

# Invite a workspace member

An invite gives someone a workspace role: admin, member or viewer. The owner role is not offered. If the person has no account, the invite creates one, and it emails a sign-in code. When the workspace belongs to an organization, the person also joins that organization as a member. Inviting someone who is already a member keeps their role and sends the email again.

The email needs the email service. Without it the invite still adds the member, and the response says `sign_in_email_sent: false`.

## Web UI

### Open Members

Open **Settings** in the dock, then **Members** under General.

### Invite

Choose **Invite Member**. Enter the email, pick **Member**, **Viewer** or **Admin**, then **Send Invite**.

![Workspace Settings on Members: the Invite New Member form](/abi/Screenshot_Invite_Workspace_Member.png)

*Settings › Members › Invite Member. The role is Member, Viewer or Admin, and the role permissions are listed under the members.*

### Change or remove later

The **Role** column changes a role among Member, Viewer and Admin. The trash icon removes the member, after "Remove this member?". You cannot change the owner, yourself, or someone marked via organization: their role comes from the organization, on [Organization settings](/user-guide/platform/organization-and-members).

## CLI

### Find the workspace id

```bash
abi workspace list
```

### Add the member

```bash
abi workspace members add --workspace <ws-id> --email jane@example.com --role member
```

`--role` is `admin`, `member` (the default) or `viewer`. `--name` sets the name of a new account. The command calls `POST /api/workspaces/{id}/members/invite`, and signs in like the other admin commands (`--token`, or `--auth-email` and `--auth-password`).

### List or remove

```bash
abi workspace members list --workspace <ws-id>
abi workspace members remove --workspace <ws-id> --user-id <user-id>
```

`remove` asks for confirmation; `--yes` skips it.

There is no CLI command to change a role: use the Web UI or the REST API. See [`abi workspace members`](/user-guide/reference/cli#abi-workspace-members).

## Python

Not applicable. ABI has no Python API for workspace members. From Python, call the REST API.

## REST API

### Invite

```bash
curl -X POST http://localhost:9879/api/workspaces/<ws-id>/members/invite \
  -H "Authorization: Bearer $NEXUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email": "jane@example.com", "role": "member"}'
```

The response has `status` (`invited` or `already_member`), `member_id`, `user_created` and `sign_in_email_sent`. A caller who is not an owner or admin gets 403. The endpoint is rate-limited, per caller and per invited email.

### Change the role

```bash
curl -X PATCH http://localhost:9879/api/workspaces/<ws-id>/members/<user-id> \
  -H "Authorization: Bearer $NEXUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role": "viewer"}'
```

You cannot change your own role or the owner's (400).

### Remove

`DELETE /api/workspaces/<ws-id>/members/<user-id>` removes the member. `GET /api/workspaces/<ws-id>/members` lists them.

## Config

Not applicable. `config.yaml` sets a workspace's owner (`owner_email`), not its members: `workspaces[].members` is deprecated and ignored. Invite people from the Web UI, the CLI or the REST API.
