> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4mica.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Log out

> Revoke a refresh token.

`POST /auth/logout`

No authentication. Revokes the refresh token so it can no longer be exchanged. An access token already issued stays valid until it expires.

## Request body

**refresh\_token** `string` *required*

## Responses

**revoked** `boolean` *required*

`true` when the token was active and is now revoked. `false` when it was unknown or already revoked.

```bash cURL theme={null}
curl -X POST "https://base.sepolia.api.4mica.io/auth/logout" \
  -H "Content-Type: application/json" \
  -d '{ "refresh_token": "refresh_3f9a..." }'
```

```javascript title="Fetch" theme={null}
const response = await fetch("https://base.sepolia.api.4mica.io/auth/logout", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ refresh_token: refreshToken }),
});
console.log(await response.json());
```

```python Python theme={null}
import requests
url = "https://base.sepolia.api.4mica.io/auth/logout"
print(requests.post(url, json={"refresh_token": refresh_token}).json())
```

```json 200 OK theme={null}
{ "revoked": true }
```

## Status codes

| Code | Description |
| - | - |
| `200` | The request was processed. Check `revoked`. |
| `500` | Core could not revoke the token. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.