Spanlens records every significant action within your organization. Track who changed what and when — API key creation, provider key additions, member invitations, role changes, and plan switches. View the log directly in Settings → Audit log or query it via the REST API to feed into an external SIEM or compliance tool.
Use cases
Security audits. Determine which keys a departing employee created, or whether admin roles changed at an unexpected time.
Compliance. Satisfy SOC 2, ISO 27001, and similar audit requirements that ask for a change access log on demand.
Incident investigation. If the proxy starts returning auth errors, check the audit log for provider key rotations around that time.
Organization name, security settings, or other org-level config changed
API reference
List logs
GET /api/v1/audit-logs?limit=50&offset=0
# Filter by action
GET /api/v1/audit-logs?limit=50&offset=0&action=api_key.create
# Filter by user
GET /api/v1/audit-logs?limit=50&offset=0&user_id=<uuid>
bash
Query parameters
Parameter
Default
Description
limit
50
Results per page. Maximum 200.
offset
0
Pagination offset.
action
(all)
Filter to a specific action value, e.g. member.invite.
# Fetch the 20 most recent entries
curl "https://spanlens-server.vercel.app/api/v1/audit-logs?limit=20" \
-H "Authorization: Bearer <JWT>"
# Filter to provider key events only
curl "https://spanlens-server.vercel.app/api/v1/audit-logs?action=provider_key.add&limit=50" \
-H "Authorization: Bearer <JWT>"
# Second page (entries 51–100)
curl "https://spanlens-server.vercel.app/api/v1/audit-logs?limit=50&offset=50" \
-H "Authorization: Bearer <JWT>"
bash
Limitations
Admin-only access. Only organization members with the admin role can query audit logs. Editors and viewers are blocked in both the API and the dashboard.
200 rows per page maximum. Passing a limit above 200 returns a 400 error.
Fixed sort order. Results are always returned in created_at DESC order. Sort direction cannot be changed.
Retention. Free plan: 30 days. Pro and above: 1 year. For longer retention, export the log periodically via the API and store it externally.
Proxy requests are not recorded here. LLM request and response history is in Requests and Traces. Audit logs focus on organization configuration changes.