Audit log#
Query audit log entries to track changes made across your organization.
List audit log#
List audit log entries with structured filtering. Use entityType to filter by category (e.g. "creator", "campaign", "activity") and action to filter by what happened (e.g. "created", "deleted", "updated", "linked"). This is the preferred action for questions like "show creator entries" or "show deletions".
const { items, totalCount, facets } = await bw.auditLog.list({
pageIndex: 0,
pageSize: 25,
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| pageIndex | integer | Required | Zero-based page index for pagination. |
| pageSize | integer | Required | Number of items per page (1-100). |
| organizationId | string (UUID) | Required | Organization identifier. |
| searchTerm | string | — | Free-text search term to filter results (max 200 characters). |
| sortBy | string | — | Column name to sort by. |
| sortDirection | 'asc' | 'desc' | — | Sort direction: ascending or descending. |
| entityType | 'activity' | 'campaign' | 'creator' | 'conversion' | 'conversion_source' | 'campaign_activity' | 'activity_creator' | 'cost' | 'note' | 'organization' | 'user' | — | Filter by entity type. |
| entityId | string (UUID) | — | Filter by specific entity identifier. |
| action | 'created' | 'updated' | 'deleted' | 'linked' | 'unlinked' | 'refreshed' | 'attributed' | 'restored' | — | Filter by action type. |
| relatedActivityId | string (UUID) | — | Filter by related activity. |
| relatedCampaignId | string (UUID) | — | Filter by related campaign. |
| relatedCreatorId | string (UUID) | — | Filter by related creator. |
| startDate | string (ISO 8601) | null | — | Start of the date range filter. |
| endDate | string (ISO 8601) | null | — | End of the date range filter. |
Response#
Returns { items, totalCount, facets } with paginated results.
Search audit log#
Search audit log entry content using full-text matching across names, titles, and descriptions inside changes and metadata. Use this when looking for specific text in the data values, e.g. a creator name or activity title. Do NOT use this to filter by entity type or action — use list-audit-log with entityType/action filters instead.
const { items, totalCount, facets } = await bw.auditLog.search({
organizationId: 'org_123',
query: '...',
pageIndex: 0,
pageSize: 25,
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| query | string | Required | Full-text search query (1-500 characters). |
| pageIndex | integer | Required | Zero-based page index. |
| pageSize | integer | Required | Number of items per page (1-100). |
| startDate | string (ISO 8601) | null | — | Start of the date range filter. |
| endDate | string (ISO 8601) | null | — | End of the date range filter. |
Response#
Returns { items, totalCount, facets } with paginated results.