Logout CLI command reference

Logs out of the Sanity.io session

USAGE
  $ sanity logout

DESCRIPTION
  Log out of the current session

Robot token error

If sanity logout returns Cannot delete session for robot user - use delete token endpoint, your CLI is configured with a robot token rather than a user session. Use sanity tokens delete <token-id> to revoke it. See CLI authentication for details.

Was this page helpful?

sanity.ioAll Systems Operational© Sanity 2026
Change site theme