Hanzo
OpenapiTeam

Store the session token as this browser's cookie

Writes the team session token into the HttpOnly `account-token` cookie — Secure, SameSite=Lax, whole-origin scope, thirty days — and answers {"result":…

PUT /v1/team/account/cookie

Addresshttps://api.hanzo.ai/v1/team/account/cookie
MethodPUT
Operationput_team_account_cookie
AuthAuthorization: Bearer $HANZO_API_KEY

Writes the team session token into the HttpOnly account-token cookie — Secure, SameSite=Lax, whole-origin scope, thirty days — and answers {"result": true}. This is how the client turns the token it caught off the OAuth bounce into a credential page JS can no longer read, which IS the security property: script that cannot see the cookie cannot exfiltrate it, and every later call on the files, billing and collaborator planes authenticates from it when no bearer is sent.

The token is VERIFIED — signature and expiry, against this service's own signing secret — BEFORE it is stored. Anything this service did not sign is 401 and nothing is written; persisting a caller-supplied value unchecked would be a session-fixation door, where an attacker pins a cookie the victim's browser then presents as its own.

The token may arrive as token in the JSON body or, when the body is absent or unparseable, from the Authorization bearer — an unreadable body is NOT an error here. The sibling DELETE clears this same cookie and signs the browser out of team only: the IAM cookie set alongside it is a different credential with its own lifetime and is left alone.

Request

The document declares no body for PUT /v1/team/account/cookie. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask the MCP door's describe for put_team_account_cookie, which answers from the running route.

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo team account cookie replace

Team API · All Hanzo APIs · Interactive reference

How is this guide?

On this page