# 3pm-backend route `login`

Paths are relative to the backend's origin (https://fleet.edgecr4ft.net, or your own 3pm-backend), not to this site. Index: https://3pm.edgecr4ft.net/docs/backend/api.md

---

tokens:
  claude: 248
  o200k: 162
# POST /api/auth/login (login)

Trade an account's token for a session cookie — the dashboard's way in; a script sends the token as `Authorization: Bearer` on each request instead.

- auth: none
- body: Login (JSON)
- answer: LoggedIn (JSON)

## Types

```ts
interface Login {
  /** `3pmu_…`, as `register` or `createUserToken` returned it. */
  token: string;
}

interface LoggedIn {
  user: UserView;
}

interface UserView {
  name: string;
  created_at: EpochMs;
}

/** Milliseconds since the Unix epoch. */
type EpochMs = number;
```
