01POST /accounts/:account/keys { name, scopes } creates a key (201) and returns a random secret; store only its sha256 hash. Invalid name or scopes is a 400.
02Scopes are "<action>:<resource>" strings with action read or write. GET /projects needs read:projects and POST /projects needs write:projects; the key travels in the x-api-key header.
03GET /accounts/:account/keys lists every key of the account, oldest first. A key id from another account is a 404.
04POST .../keys/:id/rotate issues a replacement key (201) while the old one keeps working for a while; POST .../keys/:id/revoke stops a key immediately.
05Projects belong to the key's account. Time comes from the x-now header when present.
What the hidden tests check
Everything the interviewer tells you is checked.
Old, revoked and under-scoped keys are each probed on both protected routes, at controlled times.
4 more details are held back. In a mock interview they come out only when you ask the interviewer the right question; in practice they are listed in the workspace.