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

# team-members

> List, inspect, invite, update, and remove the members of a workspace.

Team members are the users of a workspace. Each one carries an organization role, which
decides what they can see and change. For fields and response details, see the
[API reference](/api/team-members/list).

<Note>
  A team member is addressed by its record `id`, a UUID returned by `team-members list`. The
  same value is what `project-users create --user-id` expects. Only active members resolve:
  a member removed with `team-members delete` is no longer found by `show`, `update`, or
  `delete`.
</Note>

<Note>
  Sample responses on this page show the JSON envelope (`--json`). Pretty output is the
  default on a terminal and its columns adapt to width. See
  [Output formats](/cli/output-formats).
</Note>

## team-members list

List the active members of the workspace. Use it to find a member's `id`, or to check who
already has access before inviting someone.

```bash theme={"system"}
neetoinvoice team-members list --email oliver@example.com
```

| Flag          | Type     | Required | Default | Description              |
| ------------- | -------- | -------- | ------- | ------------------------ |
| `--email`     | `string` | No       |         | Filter by email address  |
| `--page`      | `int`    | No       | `0`     | Page number              |
| `--page-size` | `int`    | No       | `0`     | Items per page (max 100) |

`--email` matches one address exactly; it does not search by partial address. Results are
paginated. `--page-size` defaults to `0`, which sends no page size and lets the API return 30
per page; the maximum is 100.

```json theme={"system"}
{
  "data": [
    {
      "id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "email": "oliver@example.com",
      "first_name": "Oliver",
      "last_name": "Smith",
      "time_zone": "Asia/Kolkata",
      "profile_image_url": null,
      "active": true,
      "organization_role": "Admin"
    }
  ],
  "breadcrumbs": [
    { "label": "Show", "command": "neetoinvoice team-members show <id>" }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page_number": 1,
    "page_size": 30
  }
}
```

<Note>
  The API reads the page number from `page_number`, while this release of the CLI sends
  `page`, so `--page` has no effect yet. `--page-size` works as described.
</Note>

## team-members show

Show one member: email, name, time zone, role, and whether they are active.

```bash theme={"system"}
neetoinvoice team-members show 5a2de667-243b-4da3-b090-b698a03d98da
```

### Required arguments

* `<id>` - the team member's record ID, from `team-members list`.

```json theme={"system"}
{
  "data": {
    "team_member": {
      "id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "email": "oliver@example.com",
      "first_name": "Oliver",
      "last_name": "Smith",
      "time_zone": "Asia/Kolkata",
      "profile_image_url": null,
      "active": true,
      "organization_role": "Admin"
    }
  },
  "breadcrumbs": [
    {
      "label": "Update",
      "command": "neetoinvoice team-members update <id> --role <role>"
    }
  ]
}
```

## team-members create

Invite one or more people by email and give them an organization role. `--email` is
repeatable. `--role` must name a role that exists on the workspace's Roles page, and the
value is case sensitive.

```bash theme={"system"}
neetoinvoice team-members create \
  --email sam@example.com \
  --email jane@example.com \
  --role Admin
```

| Flag                      | Type          | Required | Default | Description                          |
| ------------------------- | ------------- | -------- | ------- | ------------------------------------ |
| `--email`                 | `stringArray` | Yes      | `[]`    | Email address to invite (repeatable) |
| `--invited-by`            | `string`      | No       |         | Inviter name or email                |
| `--role`                  | `string`      | Yes      |         | Organization role                    |
| `--send-invitation-email` | `bool`        | No       | `true`  | Send invitation email                |

Every invitee gets an invitation email unless you pass `--send-invitation-email=false`.
`--invited-by` is the email of the admin the invitation is sent from; it defaults to the
workspace's most recently added admin.

```json theme={"system"}
{
  "data": { "message": "Users added successfully" },
  "breadcrumbs": [
    { "label": "List", "command": "neetoinvoice team-members list" }
  ]
}
```

The response confirms the request and does not include the new member records. Run
`team-members list --email <address>` afterwards to get an `id`.

## team-members update

Change a member's email, name, time zone, or role. Only the flags you pass are changed, and
at least one is required.

```bash theme={"system"}
neetoinvoice team-members update 5a2de667-243b-4da3-b090-b698a03d98da \
  --first-name Oliver \
  --role Admin
```

### Required arguments

* `<id>` - the team member's record ID, from `team-members list`.

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

```json theme={"system"}
{
  "data": {
    "team_member": {
      "id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "email": "oliver@example.com",
      "first_name": "Oliver",
      "last_name": "Smith",
      "time_zone": "Asia/Kolkata",
      "profile_image_url": null,
      "active": true,
      "organization_role": "Admin"
    }
  }
}
```

## team-members delete

Remove a member from the workspace. The member is deactivated rather than erased.

```bash theme={"system"}
neetoinvoice team-members delete 5a2de667-243b-4da3-b090-b698a03d98da
```

### Required arguments

* `<id>` - the team member's record ID, from `team-members list`.

```
Team member removed.
```

With `--quiet` the command prints `success`.
