Away mode lets talent set a temporary availability status with an optional message. When active, an away banner is displayed on their public Z Link page. Away mode is informational only — it does not block offer creation.
Endpoint: PUT /api/account/away
Auth: Required (account owner)
Request body:
| Field | Type | Description |
|---|---|---|
awayUntil | ISO date string or null | When the talent returns. null clears away mode. |
awayMessage | string or null | Optional message shown on Z Link |
Validation:
awayUntil must be a valid ISO date string when providedawayMessage is trimmed; empty strings become nullImplementation: apps/zooly-app/app/api/account/away/route.ts
Two columns on the account table:
| Column | Type | Description |
|---|---|---|
away_until | timestamptz | When the talent returns (null = not away) |
away_message | text | Optional message |
The setAwayMode(id, awayUntil, awayMessage) function in packages/db/src/access/account.ts explicitly sets both fields, supporting null values to clear away mode. This is separate from updateAccount which strips null values.
The public Z Link page at apps/zooly-app/app/(pages)/z/[handle]/page.tsx checks:
account.awayUntil exists and is in the future, the away banner is shownawayMessage (if set)| File | Role |
|---|---|
apps/zooly-app/app/api/account/away/route.ts | API endpoint |
packages/db/src/access/account.ts | setAwayMode access function |
apps/zooly-app/app/(pages)/z/[handle]/page.tsx | Z Link away banner display |
packages/types/src/types/Account.ts | awayUntil and awayMessage type fields |