Hanzo
OpenapiIam

Ends a sign-in and sends the browser somewhere sensible. — POST /v1/iam/oauth/logout

Ends a sign-in and sends the browser somewhere sensible. Accepts GET or POST, so it works as a plain link.

POST /v1/iam/oauth/logout

Addresshttps://api.hanzo.ai/v1/iam/oauth/logout
MethodPOST
Operationpost_iam_oauth_logout
AuthAuthorization: Bearer $HANZO_API_KEY

Ends a sign-in and sends the browser somewhere sensible. Accepts GET or POST, so it works as a plain link.

It ACTUALLY signs you out — worth stating, because a logout that computes a redirect and answers {"status":"ok"} while ending no session and revoking no token is worse than none: the person on the shared machine believes it worked. Three things happen here, in this order:

  1. The browser session dies — sid revoked server-side AND the cookie expired (sessions.Clear). Server-side revocation is the load-bearing half: a copy of the cookie taken before logout must not still resolve.
  2. The relying party's tokens are revoked when an id_token_hint names it, so the refresh token cannot mint a fresh access token after the human left. Revocation state is authoritative — a JWT's exp still reads valid for days, so expiry is necessary but never sufficient.
  3. Only then is a redirect considered, and only to a REGISTERED uri.

The open-redirect guard is unchanged: a redirect happens only when a VERIFIED id_token_hint identifies the application and that application has registered the target. Anything else refuses to redirect — nobody can turn your logout link into a redirect to a site of their choosing.

Request

The document declares no body for POST /v1/iam/oauth/logout. 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 post_iam_oauth_logout, 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 iam oauth logout create

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page