WorkOS Audit Logs API

Create and query audit log events.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /audit_logs/actions List audit log actions · List Actions #
Ask an LLM
“Which actions are audited in my environment?”
“Can I page through the audit log actions?”
Tell an agent
List all audit log actions.
Show audit log actions ordered {order}.
POST /audit_logs/actions/{actionName}/schemas Create an audit log schema · Create Schema #
Ask an LLM
“How do I validate incoming audit events for a new action?”
“Does creating an audit log schema also create the action if it doesn't exist?”
Tell an agent
Create an audit log schema for {actionName} with targets {targets}.
Add a schema to {actionName} that validates events from {targets}.
GET /audit_logs/actions/{actionName}/schemas List schemas for an audit action · List Schemas #
Ask an LLM
“What schema is used to validate events for a given audit action?”
“Can I see the schema for one audit log action?”
Tell an agent
List the schemas for audit action {actionName}.
Show the validation schema of {actionName}.
POST /audit_logs/events Record an audit log event · Create Event #
Ask an LLM
“How do I record a login or change as an audit event?”
“Can I prevent duplicate audit events with an idempotency key?”
Tell an agent
Record audit event {event} for organization {organization_id}.
Log event {event} for {organization_id} with idempotency key {idempotency_key}.
POST /audit_logs/exports Export audit log events · Create Export #
Ask an LLM
“How do I export audit logs for a date range?”
“Can I filter an audit log export by action or actor?”
Tell an agent
Export audit logs for organization {organization_id} from {range_start} to {range_end}.
Export audit logs for {organization_id} between {range_start} and {range_end} for actions {actions}.
GET /audit_logs/exports/{auditLogExportId} Get an audit log export · Get Export #
Ask an LLM
“Where do I download an audit log export?”
“How long does an audit log export URL stay valid?”
Tell an agent
Get audit log export {auditLogExportId}.
Download the audit log export {auditLogExportId}.
GET /organizations/{id}/audit_logs_retention Get audit log retention · Get Retention #
Ask an LLM
“How long are audit log events kept?”
“What retention period is configured for my organization?”
Tell an agent
Get the audit log retention period for organization {id}.
Show how many days audit events are retained for {id}.
PUT /organizations/{id}/audit_logs_retention Set audit log retention · Set Retention #
Ask an LLM
“How long should audit log events be retained?”
“Can I change the audit log retention period?”
Tell an agent
Set audit log retention for organization {id} to {retention_period_in_days} days.
Keep audit events for {id} for {retention_period_in_days} days.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/workos:workos-audit-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

workos-audit-logs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WorkOS Audit Logs API
  description: WorkOS REST API
  version: '1.0'
  contact:
    name: WorkOS
    url: https://workos.com
    email: support@workos.com
  license:
    name: MIT
    url: https://opensource.org/license/MIT
servers:
- url: https://api.workos.com
  description: Production
- url: https://api.workos-test.com
  description: Staging
security:
- bearer: []
tags:


# --- truncated at 32 KB (34 KB total) ---
# Full source: https://artifacts.apis.io/workos/openapi/workos-audit-logs-api-openapi.yml