Audit Log

A log of the API requests made with your team's keys, in the key's mode: a test key sees test requests, a live key live ones. Filter by method, status, time window or key. Any other filter is a 400.

The Audit Log Entry object

id string

Log entry ID

object string

Always audit_entry

method string

HTTP method of the request

endpoint string

Path the request called

statusCode integer

HTTP status the API answered

responseTimeMs integer

How long the API took to answer

requestId string

The request_id of the response

apiKeyId string

ID of the API key that made the request (null when the key never resolved, as on a 401, and on requests logged before Oct 25, 2026)

ipAddress string

IP address the request came from

userAgent string

User-Agent header of the request

isTest boolean

Whether a test key made the request

timestamp datetime

When the request was made

Endpoints

GET /api/v1/teams/{teamId}/audit-log

List Audit Log

List API requests, newest first. Filters combine; an unknown filter or a malformed value is a 400 that names it.

Query Parameters

method string

Only requests with this HTTP method (GET, HEAD, POST, PATCH, PUT or DELETE)

status string

A status code like 404 or a class like 4xx

since string

Time window back from now, like 30m, 24h or 7d (at most 366 days)

Default: 24h

apiKeyId string

Only requests made with this key

page integer

Page number (1-indexed)

Default: 1

pageSize integer

Results per page (max 100)

Default: 20

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/audit-log?status=4xx&since=7d" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Audit log entries
json
{
  "success": true,
  "data": [
    {
      "id": "5f0c8a52-3b1d-4c6e-9a7f-2d4e6b8c0a13",
      "object": "audit_entry",
      "method": "POST",
      "endpoint": "/api/v1/teams/{teamId}/tickets",
      "statusCode": 201,
      "responseTimeMs": 84,
      "requestId": "req_7c1e2a9b4d6f4e0a",
      "apiKeyId": "0b9c2f4e-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
      "ipAddress": "203.0.113.7",
      "userAgent": "cstar-js/0.18.2",
      "isTest": false,
      "timestamp": "2026-10-25T14:30:00Z"
    }
  ]
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}