> ## 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.

# Troubleshooting

> Diagnose CLI problems, read the error messages the CLI reports and fix the common ones.

## Start with doctor

`neetodesk doctor` checks each thing independently and reports all of them, so one failure does
not hide the next:

```bash theme={"system"}
neetodesk doctor
```

```
✓ Authentication: authenticated as oliver.smith@example.com on acme.neetodesk.com
✓ API connection: https://acme.neetodesk.com (responding in 214ms)
✓ CLI version: 1.0.7
```

## Reading an API error

When the API rejects a request, the CLI reports the status code, the message the API returned
and a suggestion:

```
API error (404): Ticket does not exist.

Suggestion: Resource not found. Check the ID and try again.
```

| Status | What the CLI suggests                                        |
| ------ | ------------------------------------------------------------ |
| 401    | The session expired. Run `neetodesk login` again.            |
| 403    | Your role does not permit the action.                        |
| 404    | Check the ID and try again.                                  |
| 422    | Check the required fields with `neetodesk <command> --help`. |
| 429    | You are rate limited. Wait and retry.                        |

## Common problems

<AccordionGroup>
  <Accordion title="Not authenticated. Run 'neetodesk login' to authenticate.">
    **Problem**: No workspace is signed in on this machine. <br />
    **Solution**: Run `neetodesk login`. See [Authentication](/cli/authentication).
  </Accordion>

  <Accordion title="Multiple subdomains authenticated (acme, globex); specify --subdomain.">
    **Problem**: You are signed in to more than one workspace, so the CLI will not guess which
    one you meant. <br />
    **Solution**: Add `--subdomain acme` to the command, or drop the workspaces you no longer
    need with `neetodesk logout --subdomain globex`.
  </Accordion>

  <Accordion title="Not authenticated for &#x22;acme&#x22;.">
    **Problem**: The subdomain you passed is not among the ones signed in. The message lists the
    ones that are. <br />
    **Solution**: Check the spelling of the subdomain, then run
    `neetodesk login --subdomain acme`.
  </Accordion>

  <Accordion title="API error (401) after it worked yesterday">
    **Problem**: The saved session token expired. <br />
    **Solution**: Run `neetodesk login` to sign in again. The stored credential is replaced.
  </Accordion>

  <Accordion title="Could not connect to NeetoDesk. Check your internet connection.">
    **Problem**: The CLI could not reach the host at all, rather than being turned away by it.
    A proxy or VPN is the usual cause. <br />
    **Solution**: Run `neetodesk doctor` to see which host it is trying, and confirm you can
    reach that host in a browser.
  </Accordion>

  <Accordion title="command not found: neetodesk">
    **Problem**: The install directory is not on your `PATH`. <br />
    **Solution**: Open a new terminal. The installer edits your shell profile, which the running
    session has already read. See [Installation](/cli/installation).
  </Accordion>

  <Accordion title="Completions are missing new commands after an upgrade">
    **Problem**: The completion script on disk is the one the older version wrote. <br />
    **Solution**: Re-run `neetodesk completion <shell>`. See
    [Shell completion](/cli-reference/utility#shell-completion).
  </Accordion>

  <Accordion title="A ticket you can see in the web app is missing from `tickets list`">
    **Problem**: The CLI acts as the person who signed in, so it is bounded by that person's
    role. An agent restricted to their own tickets or to their groups sees a narrowed list. <br />
    **Solution**: Confirm which account you are signed in as with `neetodesk whoami`. If the
    account is right, the restriction is the role, not the CLI.
  </Accordion>
</AccordionGroup>

## Getting the version

Include the version when you report a problem:

```bash theme={"system"}
neetodesk version
```
