Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

WorkOS audit-logs API

Create and query audit log events.

WorkOS audit-logs API is one of 41 APIs that WorkOS publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include audit-logs. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, a GitHub repository, a changelog, and pricing.

This API exposes 8 operations across 6 paths, and defines 16 schemas. It is described by OpenAPI 3.1.1, at version 1.0.

Requests are made against 2 base URLs: https://api.workos.com, https://api.workos-test.com.

8 operations 6 paths 16 schemas 4 GET3 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.1
API Version
1.0
Base URL
https://api.workos.com
Authentication
HTTP Bearer, HTTP Bearer
Contact
License
Resource Areas
1

Authentication & Security 2

WorkOS audit-logs API declares 2 security schemes for authenticating requests. It accepts HTTP bearer tokens (JWT) (bearer). It accepts HTTP bearer tokens (JWT) (access_token). By default, every request must be authenticated.

  • bearer — Your WorkOS API key prefixed with sk. Pass it as a Bearer token: Authorization: Bearer skexample123456789.
  • access_token — An SSO access token returned from the Get a Profile and Token endpoint.

Paths & Operations 8

Across 6 paths, the API surfaces 8 operations — 4 GET, 3 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

audit-logs 8

Create and query audit log events.

GET
/audit_logs/actions
List Actions
AuditLogValidatorsController_list 4 params → 200404422
POST
/audit_logs/actions/{actionName}/schemas
Create Schema
AuditLogValidatorVersionsController_create 1 param body → 201422
GET
/audit_logs/actions/{actionName}/schemas
List Schemas
AuditLogValidatorVersionsController_schemas 5 params → 200404422
POST
/audit_logs/events
Create Event
AuditLogEventsController_create 1 param body → 200400404422429
POST
/audit_logs/exports
Create Export
AuditLogExportsController_exports body → 201400
GET
/audit_logs/exports/{auditLogExportId}
Get Export
AuditLogExportsController_export 1 param → 200404
GET
/organizations/{id}/audit_logs_retention
Get Retention
AuditLogsRetentionController_auditLogsRetention 1 param → 200404
PUT
/organizations/{id}/audit_logs_retention
Set Retention
AuditLogsRetentionController_updateAuditLogsRetention 1 param body → 200404422

Schemas 16

The contract defines 16 schemas that model the data the API accepts and returns. The most detailed are AuditLogExportCreationDto (8 properties), AuditLogEventDto (7 properties), AuditLogExportJson (6 properties), AuditLogSchemaJson (6 properties). Each schema is shown below with its type and property counts.

AuditLogSchemaActorDto
object
1 property 1 required
PaginationOrder
string
AuditLogSchemaTargetDto
object
2 properties 1 required
AuditLogSchemaDto
object
3 properties 1 required
AuditLogExportCreationDto
object
8 properties 3 required
AuditLogEventCreateResponse
object
1 property 1 required
AuditLogSchemaJson
object
6 properties 4 required
AuditLogEventDto
object
7 properties 5 required
AuditLogEventContextDto
object
2 properties 1 required
AuditLogEventTargetDto
object
4 properties 2 required
AuditLogEventIngestionDto
object
2 properties 2 required
AuditLogActionJson
object
5 properties 5 required
AuditLogExportJson
object
6 properties 5 required
UpdateAuditLogsRetentionDto
object
1 property 1 required
AuditLogsRetentionJson
object
1 property 1 required
AuditLogEventActorDto
object
4 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

workos-audit-logs-api-openapi.yml Raw ↑

Other APIs WorkOS publishes across the network.

WorkOS admin-portal API
WorkOS api_keys API
WorkOS application.client-secrets API
WorkOS applications API
WorkOS authorization API
WorkOS connections API
WorkOS directories API
WorkOS directory-groups API
WorkOS directory-users API
WorkOS events API
WorkOS feature-flags API
WorkOS feature-flags.targets API