API reference · Bots

Get the audit log

GET/v1/bots/audit

Who created or revoked report tokens, linked wallets, and changed bots and alerts on your account, newest first.

On this page

Auth. An account token (Authorization: Bearer lb_…) or a signed-in web session. A report-only token (lbr_…) is refused here with 403 scope_denied.

Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

Parameters

Query parameters

NameTypeRequiredDescription
limitintegernoHow many entries. 1 to 200. Default 50.

Request

Terminal
curl "https://api.langbot.ai/v1/bots/audit?limit=2" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

200 OK

JSON
{
  "entries": [
    {
      "id": 9,
      "actor": "session",
      "action": "alerts.update",
      "target": "bot_01M6G72RFQRQ8JGNG8T1447GGP",
      "meta": {
        "rules": [
          "daily_loss_usd",
          "drift",
          "email",
          "halted",
          "heartbeat_missing_min",
          "webhook_url"
        ],
        "secret_rotated": true
      },
      "ip": "127.0.0.1",
      "at": 1793693150804
    },
    {
      "id": 8,
      "actor": "session",
      "action": "wallet.link",
      "target": "bw_01M6G72VJ4YE3V9SPJRKD7NK0W",
      "meta": {
        "chain": "polygon",
        "bot_id": "bot_01M6G72RFQRQ8JGNG8T1447GGP",
        "address": "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed"
      },
      "ip": "127.0.0.1",
      "at": 1793693150791
    }
  ]
}

actor is session for the web app, else the id of the API token used. Entries are append-only and never hold a secret.

Errors

StatuscodeWhen
401auth_requiredNo token was sent.
401token_invalidThe token was not recognised (mistyped, revoked or expired).
422validation_errorA parameter failed validation; detail[].loc names it.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.