API reference

API reference · Recorder

Switch capture on or off for one key

PATCH/api/traces/captureSigned in session

Shortening the window applies to bodies already stored under that key, so asking for one hour means one hour for everything.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
keyIdrequiredinteger
enabledrequiredboolean
retentionHoursintegerFrom 1 to 720.

Example

{
  "keyId": 0,
  "enabled": false,
  "retentionHours": 1
}

Answer 200

The saved setting.

Fields of the 200 answer
FieldTypeWhat it is
settingCaptureSetting
setting.keyIdinteger
setting.enabledbooleanOff until switched on. Nothing is stored for a key that never asked.
setting.retentionHoursinteger1 to 720. Bodies are deleted once the window passes.
setting.updatedAtinteger

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter