Create Project Audit Log Export
(v1)POST
Starts a background export of a single project's audit logs as a gzipped CSV, returning 202 with an export id; send {} to export everything or startTime and endTime for a window. Poll Get Project Audit Log Export until status is COMPLETED, then call Download Project Audit Log Export to fetch the file. Only one export can run per project at a time; starting a second returns 409.
curl -X POST "https://api.confident-ai.com/v1/projects/{projectId}/audit-logs/exports" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{}'{
"success": true,
"data": {
"auditLogExport": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"projectId": "project-uuid-1",
"organizationId": "org-uuid-1",
"userId": "api",
"status": "IN_PROGRESS",
"exportType": "AUDIT_LOGS",
"startTime": "2026-03-09T08:12:04.221Z",
"endTime": "2026-08-18T16:44:51.903Z",
"rowCount": null,
"errorMessage": null,
"createdAt": "2026-08-18T16:45:02.118Z",
"completedAt": null
}
}
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe unique identifier of the project.
Request body
startTimestringStart of the window to export (inclusive), as an ISO 8601 timestamp. Omit along with
endTimeto export all time.endTimestringEnd of the window to export (inclusive), as an ISO 8601 timestamp. Omit along with
startTimeto export all time.searchTermstringOnly export audit logs matching this term. Matched against the actor email, API key name, action, method, IP address, resource ID, user agent, and status code.
Response
The export was queued.
successbooleanIndicates if the request was successful
dataobjectShow 1 propertyHide 1 property
auditLogExportobjectShow 12 propertiesHide 12 properties
idstringThe unique identifier of the export.
projectIdstringThe project the export is scoped to, or
nullfor an organization-wide export.organizationIdstringThe organization the export belongs to.
userIdstringThe actor that started the export.
apifor exports started with an organization API key.statusenumThe current state of the export.
Show 3 enum valuesHide 3 enum values
IN_PROGRESSCOMPLETEDERRORED
exportTypeenumAlways
AUDIT_LOGSfor audit log exports.Show 1 enum valueHide 1 enum value
AUDIT_LOGS
startTimestringStart of the window the export covers. For an all-time export this is the timestamp of the oldest audit log found.
endTimestringEnd of the window the export covers. For an all-time export this is the timestamp of the newest audit log found.
rowCountintegerThe number of audit logs written to the file.
nulluntil the export completes.errorMessagestringWhy the export failed, when
statusisERRORED.createdAtstringWhen the export was started.
completedAtstringWhen the export finished or failed.
nullwhile it is still running.