Launch Week 02 wrapped — explore all five launches

Create Project Audit Log Export

POSThttps://api.confident-ai.com/v1/projects/{projectId}/audit-logs/exports

Starts an export of a single project's audit logs as a gzipped CSV.

Send an empty body ({}) to export all audit logs ever recorded for the project. Supply startTime and endTime to export a window instead.

The export runs in the background: this endpoint returns 202 immediately with an export id. 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 be running per project at a time — starting a second returns 409 until the first finishes.

POST/v1/projects/{projectId}/audit-logs/exports
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 '{}'
202
{
  "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_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The unique identifier of the project.

Request body

  • startTimestring

    Start of the window to export (inclusive), as an ISO 8601 timestamp. Omit along with endTime to export all time.

  • endTimestring

    End of the window to export (inclusive), as an ISO 8601 timestamp. Omit along with startTime to export all time.

  • searchTermstring

    Only 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.

  • successboolean

    Indicates if the request was successful

  • dataobject

    Show 1 propertyHide 1 property
    • auditLogExportobject

      Show 12 propertiesHide 12 properties
      • idstring

        The unique identifier of the export.

      • projectIdstring

        The project the export is scoped to, or null for an organization-wide export.

      • organizationIdstring

        The organization the export belongs to.

      • userIdstring

        The actor that started the export. api for exports started with an organization API key.

      • statusenum

        The current state of the export.

        Show 3 enum valuesHide 3 enum values
        • IN_PROGRESS
        • COMPLETED
        • ERRORED
      • exportTypeenum

        Always AUDIT_LOGS for audit log exports.

        Show 1 enum valueHide 1 enum value
        • AUDIT_LOGS
      • startTimestring

        Start of the window the export covers. For an all-time export this is the timestamp of the oldest audit log found.

      • endTimestring

        End of the window the export covers. For an all-time export this is the timestamp of the newest audit log found.

      • rowCountinteger

        The number of audit logs written to the file. null until the export completes.

      • errorMessagestring

        Why the export failed, when status is ERRORED.

      • createdAtstring

        When the export was started.

      • completedAtstring

        When the export finished or failed. null while it is still running.

Built byConfident AI