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

# Quickstart

> Create an API token, make your first authenticated call, and read the response envelope. About two minutes, start to finish.

You'll create a token, ask the API who it thinks you are, then list your cloud servers.

**1. Create a token**

In the [client area](https://my.server.express), open **Settings → API tokens** and create one. Give it a name you'll recognise later, and tick `services:read`. That's all this walkthrough needs.

Copy the token straight away. It's shown **once** and we only keep a hash, so if you lose it you revoke it and make another.

Put it in an environment variable rather than pasting it into commands:

```bash theme={null}
export SE_TOKEN="se_live_..."
```

**2. Check the token**

`GET /v1/auth/whoami` accepts any valid token, whatever its scopes. It tells you who the credential belongs to and what it may do:

```bash theme={null}
curl https://my.server.express/api/v1/auth/whoami \
  -H "Authorization: Bearer $SE_TOKEN"
```

```json theme={null}
{
  "success": true,
  "data": {
    "id": "cm1x...",
    "email": "you@example.com",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "role": "client",
    "emailVerified": true,
    "credential": "api_token",
    "tokenName": "Quickstart",
    "scopes": ["services:read"],
    "admin": false
  }
}
```

If `scopes` isn't what you expected, fix it now. Scopes are fixed when a token is created, so widening one means making a new token.

**3. List your cloud servers**

```bash theme={null}
curl https://my.server.express/api/v1/cloud \
  -H "Authorization: Bearer $SE_TOKEN"
```

You get your cloud services, newest first. Use `/v1/dedicated` for dedicated servers. Both need `services:read`.

**4. Read the envelope**

Every response has the same outer shape, success or failure:

```json theme={null}
{ "success": true, "data": [] }
```

```json theme={null}
{ "success": false, "error": "This token is missing the \"services:power\" scope." }
```

Check `success` first, then read `data`. On failure, `error` is a sentence written for a person. Log it or show it, but don't branch on its wording. Branch on the HTTP status instead. [Errors and rate limits](https://docs.server.express/errors-and-rate-limits.md) lists every status code.

## Next steps

> **[Pick your scopes](https://docs.server.express/authentication.md)**
>
> What each of the 14 scopes grants, and which ones can spend money or destroy data.

> **[Drive your servers](https://docs.server.express/guides/servers.md)**
>
> Power, rescue, snapshots, reinstall and cancellation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.