For the complete documentation index, see llms.txt. This page is also available as Markdown.

Logout

Logout endpoint documentation

End a user session.

Endpoint: /user/logout Method: POST

{
    sessionJwt: string; // Active session JWT
}
{
    message: string;
}
{
    error: string;
}

Example Usage

const timestamp = Date.now().toString();
const body = {
    sessionJwt: 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...' // Active session JWT
};

const hmac = generateHmacSignature(timestamp, body, secretKey);

const response = await axios.post(apiEndpoint + '/user/logout', body, {
    headers: {
        apikey: apiKey,
        signature: hmac,
        timestamp: timestamp
    }
});

After logout, the session JWT becomes invalid and cannot be used for further API calls.

Last updated