Guides

Sign the Contact out

When the person signs out of your app, the chat starts over, anonymous.

Updated October 18, 2026

The samples show app_your_app_key. Open this guide from App settings > Developers > Getting started to see your App’s key in them.

On sign-out, tell the chat. The device leaves the Verified Contact and starts over, with an Anonymous Contact and an empty Conversation. The Verified Contact’s Conversation stays as it is. If the person signs in again on this device, they need the emailed code again.

async function logOut() {  await fetch("/api/logout", { method: "POST" });  window.zean.signOut();}

Good to know

  • To switch from one person to another, pass the new user directly: the first one leaves the device.
  • With React Native, a sign-out asked before ZeanChat has started applies as soon as it starts.
  • Signing out starts over with a new Anonymous Contact, without the custom attributes sent so far: send the next person’s after identifying them.
  • Nothing to do on your server.