Logout API call

I’m trying to log out a user of all his sessions programmatically using the JupyterHub api. For the moment I can log out a user out of all his server sessions by deleting his oauth tokens by using [DEL] /users/{name}/tokens/{token_id}.

The thing I don’t know is how I can log the user out of /hub. How do I reproduce the behavior of when a user clicks on logout on his home page, using the api?