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

# List events

> Lists the store's custom events, newest received first, with the customer each one was linked to and the result of each flow. An event shows up as soon as it is accepted. Covers the 13 months of history; a test key lists test events.



## OpenAPI

````yaml /openapi.en.json get /v1/events
openapi: 3.1.0
info:
  title: Bevits API
  version: 1.0.0
  description: >-
    Bevits public API for querying and managing CRM data, customers, purchases,
    segments, tags, automations, recipes, campaigns, email templates, brand kit,
    custom events, and webhooks.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.bevits.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
    description: API availability.
  - name: Identity
    description: Organization and API key identity.
  - name: Customers
    description: Customers and their relationships.
  - name: Segments
    description: Customer segments.
  - name: Purchases
    description: >-
      Purchases from store integrations and purchases created through the API by
      organizations that sell through their own system.
  - name: CRM data
    description: Tags and attribute definitions.
  - name: Automations
    description: Automation flows.
  - name: Campaigns
    description: Email, WhatsApp, and SMS campaigns.
  - name: Account and brand
    description: Account context, brand kit, and images.
  - name: Recipes
    description: Ready-made automations created from recipes, with undo.
  - name: Email templates
    description: Creating and importing email templates.
  - name: Events
    description: Custom events sent by the store and their types.
  - name: Webhooks
    description: Endpoints that receive the store's events, and the delivery log.
paths:
  /v1/events:
    get:
      tags:
        - Events
      summary: List events
      description: >-
        Lists the store's custom events, newest received first, with the
        customer each one was linked to and the result of each flow. An event
        shows up as soon as it is accepted. Covers the 13 months of history; a
        test key lists test events.
      operationId: listEvents
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/EventCursor'
        - $ref: '#/components/parameters/EventCustomerFilter'
        - $ref: '#/components/parameters/EventName'
        - $ref: '#/components/parameters/EventExternalId'
        - $ref: '#/components/parameters/OccurredAfter'
        - $ref: '#/components/parameters/OccurredBefore'
      responses:
        '200':
          $ref: '#/components/responses/EventPage'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ReadScopeRequired'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/HistoryUnavailable'
components:
  parameters:
    Limit:
      name: limit
      in: query
      description: Maximum number of items per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    EventCursor:
      name: starting_after
      in: query
      description: ID of the last event of the previous page.
      schema:
        type: string
        pattern: ^evt_[A-Za-z0-9_-]+$
    EventCustomerFilter:
      name: customer_id
      in: query
      description: >-
        Only this customer's events, including those of customers merged into
        them.
      schema:
        type: string
        pattern: ^cus_[A-Za-z0-9_-]+$
    EventName:
      name: name
      in: query
      description: Only events with this name.
      schema:
        type: string
        maxLength: 64
    EventExternalId:
      name: external_id
      in: query
      description: Only the event sent with this external_id.
      schema:
        type: string
        maxLength: 255
    OccurredAfter:
      name: occurred_after
      in: query
      description: Includes events that happened at or after this instant.
      schema:
        type: string
        format: date-time
    OccurredBefore:
      name: occurred_before
      in: query
      description: Includes events that happened before this instant.
      schema:
        type: string
        format: date-time
  responses:
    EventPage:
      description: Page of events, newest received first.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EventPage'
    Unauthorized:
      description: Missing, invalid, expired, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authentication_error
              message: Invalid API key.
              request_id: req_07f6cdc3c20249d6afcd90b4
    ReadScopeRequired:
      description: >-
        The API key does not have the read scope. This is the case of a
        send-only key, created with events:write alone.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: permission_denied
              code: missing_scope
              message: This API key does not have the required "read" scope.
              param: scope
              request_id: req_07f6cdc3c20249d6afcd90b4
    ValidationError:
      description: A parameter failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: validation_error
              message: Invalid query parameters.
              param: limit
              request_id: req_07f6cdc3c20249d6afcd90b4
    RateLimited:
      description: Request limit exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    HistoryUnavailable:
      description: >-
        The event history is unavailable. Try again in a few minutes; reading a
        recent event by ID keeps working.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    EventPage:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Event'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          required:
            - retry_after
          properties:
            retry_after:
              type: integer
              minimum: 1
              description: Seconds before retrying.
    Page:
      type: object
      required:
        - data
        - has_more
      properties:
        has_more:
          type: boolean
          description: Indicates whether another page is available.
    Event:
      type: object
      required:
        - object
        - id
        - name
        - occurred_at
        - received_at
        - customer
        - flows
        - backfill
        - livemode
      properties:
        object:
          type: string
          const: event
        id:
          type: string
          pattern: ^evt_[A-Za-z0-9_-]+$
        name:
          type: string
        external_id:
          type: string
        occurred_at:
          type: string
          format: date-time
        received_at:
          type: string
          format: date-time
        customer:
          type: object
          description: >-
            Customer the event was linked to. A send-only key (events:write)
            receives id only.
          properties:
            id:
              type: string
              pattern: ^cus_[A-Za-z0-9_-]+$
              description: >-
                Absent when the event would create the customer and it was not
                created: in validation and in test mode.
            matched_by:
              type: string
              enum:
                - id
                - external_id
                - tax_id
                - email
                - phone
              description: >-
                Identifier that found the customer. Absent when the event
                created the customer.
            created:
              type: boolean
              description: true when the event created the customer.
            would_create:
              type: boolean
              const: true
              description: >-
                Present in validation and in test mode, when sending would
                create the customer.
        flows:
          type: array
          description: >-
            Active flows that listen to this event name. An empty list means no
            flow is listening.
          items:
            $ref: '#/components/schemas/EventFlow'
        properties:
          type: object
          additionalProperties: true
          description: >-
            Properties as submitted. May be omitted if analytical history is
            unavailable after 30 days or if erased.
        backfill:
          type: boolean
        livemode:
          type: boolean
        warnings:
          type: array
          description: >-
            Present only when there is something to warn about. A warning never
            replaces an error.
          items:
            $ref: '#/components/schemas/EventWarning'
        duplicate:
          type: boolean
          const: true
          description: >-
            Present when the call returned an event that already existed with
            the same name and external_id.
    Error:
      type: object
      required:
        - type
        - message
        - request_id
      properties:
        type:
          type: string
          enum:
            - authentication_error
            - conflict
            - internal_error
            - invalid_request
            - not_found
            - permission_denied
            - rate_limited
            - service_unavailable
            - validation_error
        code:
          type: string
          description: >-
            Stable, machine-readable reason within type, such as
            invalid_event_name. Present when the error has a named reason.
        message:
          type: string
        param:
          type: string
          description: >-
            Full path of the offending field, such as customer.email or
            events[3].name.
        suggestion:
          type: string
          description: A value that would be accepted, when there is an obvious one.
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
    EventFlow:
      type: object
      required:
        - id
        - name
        - status
      properties:
        id:
          type: string
          pattern: ^flw_[A-Za-z0-9_-]+$
        name:
          type: string
        status:
          type: string
          enum:
            - queued
            - started
            - skipped
          description: >-
            queued is decided in the send response. When the event is read
            later, the flow shows as started or skipped.
        reason:
          type: string
          enum:
            - backfill
            - stale
            - filter_not_matched
            - test_mode
            - no_contact_channel
            - no_consent
            - flow_inactive
            - flow_error
            - dispatch_failed
          description: Why the flow was skipped. Present when status is skipped.
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/EventFlowWarning'
          description: >-
            What a started flow could not do and the sender can fix, such as a
            message skipped for a variable without a value. Present only when
            there is something to report.
    EventWarning:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - ambiguous_identifier
            - identifier_conflict
            - identifier_mismatch
            - payload_mismatch
        message:
          type: string
        param:
          type: string
    EventFlowWarning:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - missing_variable
          description: >-
            missing_variable: a message of the flow was skipped because a
            template variable had no value and no fallback text.
        message:
          type: string
        param:
          type: string
          description: >-
            The event property that was missing, such as
            properties.tracking.code. Absent when the variable is not from the
            event.
  headers:
    RetryAfter:
      description: Seconds before retrying.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Total limit for the current window.
      schema:
        type: integer
        example: 600
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 599
    RateLimitReset:
      description: UTC instant when the current window ends.
      schema:
        type: string
        format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: bvt_live_...
      description: API key created in the organization settings.

````

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