---
descriptions:
  create_export:
    organization_id: The unique ID of the Organization.
    range_start: ISO-8601 value for start of the export range.
    range_end: ISO-8601 value for end of the export range.
    actions: List of actions to filter against.
    actor_names: List of actor names to filter against.
    actor_ids: List of actor IDs to filter against.
    targets: List of target types to filter against.
reference:
  curl:
    - key: create_export
      id: create_export
      url: /reference/audit-logs/create-export
      title: /audit_logs/exports
      type: POST
      parameters:
        - key: organization_id
          type: string
          description: (create_export.organization_id)
        - key: range_start
          type: string
          description: (create_export.range_start)
        - key: range_end
          type: string
          description: (create_export.range_end)
        - key: actions
          type: array
          optional: true
          description: (create_export.actions)
        - key: actor_ids
          type: array
          optional: true
          description: (create_export.actor_ids)
        - key: actor_names
          type: array
          optional: true
          description: (create_export.actor_names)
        - key: targets
          type: array
          optional: true
          description: (create_export.targets)
      returns:
        - (audit_log_export)
  js:
    - key: createExport
      id: create_export
      url: /reference/audit-logs/create-export
      title: auditLogs.createExport()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: organizationId
              type: string
              description: (create_export.organization_id)
            - key: rangeStart
              type: Date
              description: (create_export.range_start)
            - key: rangeEnd
              type: Date
              description: (create_export.range_end)
            - key: actions
              type: 'string[]'
              optional: true
              description: (create_export.actions)
            - key: actor_ids
              type: 'string[]'
              optional: true
              description: (create_export.actor_ids)
            - key: actor_names
              type: 'string[]'
              optional: true
              description: (create_export.actor_names)
            - key: targets
              type: 'string[]'
              optional: true
              description: (create_export.targets)
      returns:
        - (AuditLogExport)
  java:
    - key: createExport
      id: create_export
      url: /reference/audit-logs/create-export
      title: auditLogs.createExport()
      parameters:
        - key: options
          type: CreateExportOptions
          expanded: true
          properties:
            - key: organizationId
              type: String
              description: (create_export.organization_id)
            - key: rangeStart
              type: Date
              description: (create_export.range_start)
            - key: rangeEnd
              type: Date
              description: (create_export.range_end)
            - key: actions
              type: List<String>
              optional: true
              description: (create_export.actions)
            - key: actor_ids
              type: List<String>
              optional: true
              description: (create_export.actor_ids)
            - key: actor_names
              type: List<String>
              optional: true
              description: (create_export.actor_names)
            - key: targets
              type: List<String>
              optional: true
              description: (create_export.targets)
      returns:
        - (AuditLogExport)
  dotnet:
    - key: CreateExport
      id: create_export
      url: /reference/audit-logs/create-export
      title: auditLogsService.CreateExport()
      parameters:
        - key: CreateAuditLogExportOptions
          expanded: true
          properties:
            - key: OrganizationId
              type: string
              description: (create_export.organization_id)
            - key: RangeStart
              type: DateTime
              description: (create_export.range_start)
            - key: RangeEnd
              type: DateTime
              description: (create_export.range_end)
            - key: Actions
              type: List<string>
              optional: true
              description: (create_export.actions)
            - key: ActorIds
              type: List<string>
              optional: true
              description: (create_export.actor_ids)
            - key: ActorNames
              type: List<string>
              optional: true
              description: (create_export.actor_names)
            - key: Targets
              type: List<string>
              optional: true
              description: (create_export.targets)
        - (cancellationToken)
      returns:
        - key: Task<AuditLogExport>
          description: (audit_log_export.self)
  php:
    - key: createExport
      id: create_export
      url: /reference/audit-logs/create-export
      title: $auditLogs->createExport()
      parameters:
        - key: organizationId
          type: string
          description: (create_export.organization_id)
        - key: rangeStart
          type: string
          description: (create_export.range_start)
        - key: rangeEnd
          type: string
          description: (create_export.range_end)
        - key: actions
          type: 'string[]'
          optional: true
          description: (create_export.actions)
        - key: actor_ids
          type: 'string[]'
          optional: true
          description: (create_export.actor_ids)
        - key: actor_names
          type: 'string[]'
          optional: true
          description: (create_export.actor_names)
        - key: targets
          type: 'string[]'
          optional: true
          description: (create_export.targets)
      returns:
        - (AuditLogExport)
  python:
    - key: create_export
      id: create_export
      url: /reference/audit-logs/create-export
      title: audit_logs.create_export()
      parameters:
        - key: organization_id
          type: str
          description: (create_export.organization_id)
        - key: range_start
          type: str
          description: (create_export.range_start)
        - key: range_end
          type: str
          description: (create_export.range_end)
        - key: actions
          type: 'Sequence[str]'
          optional: true
          description: (create_export.actions)
        - key: actor_ids
          type: 'Sequence[str]'
          optional: true
          description: (create_export.actor_ids)
        - key: actor_names
          type: 'Sequence[str]'
          optional: true
          description: (create_export.actor_names)
        - key: targets
          type: 'Sequence[str]'
          optional: true
          description: (create_export.targets)
      returns:
        - (AuditLogExport)
  ruby:
    - key: create_export
      id: create_export
      url: /reference/audit-logs/create-export
      title: AuditLogs.create_export()
      parameters:
        - key: organization_id
          type: String
          description: (create_export.organization_id)
        - key: range_start
          type: String
          description: (create_export.range_start)
        - key: range_end
          type: String
          description: (create_export.range_end)
        - key: actions
          type: 'Array[String]'
          optional: true
          description: (create_export.actions)
        - key: actor_ids
          type: 'Array[String]'
          optional: true
          description: (create_export.actor_ids)
        - key: actor_names
          type: 'Array[String]'
          optional: true
          description: (create_export.actor_names)
        - key: targets
          type: 'Array[String]'
          optional: true
          description: (create_export.targets)
      returns:
        - (AuditLogExport)
  go:
    - key: CreateExport
      id: create_export
      url: /reference/audit-logs/create-export
      title: auditlogs.CreateExport()
      parameters:
        - (ctx)
        - key: opts
          type: auditlogs.CreateExportOpts
          expanded: true
          properties:
            - key: OrganizationID
              type: string
              description: (create_export.organization_id)
            - key: RangeStart
              type: time.Time
              description: (create_export.range_start)
            - key: RangeEnd
              type: time.Time
              description: (create_export.range_end)
            - key: Actions
              type: '[]string'
              optional: true
              description: (create_export.actions)
            - key: ActorIds
              type: '[]string'
              optional: true
              description: (create_export.actor_ids)
            - key: ActorNames
              type: '[]string'
              optional: true
              description: (create_export.actor_names)
            - key: Targets
              type: '[]string'
              optional: true
              description: (create_export.targets)
      returns:
        - key: export
          type: auditlogs.AuditLogExport
          description: (audit_log_export.self)
        - (err)
originalPath: .tmp-workos-clone/packages/docs/content/reference/audit-logs/export/create.mdx
---

## Create Export

Create an Audit Log Export.

<CodeBlock referenceId="create_export">
  <CodeBlockTab title="Request" file="create-export-request" />
  <CodeBlockTab title="Response" file="create-export-response" />
</CodeBlock>
