# 3pm-backend route `register`

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: 360
  o200k: 216
# POST /api/auth/register (register)

Create an account: its token comes back once (there is no other way in, keep it) with a session cookie. Only the first account unless the backend runs with `--registration open`; that first account adopts every bucket without an owner.

- auth: none
- body: Register (JSON)
- answer: Registered (JSON)

## Types

```ts
interface Register {
  /** 1–64 characters; not unique. */
  name: string;
}

interface Registered {
  user: UserView;
  /** The secret, `3pmu_…`: returned once, never stored. */
  token: string;
  token_id: string;
  /** Buckets without an owner this first account took over. */
  adopted_buckets: number;
}

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

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