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

# List audit logs

> Retrieve existing audit logs. Sorted by `happened_at` descending.



## OpenAPI

````yaml get /v1/audit-logs
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/audit-logs:
    get:
      tags:
        - Audit logs
      summary: List audit logs
      description: Retrieve existing audit logs. Sorted by `happened_at` descending.
      operationId: listAuditLogs
      parameters:
        - schema:
            type: number
            exclusiveMinimum: 0
            maximum: 100
            default: 50
            description: Maximum number of items to return (1-100).
            example: 50
          required: false
          description: Maximum number of items to return (1-100).
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              Opaque cursor returned in the previous response's `next_cursor`.
              Omit to fetch the first page.
          required: false
          description: >-
            Opaque cursor returned in the previous response's `next_cursor`.
            Omit to fetch the first page.
          name: cursor
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
                enum:
                  - 'true'
                  - 'false'
            default: false
            description: Set to `true` to include `total` in the response.
            example: false
          required: false
          description: Set to `true` to include `total` in the response.
          name: include_total
          in: query
        - schema:
            type: string
            description: Return only entries attached to this customer ID.
            example: cus_Typ0px2W0aiEtl
          required: false
          description: Return only entries attached to this customer ID.
          name: customer_id
          in: query
        - schema:
            type: string
            description: Return only entries attached to this subscription ID.
            example: sub_amiaWZ3lzDIWaoT
          required: false
          description: Return only entries attached to this subscription ID.
          name: subscription_id
          in: query
        - schema:
            type: string
            description: Return only entries attached to this invoice ID.
            example: inv_1eTaiytfA0i2Va
          required: false
          description: Return only entries attached to this invoice ID.
          name: invoice_id
          in: query
        - schema:
            type: string
            description: Return only entries attached to this quote ID.
            example: quo_1eTaiytfA0i2Va
          required: false
          description: Return only entries attached to this quote ID.
          name: quote_id
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPaginatedAuditLog'
      security:
        - bearer: []
components:
  schemas:
    CursorPaginatedAuditLog:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AuditLog'
          description: List of AuditLog.
        next_cursor:
          type:
            - string
            - 'null'
          description: Cursor to fetch the next page. `null` when there are no more items.
          example: null
        has_more:
          type: boolean
          description: Whether more items are available after this page.
          example: false
        total:
          type: number
          description: >-
            Total number of items matching the filters. Only present when
            `include_total=true` was passed.
          example: 1
      required:
        - data
        - next_cursor
        - has_more
    AuditLog:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - customer.created
                - customer.updated
                - customer.archived
                - customer.deleted
                - customer.recovered
                - invoice.created
                - invoice.updated
                - invoice.ready
                - invoice.settled
                - invoice.voided
                - invoice.refunded
                - invoice.errored
                - invoice.deleted
                - invoice.reminder_sent
                - invoice.grace_period.started
                - invoice.electronic_invoice.sent
                - invoice.electronic_invoice.failed
                - subscription.created
                - subscription.updated
                - subscription.activated
                - subscription.trial_ended
                - subscription.paused
                - subscription.reactivated
                - subscription.renewed
                - subscription.charged
                - subscription.cancellation_scheduled
                - subscription.cancelled
                - subscription.voided
                - subscription.errored
                - quote.created
                - quote.approved
                - quote.sent
                - quote.signed
                - quote.viewed
                - quote.voided
              description: Event type.
              example: invoice.electronic_invoice.sent
            happened_at:
              type: string
              format: date-time
              description: Date the event happened.
              example: '2024-10-20T14:32:11.000Z'
            customer_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the customer the event relates to. `null` if the event is
                not attached to a customer.
              example: cus_Typ0px2W0aiEtl
            subscription_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the subscription the event relates to. `null` if the event
                is not attached to a subscription.
              example: null
            invoice_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the invoice the event relates to. `null` if the event is
                not attached to an invoice.
              example: inv_1eTaiytfA0i2Va
            quote_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the quote the event relates to. `null` if the event is not
                attached to a quote.
              example: null
          required:
            - type
            - happened_at
            - customer_id
            - subscription_id
            - invoice_id
            - quote_id
          title: Audit log
        - type: object
          properties:
            type:
              type: string
              enum:
                - email.created
              description: Event type.
              example: email.created
            email_status:
              type:
                - string
                - 'null'
              enum:
                - queued
                - sent
                - delivered
                - opened
                - clicked
                - bounced
                - spammed
                - failed
                - undeliverable
                - dropped
                - suppressed
              description: >-
                Delivery status of the related email. `null` for non-email
                events.
              example: sent
            happened_at:
              type: string
              format: date-time
              description: Date the event happened.
              example: '2024-10-20T14:32:11.000Z'
            customer_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the customer the event relates to. `null` if the event is
                not attached to a customer.
              example: cus_Typ0px2W0aiEtl
            subscription_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the subscription the event relates to. `null` if the event
                is not attached to a subscription.
              example: null
            invoice_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the invoice the event relates to. `null` if the event is
                not attached to an invoice.
              example: inv_1eTaiytfA0i2Va
            quote_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the quote the event relates to. `null` if the event is not
                attached to a quote.
              example: null
          required:
            - type
            - email_status
            - happened_at
            - customer_id
            - subscription_id
            - invoice_id
            - quote_id
          title: Email audit log
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````