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

# Users

> List, invite, and remove workspace members.

A user is a member of your NeetoAuth workspace. For fields and response details, see the [API reference](/api-reference/users/list).

Samples on this page use `--json`, because pretty table output depends on your terminal width.

## List users

This command shows active members of your workspace. Use it when you want to see who already has access before inviting or removing someone.

```bash theme={"system"}
neetoauth users list
neetoauth users list --page 2 --page-size 50
```

| Flag          | Type  | Required | Default | Description              |
| ------------- | ----- | -------- | ------- | ------------------------ |
| `--page`      | `int` |          | `0`     | Page number              |
| `--page-size` | `int` |          | `0`     | Items per page (max 100) |

```json Sample output (--json) theme={"system"}
{
  "data": [
    {
      "email": "oliver@example.com",
      "role": "owner",
      "first_name": "Oliver",
      "last_name": "Smith"
    },
    {
      "email": "sam@example.com",
      "role": "non_owner",
      "first_name": "Sam",
      "last_name": "Smith"
    }
  ],
  "breadcrumbs": [
    { "label": "Invite a new member", "command": "neetoauth users create --email <email> --role <role>" },
    { "label": "Remove a member", "command": "neetoauth users delete <email>" }
  ],
  "pagination": {
    "total_records": 2,
    "total_pages": 1,
    "current_page_number": 1,
    "page_size": 30
  }
}
```

Deactivated members are left out. `role` is the organization-level role, either `owner` or `non_owner`; product roles are not included in this listing.

## Invite a user

This command invites someone to your workspace and emails them an invitation. Use it when onboarding a colleague, optionally granting them roles in specific neeto products at the same time.

```bash theme={"system"}
neetoauth users create \
  --email sam@example.com \
  --role non_owner \
  --first-name Sam \
  --last-name Smith \
  --app neetocal:admin
```

| Flag           | Type          | Required | Default | Description                                            |
| -------------- | ------------- | -------- | ------- | ------------------------------------------------------ |
| `--app`        | `stringSlice` |          | `[]`    | Per-app role assignment as name:role (repeatable)      |
| `--email`      | `string`      |          |         | Member email address (required)                        |
| `--first-name` | `string`      |          |         | Member first name                                      |
| `--json-file`  | `string`      |          |         | Path to a JSON file with the full user payload         |
| `--last-name`  | `string`      |          |         | Member last name                                       |
| `--role`       | `string`      |          |         | Organization role, e.g. owner or non\_owner (required) |

`--role` is the organization role and must be `owner` or `non_owner`. `--app` takes a `name:role` pair and is repeatable, so pass it once per product. Run [`neetoauth products list`](/cli-reference/products) first to see which products and roles exist in the workspace. If `--first-name` or `--last-name` is omitted, the server stores `-`.

```json Sample output (--json) theme={"system"}
{
  "data": {
    "email": "sam@example.com",
    "role": "non_owner",
    "first_name": "Sam",
    "last_name": "Smith",
    "apps": [
      { "name": "neetocal", "role": "admin" }
    ]
  },
  "breadcrumbs": [
    { "label": "List all members", "command": "neetoauth users list" },
    { "label": "Remove this member", "command": "neetoauth users delete sam@example.com" }
  ]
}
```

The `apps` array reports the product grants the server resolved, which is how you confirm a `--app` pair was accepted.

### Invite from a file

`--json-file` reads the whole payload from disk, which is useful when the product grants are long or generated by a script. Flags passed on the command line override values in the file.

```bash theme={"system"}
neetoauth users create --json-file ./new-member.json
```

The file holds the user object, either bare or wrapped in a `user` key:

```json theme={"system"}
{
  "user": {
    "email": "sam@example.com",
    "role": "non_owner",
    "first_name": "Sam",
    "last_name": "Smith",
    "apps": [
      { "name": "neetocal", "role": "admin" },
      { "name": "neetodesk", "role": "agent" }
    ]
  }
}
```

## Remove a user

This command removes a member from your workspace. Use it when someone has left or should no longer have access.

```bash theme={"system"}
neetoauth users delete sam@example.com
```

**Required arguments:**

* `<email>` - the exact email address of an active member

```text Sample output theme={"system"}
Removed sam@example.com from the workspace.
```

Deactivating a member also ends their sessions across every neeto product. It is reversible only through the NeetoAuth admin UI. The command fails if the address does not match an active member, or if removing them would leave the workspace without an owner.
