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

# Control Plane Workflows

> Common non-admin Control Plane tasks for API keys, billing, tickets, and metrics.

Use this page after you are already authenticated with:

```sh theme={null}
tm auth whoami
```

## API Keys

Create a user API key for automation:

```sh theme={null}
USER_ID="$(tm --output json auth whoami | python3 -c 'import json,sys; print(json.load(sys.stdin)["user"]["id"])')"
tm users api-keys create --user-id "$USER_ID" --name ci-key --yes
```

List existing keys:

```sh theme={null}
 tm --output json users api-keys list
```

Delete a key explicitly:

```sh theme={null}
tm users api-keys delete --api-key YOUR_KEY --yes
```

## Billing Reads

Check current balance:

```sh theme={null}
 tm --output json billing balance
```

Read transaction history with explicit pagination:

```sh theme={null}
 tm --output json billing transactions list --page-size 25 --page-token "$NEXT_PAGE_TOKEN"
```

Read spending summary:

```sh theme={null}
 tm --output json billing spending summary
```

## Support Tickets

Create a ticket:

```sh theme={null}
 tm --output json tickets create --subject "Need help" --message "Please investigate."
```

Append a follow-up:

```sh theme={null}
 tm --output json tickets message TICKET_ID --message "Following up"
```

List open tickets:

```sh theme={null}
 tm --output json tickets list --status TICKET_STATUS_OPEN --page 1 --size 20
```

## User-Level Metrics

Fetch user-level metrics:

```sh theme={null}
 tm --output json metrics user --step-seconds 60
```

## When To Prefer JSON

For anything that feeds another program, prefer `--output json` and pass pagination or filter values explicitly.

Use table or text output only for interactive inspection.

## Related Reference

* [`tm users api-keys`](/cli/reference/users/api-keys)
* [`tm billing`](/cli/reference/billing)
* [`tm tickets`](/cli/reference/tickets)
* [`tm metrics`](/cli/reference/metrics)
