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

# Export organization audit events

> Export audit events for the authenticated organization as JSON or CSV. Only organization admins and full API keys may export. The default window is the last 90 days, with timezone-aware since/until bounds, newest-first keyset pagination, and a maximum page size of 500. CSV output uses fixed columns and is protected from spreadsheet formula execution.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/audit-events/export
openapi: 3.1.0
info:
  title: Skyvern API
  description: API for Skyvern
  version: 1.0.0
servers:
  - url: https://api.skyvern.com
    x-fern-server-name: Cloud
  - url: https://api-staging.skyvern.com
    x-fern-server-name: Staging
  - url: http://localhost:8000
    x-fern-server-name: Local
security: []
paths:
  /v1/audit-events/export:
    get:
      tags:
        - Server
      summary: Export organization audit events
      description: >-
        Export audit events for the authenticated organization as JSON or CSV.
        Only organization admins and full API keys may export. The default
        window is the last 90 days, with timezone-aware since/until bounds,
        newest-first keyset pagination, and a maximum page size of 500. CSV
        output uses fixed columns and is protected from spreadsheet formula
        execution.
      operationId: export_audit_events_v1_audit_events_export_get
      parameters:
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Since
        - name: until
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Until
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 100
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: format
          in: query
          required: false
          schema:
            enum:
              - json
              - csv
            type: string
            default: json
            title: Format
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: A page of audit events as JSON, or a CSV download when format=csv.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditEventExportResponse'
            text/csv:
              schema:
                type: string
                format: binary
        '403':
          description: The caller must be an organization admin or use a full API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditExportDenialResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AuditEventExportResponse:
      properties:
        rows:
          items:
            $ref: '#/components/schemas/AuditEventExportRow'
          type: array
          title: Rows
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
      type: object
      required:
        - rows
        - next
      title: AuditEventExportResponse
    AuditExportDenialResponse:
      properties:
        detail:
          $ref: '#/components/schemas/AuditExportDenialDetail'
      type: object
      required:
        - detail
      title: AuditExportDenialResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuditEventExportRow:
      properties:
        audit_event_id:
          type: string
          title: Audit Event Id
        created_at:
          type: string
          format: date-time
          title: Created At
        organization_id:
          type: string
          title: Organization Id
        actor_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor User Id
        auth_kind:
          type: string
          title: Auth Kind
        org_role:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Role
        action:
          type: string
          title: Action
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        details:
          additionalProperties: true
          type: object
          title: Details
      type: object
      required:
        - audit_event_id
        - created_at
        - organization_id
        - actor_user_id
        - auth_kind
        - org_role
        - action
        - resource_type
        - resource_id
        - request_id
        - details
      title: AuditEventExportRow
    AuditExportDenialDetail:
      properties:
        error_code:
          type: string
          const: organization_admin_required
          title: Error Code
        message:
          type: string
          title: Message
        reason_kind:
          type: string
          const: role
          title: Reason Kind
        required:
          additionalProperties:
            type: string
          type: object
          title: Required
        caller_has:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Caller Has
        next_action:
          type: string
          title: Next Action
      type: object
      required:
        - error_code
        - message
        - reason_kind
        - required
        - caller_has
        - next_action
      title: AuditExportDenialDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.