curl --request POST \
--url https://api.example.com/api/logout \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'{
"message": "<string>",
"error": "<string>"
}Invalidate a user’s session token
curl --request POST \
--url https://api.example.com/api/logout \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'{
"message": "<string>",
"error": "<string>"
}"no token provided" - Token field is missing from request"invalid token" - Token does not exist or has already been invalidatedcurl -X POST https://api.mirage.com/api/logout \
-H "Content-Type: application/json" \
-d '{
"token": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8"
}'
{
"message": "logged out successfully"
}