POST
/v1/logout
const url = 'https://app.caprid.com/v1/logout';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.caprid.com/v1/logoutEnds the calling session and clears its cookie. Works with an expired cookie, or none.
A session that came from WorkOS also has a WorkOS session to end, which only the browser can do. The response says where to send it.
Responses
Section titled “Responses”Logged out here. Send the browser to logout_url to end the WorkOS session too.
Media typeapplication/json
object
logout_url
required
string format: uri
Example generated
{ "logout_url": "https://example.com"}Logged out.