Skip to main content
POST
/
auth
/
logout
curl -X POST "https://api.tktchurch.com/v1/auth/logout" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIs..."
  }'
// No content
This endpoint requires authentication. Include the JWT access token in the Authorization header.

Request Body

refresh_token
string
Optional refresh token to revoke. If provided, both access and refresh tokens will be blacklisted.

Response

A successful request returns HTTP 204 No Content status. The following actions are performed:
  1. The current access token is blacklisted
  2. The refresh token is blacklisted (if provided)
  3. The user’s validSince timestamp is updated, invalidating all previous tokens
  4. Expired blacklisted tokens are cleaned up from the database

Error Responses

error
object
Error details when the request fails
Common error cases:
  • 401 Unauthorized: Missing or invalid access token
  • 401 Unauthorized: Token has expired
  • 404 Not Found: User not found
curl -X POST "https://api.tktchurch.com/v1/auth/logout" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIs..."
  }'
// No content