Open the app window's web session
curl --request POST \ --url https://example.com/api/v1/auth/window-session \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "challenge": "example", "redirectTo": "example" }'Issues a one-time code (60 seconds) that opens a normal web session for the window of the desktop, iPhone or Android app. Only the full REST sign-in of one of those apps may call it, held by a team member, or by a client when the organization has Client apps on and its client portal verified on its own domain; every other caller (a session cookie, an API token, another app, an MCP client) is refused with 403. A client’s sign-in reaches no other /api/v1 route: each answers 403. The code is bound to this sign-in and to challenge: the app sets the verifier as a cookie in its own window for the host of url (host-only, HttpOnly, Path=/, raw value), then opens url: the server’s own address for a team member, the client portal domain for a client. The cookie name depends on the scheme of the server’s address: __Host-window_session_verifier (also Secure) on https, window_session_verifier on http, and the server reads only that one. Without the cookie the link does nothing. The session it opens ends when this sign-in is revoked, signing out of the window revokes this sign-in, and the session cannot create an API token, passkey, push subscription or other credential: those need the browser.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
base64url(SHA-256(verifier)) without padding, 43 characters. The app keeps the verifier, 43 to 128 characters of A-Z a-z 0-9 - . _ ~, and sets it as the verifier cookie in its own window before opening the link: __Host-window_session_verifier on https, window_session_verifier on http (localhost).
Path the window lands on once it has the session. Anything that is not a path on the same host (not starting with a single /) becomes /. For a client, a portal path as Chelsea writes it (/portal/...) opens on the portal domain; any other path opens the portal’s home.
Example generated
{ "challenge": "example", "redirectTo": "example"}Responses
Section titled “Responses”Code issued.
object
One-time code that opens the app window’s web session.
object
One-time code. The window opens url; on a server that sends no url, /auth/handoff?token=<code> on the same host.
When the code stops working.
The full /auth/handoff link that redeems the code. A team member’s opens on the server’s own address; a client’s on the organization’s client portal domain. The app sets the verifier cookie for the host of this URL before opening it. Absent on an older server.
Example generated
{ "data": { "code": "example", "expiresAt": "2026-04-15T12:00:00Z", "url": "https://example.com" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC