---
title: "Revoke the current credential"
description: "Revokes the current API key or ends the WorkOS session associated with the current access token; a matching revocation fence invalidates cached authentication and closes the terminal and port-proxy…"
canonical: "https://www.cool.computer/docs/api-reference/authentication/revoke-the-current-credential"
---
# Revoke the current credential

> Revokes the current API key or ends the WorkOS session associated with the current access token; a matching revocation fence invalidates cached authentication and closes the terminal and port-proxy…

```http
POST https://api.cool.computer/api/auth/logout
```

Revokes the current API key or ends the WorkOS session associated with the current access token; a matching revocation fence invalidates cached authentication and closes the terminal and port-proxy sessions the credential opened immediately. A process that misses the fence still refuses later requests within the five-second authentication cache, but closes the sessions already open in it only when the fence reaches it.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Responses

- `204`: The current bearer credential was revoked.
- `401`: Unauthorized.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/auth/logout" \
  -H "authorization: Bearer $TOKEN"
```
