Skip to main content

List the caller's live CLI sessions

GET 

/api/auth/cli-sessions

List the caller's live CLI sessions. One entry per npx pt login — that is, per refresh-token FAMILY, not per token: a session that has refreshed twenty times is still one row. Browser-session only: the proxy rejects a request that carries no cookies, so a bearer API key cannot enumerate a user's sessions. A non-JSON upstream body is replaced with a DIRECTORY_INVALID_RESPONSE envelope while the UPSTREAM STATUS IS PRESERVED, so a 2xx can carry that error shape instead of data — the 200 schema below models both.

Responses

Successful response