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

# Team members

> List, view, add, update, and delete the agents in your workspace.

A team member is an agent or another user of the workspace. For fields and response details, see the [API reference](/api/team-members/list).

## List team members

This command lists the workspace's active team members. Use this when you want to see who already has access. `--email` matches an address exactly.

```bash theme={"system"}
neetodesk team-members list --page-size 50
neetodesk team-members list --email oliver.smith@example.com
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--email` | `string` | | | Filter by email |
| `--order` | `string` | | `desc` | Sort direction: asc or desc |
| `--page` | `int` | | `0` | Page number |
| `--page-size` | `int` | | `0` | Items per page (max 100) |
| `--sort` | `string` | | `created_at` | Sort field: created\_at, updated\_at, email, first\_name or last\_name |

```json Sample output (--json) theme={"system"}
{
  "data": [
    {
      "id": "7b2c1d40-5e6f-4a81-9c23-0d4e5f6a7b8c",
      "email": "oliver.smith@example.com",
      "first_name": "Oliver",
      "last_name": "Smith",
      "time_zone": "Asia/Kolkata",
      "profile_image_url": null,
      "organization_role": "Admin",
      "active": true
    }
  ],
  "breadcrumbs": [
    { "label": "Show", "command": "neetodesk team-members show <id>" },
    { "label": "Update", "command": "neetodesk team-members update <id>" }
  ],
  "pagination": {
    "total_records": 12,
    "total_pages": 1,
    "current_page_number": 1,
    "page_size": 50
  }
}
```

## Show a team member

This command shows one team member's email address, name, time zone, and role. Use this when you want to inspect a member after finding their ID from `team-members list`. The record has the same fields as a `team-members list` entry and sits under a `team_member` key in `data`.

```bash theme={"system"}
neetodesk team-members show 7b2c1d40-5e6f-4a81-9c23-0d4e5f6a7b8c
```

**Required arguments:**

* `<id>` - Team member UUID

## Add team members

This command invites one or more people to the workspace. Use this when you want to give someone access. Repeat `--email` to invite several at once. Each address is emailed an invitation unless you pass `--send-invitation-email=false`.

```bash theme={"system"}
neetodesk team-members create \
  --email sam.smith@example.com \
  --email jane.doe@example.com \
  --role Agent
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--email` | `stringArray` | Yes | `[]` | Email addresses to invite (repeat flag for multiple) |
| `--role` | `string` | Yes | | Organization role (e.g. agent, admin) |
| `--send-invitation-email` | `bool` | | `true` | Send invitation email to new members |

<Note>
  `--role` must name a role that exists under **Roles** in your workspace settings.
</Note>

The API confirms the invitations with a message rather than returning the new members, so this
is the one `create` command whose `--quiet` output is that message object rather than an id.
Run `team-members list --email` afterwards to fetch a new member's id.

```json Sample output (--json) theme={"system"}
{
  "data": {
    "message": "Users added successfully"
  }
}
```

## Update a team member

This command changes a team member's email address, name, time zone, or role. Use this when a member's details or role change. Pass only the flags you want to change. The updated record comes back under a `team_member` key in `data`.

```bash theme={"system"}
neetodesk team-members update 7b2c1d40-5e6f-4a81-9c23-0d4e5f6a7b8c --role Admin
```

**Required arguments:**

* `<id>` - Team member UUID

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--email` | `string` | | | New email |
| `--first-name` | `string` | | | First name |
| `--last-name` | `string` | | | Last name |
| `--role` | `string` | | | Organization role |
| `--time-zone` | `string` | | | Time zone |

```json Sample output (--json) theme={"system"}
{
  "data": {
    "team_member": {
      "id": "7b2c1d40-5e6f-4a81-9c23-0d4e5f6a7b8c",
      "email": "oliver.smith@example.com",
      "first_name": "Oliver",
      "last_name": "Smith",
      "time_zone": "Asia/Kolkata",
      "profile_image_url": null,
      "organization_role": "Admin",
      "active": true
    }
  }
}
```

## Delete a team member

This command deactivates a team member, ending their access to the workspace. Use this when someone should no longer have access. Their user record is kept, so the tickets and comments they handled stay attributed to them. The last admin of a workspace cannot be removed.

```bash theme={"system"}
neetodesk team-members delete 7b2c1d40-5e6f-4a81-9c23-0d4e5f6a7b8c
```

**Required arguments:**

* `<id>` - Team member UUID

```text Sample output theme={"system"}
Team member removed.
```

Under `--json` that is `{"message": "Team member removed."}`; under `--quiet` it is `success`.


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