Audit Log

Organization-level audit events that record who did what in your Factory organization, including event structure, sources, and types.

The Factory audit log records organization-level events so you can track who did what in your organization. Each event captures who acted, where the action originated, what was affected, and structured details about the change.

Info

Enterprise Feature -- The audit log is available to Enterprise organization owners only. Owners can view the audit log in the Factory web app under Team Settings, or via the public API.

Event structure

Every audit event shares the following fields:

FieldTypeDescription
eventTypestringThe category of event (see below).
actorobject or nullThe user or service principal who initiated the event. null when the event was system-initiated (no human or service principal involved).
sourcestringThe surface that originated the event (see below).
targetobjectIdentifiers for the affected entity (e.g. userId, email, serviceAccountId).
payloadobject or nullStructured, event-specific details. Contains only IDs and enum values, never secrets. null when the event has no structured payload.
createdAtstringISO 8601 timestamp of the event.

Actor

FieldTypeDescription
principalKindstring"human" or "service".
principalIdstringThe actor's unique ID.
emailstring or nullActor email, if available.
rolestringActor's organization role at the time of the event.

Event sources

The source field identifies where the event originated.

SourceDescription
web_settings_usageUsage and billing settings page in the web app.
web_settings_membersMembers management page in the web app.
web_settings_api_keysAPI keys management page in the web app.
web_settings_service_accountsService accounts management page in the web app.
web_settings_integrationsIntegrations management page in the web app.
web_settings_orgOrganization settings page in the web app.
web_settings_billingBilling and subscription page in the web app.
public_api_v0Public REST API (v0).
workos_eventDirectory sync or identity provider webhook event.

Event types

user_limit_change

A per-user token usage limit was set, changed, or cleared for the organization.

Sources: web_settings_usage, public_api_v0, workos_event

Target:

FieldTypeDescription
userIdstring or nullThe user whose limit changed. null for org-wide limit changes.
emailstring or nullThe user's email. null for org-wide limit changes.

Payload:

FieldTypeDescription
scopestring"global" (org-wide limit) or "individual" (per-user limit).
toTokensnumber or nullThe new standard-tier token limit. null when the limit was cleared.

Example:

JSON
{
  "eventType": "user_limit_change",
  "source": "web_settings_usage",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "admin@corp.com",
    "role": "owner"
  },
  "target": { "userId": "user_xyz", "email": "dev@corp.com" },
  "payload": { "scope": "individual", "toTokens": 500000 }
}

membership_change

A member's role, invitation status, or membership in the organization changed.

Sources: web_settings_members, public_api_v0, workos_event

Target:

FieldTypeDescription
userIdstring or nullThe affected user's ID. null for pending invitations.
emailstring or nullThe affected user's email.

Payload (web app and public API sources):

FieldTypeDescription
intentstringThe specific membership action (see below).
fromRolestring or nullPrevious role. Present for role_change; omitted when no previous role existed.
toRolestringNew role. Present for invite and role_change.
workosMembershipIdstring or nullMembership ID. null for invites (no membership exists yet).

Intent values:

IntentDescription
role_changeA member's role was changed.
removeA member was removed from the organization.
inviteAn invitation was sent to a new user.
revoke_inviteA pending invitation was revoked.

Payload (workos_event source): Contains a filtered projection of the original identity provider event (workosEventType, role, status) rather than the structured payload above.

Example:

JSON
{
  "eventType": "membership_change",
  "source": "web_settings_members",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "admin@corp.com",
    "role": "owner"
  },
  "target": { "userId": "user_xyz", "email": "dev@corp.com" },
  "payload": {
    "intent": "role_change",
    "fromRole": "user",
    "toRole": "manager",
    "workosMembershipId": "mem_123"
  }
}

api_key_lifecycle_change

A Factory API key was created or deleted.

Sources: web_settings_api_keys, web_settings_service_accounts

Target:

FieldTypeDescription
userIdstringThe key owner's user ID.
emailstring or nullThe key owner's email.

Payload:

FieldTypeDescription
intentstring"created" or "deleted".
apiKeyIdstringThe API key ID.
serviceAccountIdstring or nullPresent only for service-account keys. Its presence distinguishes user keys from service-account keys.

Example:

JSON
{
  "eventType": "api_key_lifecycle_change",
  "source": "web_settings_api_keys",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "dev@corp.com",
    "role": "user"
  },
  "target": { "userId": "user_abc", "email": "dev@corp.com" },
  "payload": { "intent": "created", "apiKeyId": "key_xyz" }
}

service_account_change

A service account was created, modified, deleted, or had its git credentials or act-as grants changed.

Sources: web_settings_service_accounts

Target:

FieldTypeDescription
serviceAccountIdstringThe service account ID.

Payload:

FieldTypeDescription
intentstringThe specific service-account action (see below).
serviceAccountIdstringThe service account ID.
toStatusstring or nullNew status. Present for status_changed only.
integrationstring or nullIntegration name. Present for git-credential intents only.
grantIdstring or nullAct-as grant ID. Present for act_as_grant_minted only. Never includes the grant's secret value.

Intent values:

IntentDescription
createdA new service account was created.
status_changedThe service account's status was changed (e.g. active or disabled).
deletedThe service account was deleted.
git_credential_setA git credential was set for the service account.
git_credential_revokedA git credential was revoked for the service account.
act_as_grant_mintedAn act-as delegation grant was minted for the service account.

Example:

JSON
{
  "eventType": "service_account_change",
  "source": "web_settings_service_accounts",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "admin@corp.com",
    "role": "manager"
  },
  "target": { "serviceAccountId": "sa_xyz" },
  "payload": { "intent": "created", "serviceAccountId": "sa_xyz" }
}

integration_change

An integration was connected, disconnected, configured, or had its availability toggled.

Sources: web_settings_integrations

Target:

FieldTypeDescription
integrationstringThe integration type identifier.

Payload:

FieldTypeDescription
intentstringThe specific integration action (see below).
integrationstringThe integration type identifier.
scopestring"org" (org-level connection) or "user" (single user's connection).
availableboolean or nullNew availability state. Present for availability_changed only.

Intent values:

IntentDescription
connectedAn integration was connected.
disconnectedAn integration was disconnected.
configuredAn integration was configured (e.g. GitLab Self-Hosted setup).
availability_changedAn integration's availability was toggled on or off for the organization.

Example:

JSON
{
  "eventType": "integration_change",
  "source": "web_settings_integrations",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "dev@corp.com",
    "role": "user"
  },
  "target": { "integration": "github_personal" },
  "payload": {
    "intent": "disconnected",
    "integration": "github_personal",
    "scope": "user"
  }
}

organization_lifecycle_change

An organization was created or deactivated.

Sources: web_settings_org

Target: {} (the organization itself is the target).

Payload:

FieldTypeDescription
intentstring"created" or "deactivated".
workosOrgIdstring or nullThe affected WorkOS organization ID, when known.

Example:

JSON
{
  "eventType": "organization_lifecycle_change",
  "source": "web_settings_org",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "founder@corp.com",
    "role": "owner"
  },
  "target": {},
  "payload": { "intent": "created", "workosOrgId": "org_123" }
}

managed_settings_change

The organization's managed settings were updated.

Sources: web_settings_org

Target: {} (the organization itself is the target).

Payload:

FieldTypeDescription
updatedKeysstring[]Top-level managed-settings keys included in the update.
revisionnumberThe resulting managed-settings revision number. Links to an immutable per-revision snapshot for before/after diffing.

Example:

JSON
{
  "eventType": "managed_settings_change",
  "source": "web_settings_org",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "admin@corp.com",
    "role": "manager"
  },
  "target": {},
  "payload": { "updatedKeys": ["defaultModel", "allowedModels"], "revision": 5 }
}

analytics_settings_change

The organization's analytics settings were updated.

Sources: web_settings_org

Target: {} (the organization itself is the target).

Payload:

FieldTypeDescription
defaultBillingPeriodOnlybooleanThe new value for the org-wide "Current billing period only" toggle in the analytics overview.

Example:

JSON
{
  "eventType": "analytics_settings_change",
  "source": "web_settings_org",
  "actor": {
    "principalKind": "human",
    "principalId": "user_abc",
    "email": "owner@corp.com",
    "role": "owner"
  },
  "target": {},
  "payload": { "defaultBillingPeriodOnly": true }
}