Purge the current demo tenant (called on logout).
POST
/v1/demo/end
const url = 'https://api.emite.cr/v1/demo/end';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://api.emite.cr/v1/demo/endCalled by the web BFF on logout. When the active company of the session is a demo company, it is deleted right away with all its data — its demo user and sessions included — instead of waiting for it to expire, and the answer is { purged: true }. For any other caller (a real company, a session without a company, an API key) nothing happens and the answer is { purged: false }.
Responses
Section titled “Responses”Media typeapplication/json
object
purged
required
true when the active company of the session was a demo and it was deleted; false for any other caller, for whom nothing happens.
boolean
Examplegenerated
{ "purged": true}