---
title: "Turn prompt and response logging on or off, and choose how long it is kept"
method: POST
path: "/client/log-requests"
tags: ["Account"]
---

# Turn prompt and response logging on or off, and choose how long it is kept

`POST /client/log-requests`

## Request

- Base URL: `https://api.roar-ai.com`
- URL: `https://api.roar-ai.com/client/log-requests`
- Auth: HTTP bearer

Account-wide. `enabled: false` stops storing content and deletes what is stored; we keep metadata only, so `GET /client/requests/{id}` has nothing to return for those calls. `retention` is how long stored content is kept: `7d`, `30d` (the default) or `forever` (until you delete it or turn logging off). A new retention applies to what is already stored, so a shorter one deletes older content at once. Requires `projects:write`.

## Request body

- object
  - `enabled` boolean
  - `retention` '7d' | '30d' | 'forever'

## Response `200`

Applied

## Other responses

- `403`: Key lacks projects:write

---

[API](https://skmtc.dev/roar-ai/apis/roar-ai-api.md) · [All operations](https://skmtc.dev/roar-ai/apis/roar-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/roar-ai/apis/roar-ai-api/revisions/37e4d0d5a7fe?raw)
