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

# Self-Serve Dashboard

> Sign up, create API tokens, monitor usage, manage credits, and test Esheria API calls from dashboard.esheria.ai.

Use the Esheria API Dashboard when you want to start without operator help.
The dashboard is available at `https://dashboard.esheria.ai/` and is the
recommended path for account setup, token management, usage review, billing,
and first-request testing.

<Info>
  The dashboard manages access to the Regulatory Pack API. API responses remain
  source-backed regulatory workflow data, not legal advice.
</Info>

## What You Can Do

<Columns cols={2}>
  <Card title="Create an account" icon="user-plus">
    Sign up with a verified Google or GitHub identity. Public email/password
    signup is disabled until production email verification and recovery exist.
  </Card>

  <Card title="Create API tokens" icon="key-round">
    Create data tokens for services, integrations, local development, CLI, and
    MCP hosts.
  </Card>

  <Card title="Manage token lifecycle" icon="shield-check">
    List active tokens, copy token prefixes for debugging, and revoke tokens
    that should no longer work.
  </Card>

  <Card title="Track credits and usage" icon="activity">
    Review remaining credits, recent usage, endpoint families, status codes,
    charged credits, and trace IDs.
  </Card>

  <Card title="Manage billing" icon="wallet-cards">
    Start Stripe Checkout for top-ups or subscriptions and review the current
    subscription state.
  </Card>

  <Card title="Use the playground" icon="play">
    Test pack discovery, claim verification, obligations, applicability,
    evidence, filings, penalties, graph queries, and exports from the browser.
  </Card>
</Columns>

## First Dashboard Flow

<Steps>
  <Step title="Open the dashboard">
    Go to `https://dashboard.esheria.ai/` and choose **Sign up** with Google or
    GitHub. Esheria provisions free Sandbox credits only for verified provider
    email addresses.
  </Step>

  <Step title="Create or resolve your workspace">
    After sign-in, the dashboard resolves your workspace and shows your current
    credit balance, token state, usage, and available API workflows.
  </Step>

  <Step title="Create a data token">
    Open **Settings**, choose up to two Sandbox packs, then open **API Tokens**,
    create a data token, and store the returned token
    immediately. The token secret is shown once and cannot be retrieved later.
  </Step>

  <Step title="Set local environment variables">
    Store the token in your shell, CI secret store, or server secret manager as
    `ESHERIA_API_KEY`.
  </Step>

  <Step title="Run the first request">
    Use the dashboard playground, `curl`, or the `esheria` CLI to list packs and
    confirm the token works.
  </Step>
</Steps>

```bash theme={null}
export ESHERIA_API_BASE_URL="https://api.esheria.ai"
export ESHERIA_API_KEY="YOUR_DASHBOARD_CREATED_DATA_TOKEN"

curl --compressed -sS \
  "$ESHERIA_API_BASE_URL/api/v1/domain-packs?limit=10" \
  -H "x-api-key: $ESHERIA_API_KEY" | jq
```

## Token Types

Dashboard users normally create **data tokens**. Data tokens call entitled
Regulatory Pack API routes and spend workspace credits when billing is enabled.

Management tokens are used by the dashboard server and trusted automation for
workspace, token, billing, and checkout administration. Do not put management
tokens in browser code, public repositories, notebooks, support tickets, or
client-side applications.

| Token task                     | Where to do it                                                    |
| ------------------------------ | ----------------------------------------------------------------- |
| Create a data token            | Dashboard **API Tokens** page                                     |
| List active and revoked tokens | Dashboard **API Tokens** page or `esheria tokens list`            |
| Revoke a token                 | Dashboard **API Tokens** page or `esheria tokens revoke TOKEN_ID` |
| Copy a new token secret        | Only on the one-time creation screen                              |
| Recover an old token secret    | Not supported; create a replacement token                         |

## Billing And Credits

Credits belong to the workspace, not to individual tokens. Creating more tokens
does not create more free credits.

The dashboard billing pages show:

* current credit balance
* free-credit and paid-credit grants
* recent usage and charged credits
* available top-up or subscription plans
* checkout success and cancel states
* current subscription state and cancellation controls when available

Protected API requests are metered by endpoint family. Health checks, readiness
checks, token management, billing reads, and checkout-session creation are not
billable.

New verified workspaces receive 500 credits valid for 14 days and may select
two published packs. Paid plans expand included credits, pack limits, features,
and authenticated requests per minute. Billing cards and Checkout use exact
server-returned SKUs; hidden browser fields never determine a price or grant.

<Warning>
  If credits are exhausted, billable API calls return HTTP `402` with
  `credits_exhausted`. Add credits or update the workspace plan before retrying
  production traffic.
</Warning>

## Usage And Activity

Use **Usage** and **Activity Logs** to debug integration behavior without
exposing secrets. Rows include fields such as endpoint family, method, path,
pack ID, token label or prefix, status code, charged credits, pricing rule
version, and `trace_id`.

Keep the `trace_id` with support tickets, application logs, and user-visible
decisions. It is the fastest way to connect a downstream answer to the API
request that produced it.

## Workspace Settings

Use **Workspace Settings** for customer-visible account details such as display
name, billing contact email, and plan-allowed pack selection. Subscription
management lives under **Billing**.

Team invitations and enterprise SSO are deployment-specific. If your team needs
an organization rollout, contact Esheria from the dashboard sign-in page.

## CLI Equivalents

The dashboard is the easiest self-serve entry point, but the CLI exposes the
same token and billing primitives for automation:

```bash theme={null}
pip install esheria

esheria tokens list --format json
esheria tokens create --name "Production data token"
esheria tokens revoke "$TOKEN_ID"

esheria billing balance
esheria billing usage --limit 25 --format json
esheria billing plans
esheria billing checkout --sku-id developer-topup-1000
```

MCP does not expose token or billing mutation tools. Use the dashboard or CLI
for token and billing management before configuring `esheria-mcp`.

## Safety Checklist

* Create separate data tokens for development, staging, production, and each
  major integration.
* Store token secrets in a server secret manager or local environment variable.
* Revoke tokens immediately when they are exposed or no longer needed.
* Do not place API tokens in browser bundles, screenshots, documentation,
  issue trackers, logs, or agent transcripts.
* Use dashboard usage rows and `trace_id` values for debugging instead of raw
  token secrets.
