Skip to main content
POST
https://api-dev.weir.ai/
/
auth
/
logout
curl -X POST 'https://api.weir.ai/auth/logout' \
  -H 'Content-Type: application/json' \
  -d '{
    "refreshToken": "admin_refresh_123456789"
  }'
{
  "message": "Logout successful",
  "status": "success"
}

Admin Logout

Logout admin user and invalidate refresh tokens.
curl -X POST 'https://api.weir.ai/auth/logout' \
  -H 'Content-Type: application/json' \
  -d '{
    "refreshToken": "admin_refresh_123456789"
  }'
{
  "message": "Logout successful",
  "status": "success"
}

Request Body

refreshToken
string
required
Admin refresh token to invalidate.

Usage Examples

const adminLogout = async (refreshToken) => {
  const response = await fetch('https://api.weir.ai/auth/logout', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ refreshToken })
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};