> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifuse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export audit logs

> Streams the entries the filter selects, newest first, as a CSV or NDJSON file download, up to 100 000 rows. When the cap is reached the response ends with an export.truncated marker row; narrow the date range for the rest. The same authorisation as auditLogs.list applies, before the first byte is written. The export is itself recorded as auditLogs.export.




## OpenAPI

````yaml /openapi.json post /api/auditLogs.export
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
  license:
    name: BUSL-1.1
    url: https://github.com/Notifuse/notifuse/blob/main/LICENSE
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/auditLogs.export:
    post:
      tags:
        - Audit logs
      summary: Export audit logs
      description: >
        Streams the entries the filter selects, newest first, as a CSV or NDJSON
        file download, up to 100 000 rows. When the cap is reached the response
        ends with an export.truncated marker row; narrow the date range for the
        rest. The same authorisation as auditLogs.list applies, before the first
        byte is written. The export is itself recorded as auditLogs.export.
      operationId: exportAuditLogs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scope:
                  type: string
                  enum:
                    - workspace
                    - deployment
                  default: workspace
                workspace_id:
                  type: string
                format:
                  type: string
                  enum:
                    - csv
                    - ndjson
                  default: csv
                actions:
                  type: array
                  items:
                    type: string
                categories:
                  type: array
                  items:
                    type: string
                actor_id:
                  type: string
                actor_email:
                  type: string
                actor_type:
                  type: string
                outcome:
                  type: string
                  enum:
                    - success
                    - failure
                    - denied
                target_type:
                  type: string
                target_id:
                  type: string
                ip_address:
                  type: string
                from:
                  type: string
                  format: date-time
                to:
                  type: string
                  format: date-time
      responses:
        '200':
          description: >-
            The file, as text/csv or application/x-ndjson with a
            Content-Disposition attachment header
          content:
            text/csv:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        '400':
          description: Malformed filter or unknown format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````