Audit logs
Export workspace audit logs for compliance monitoring and SIEM tools, count events, and check the log chain.
- PlanEnterprise
- WhoOwners and admins
- Scopesaudit-logs:read
The key needs the audit-logs:read scope, and its owner must currently be a workspace owner or admin. Keys owned by members and viewers get 403.
Endpoints
Event categories
Pass one or more categories, separated by commas, to categories. An unknown category returns 400. The event names below are examples. The list grows as the product records more events.
authorizationMembership and access policy changes, such as member.invited, member.removed, member.role_changed, and personal_tool.policy_changed.configurationSettings and integration changes, such as admin_controls.updated, security_settings.updated, integration.connected, webhook.created, and webhook.disabled.data_accessExports and sensitive reads, such as data.exported and legal_hold.exported.data_modificationContent and account changes, such as post.created, task.status_changed, project.deleted, media.deleted, and account.deleted.securityCredential and protection events, such as api_key.created, api_key.rotated, api_key.revoked, ip_allowlist.ip_blocked, and legal_hold.created.authenticationA valid filter value for sign-in related events.systemA valid filter value for system-level events.Exported fields
Every JSON record can carry these fields. A field with no value is left out.
idThe record ID. Use it to remove duplicates.organizationIdThe workspace ID.timestamp, timestampUnixWhen the event happened, as an ISO 8601 string and as milliseconds.actorId, actorEmail, actorIp, actorUserAgentWho did it and from where.actorSessionId, actorAuthMethod, actorMfaUsedThe session, how the actor signed in, and whether MFA was used.eventType, eventCategoryThe event name and its category.resourceType, resourceId, resourceNameThe thing the event affected.previousValue, newValueBefore and after values for a change.action, statusWhat was done, and success or failure.metadata, errorMessageEvent details, and the error for a failure.requestIdThe ID of the API request, when there was one.sequenceNumber, logHashThe record's position in the workspace's log and its hash, for integrity checks.Export formats
jsonThe default. Returns logs and a meta object with count, since, until, hasMore, and nextCursor.csvA header row and one row per record, with the same fields in snake_case such as event_type and timestamp_unix. Metadata is a JSON string. The response is an attachment named audit-logs.csv.cefOne Common Event Format line per record, as plain text, for SIEM tools.Every format sets X-Total-Count to the number of records returned and X-Has-More to the same value as hasMore. When more records remain, every format also sets X-Next-Cursor.
Page through a time range
Records come back oldest first, and since and until both include their boundary. When more records remain, the JSON meta.nextCursor and the X-Next-Cursor header hold the cursor for the next page. The cursor is the last sequence number. It is null in the JSON when no records remain.
curl "https://projectfeed.app/api/v1/audit-logs?since=1785580200000&until=1785583800000&categories=authentication,security&limit=1000" -H "Authorization: Bearer pf_YOUR_API_KEY"- Request the range with
limit=1000. - If a cursor came back, request again with it as
cursorand the same filters, range, and format. - Stop when no cursor comes back. You have the whole range.
- Store the range and filters with the records you export, and drop duplicates by
idif you ever restart a range.
Statistics and chain check
GET /audit-logs/stats counts events in a range, which defaults to the last 30 days. byCategory, byStatus, and byRetention are counts, and recentActivity is one count per day. source is counters when daily totals answered the request, or scan when the API counted records directly. A scan reads at most 10,000 records, and truncated is true when it stopped there.
GET /audit-logs/verify walks the hash chain and reports whether any record was edited or removed. It checks up to maxLogs records, from 1 to 10,000, and starts at startSequence when you send one. When valid is false, firstInvalidSequence is the first bad record and errors lists each failure with its sequence number. A value out of range, or a startSequence after endSequence, returns 400.
valid is true only when every record in the range was checked. When more records remain, truncated and hasMore are true, valid is false even if errors is empty, and nextSequence is the startSequence for the next call, and is null when nothing remains. Repeat until hasMore is false.
curl "https://projectfeed.app/api/v1/audit-logs/verify?maxLogs=5000" -H "Authorization: Bearer pf_YOUR_API_KEY"Fix an audit export
400 Bad Request
since is missing or not a number, until is earlier than since, limit is outside 1 to 1000, format, status, or a category is not one of the listed values, more than 20 event types were sent, or the cursor is not valid.
403 Forbidden
Check the audit-logs:read scope, that the key owner is currently an owner or admin, and that the workspace is on Enterprise.
429 Too Many Requests
Wait for Retry-After and poll less often. One request can return up to 1,000 records.
The receiver reports a gap
Compare the stored range boundaries, request the missing range again, and drop duplicates by id before you import.
See API errors and rate limits.