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

# List event types

> Returns the event types with their stream and payload schema.



## OpenAPI

````yaml openapi-admin.json GET /events/types
openapi: 3.1.0
info:
  title: Juo Admin API
  version: 1.0.0
  description: >-
    Programmatic access to subscription management for merchants.


    ## Core Resources


    - **Subscriptions** — the central entity. Belongs to a Customer, contains
    Items (product variants) and Discounts. Lifecycle: `active` → `paused` or
    `cancelled`; `paused` → `active` or `cancelled`; `cancelled` → `active` (via
    reactivate).

    - **Items** — subscription items (product variants) (quantity, price,
    billing/delivery policies).

    - **Discounts** — applied to subscriptions by discount code or manually
    (percentage or fixed amount, targeting subscription items or shipping).

    - **Customers** — customers who own subscriptions and payment methods.

    - **Products / Variants** — catalog products and variants that can be
    assigned to subscription plans.

    - **Schedules** — a read-only projection of upcoming billing orders, derived
    from subscription state, active schedule adjustments, and triggered
    workflows. **Schedule adjustments never modify the subscription** — they
    apply changes to upcoming orders matching the specified criteria (by cycle,
    date, or both), which may cover one or more orders. For permanent changes
    (billing frequency, items, payment method, delivery address), update the
    subscription directly.

    - **Workflows** — interactive customer-facing flows (retention, dunning,
    onboarding). Contain Steps connected by Transitions and produce Runs on each
    execution. Supports A/B experiment steps.


    ## Authentication


    Every request requires:

    - `X-Juo-Admin-Api-Key` header — the merchant's Admin API key.

    - `X-Tenant-ID` header — the store identifier (myshopify domain, e.g.
    `my-store.myshopify.com`).
servers:
  - url: https://api.juo.io/admin/v1
security:
  - AdminApiKey: []
  - BearerToken: []
tags:
  - name: subscriptions
    description: >-
      Recurring billing agreements with customers. Manage lifecycle (pause,
      resume, cancel, reactivate), items, and discounts.
  - name: customers
    description: Customers who own subscriptions. Create and update customer records.
  - name: products
    description: >-
      Products and variants linked to subscription plans. Manage catalog and
      plan assignments.
  - name: schedules
    description: >-
      Read-only view of upcoming billing orders generated from subscription
      state, schedule adjustments, and workflows. Use schedule adjustments for
      targeted changes to upcoming orders (scoped by cycle number, date, or
      both) — they never alter the subscription itself. For permanent changes
      (billing frequency, items, payment method), update the subscription
      directly.
  - name: workflows
    description: >-
      Interactive customer-facing flows for retention, dunning, and onboarding.
      Define steps, publish, and track execution runs and experiments.
  - name: workflowRuns
    description: >-
      Workflow runs across all workflows — the record of what happened each time
      a customer went through a workflow. Filter by customer to see one
      customer's run history.
  - name: events
    description: >-
      What happened in the shop, in two streams. activity: everything that
      happened to subscribers (subscriptions, customers, orders, billing,
      workflow runs, logins, mail), whoever did it; actor.type says who (staff,
      customer, system, bulk-action, api, unknown; staff is the panel). audit:
      shop-level actions: settings, exports, API access, bulk-action jobs and
      workflow edits. Filter by stream in query.
  - name: analytics
    description: >-
      Time-series metrics over subscriptions, customers and orders. Read the
      metric catalog first: it states what each metric means, the approximations
      it carries, and which filters and group-by dimensions the metric will
      honour — an unsupported filter is a 400, not an empty result.
paths:
  /events/types:
    get:
      tags:
        - events
      summary: List event types
      description: >-
        Returns public event types with their stream and payload schema. Types
        may be listed before their first event is recorded. Legacy types have no
        payload schema.
      parameters:
        - $ref: '#/components/parameters/TenantHeader'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  resource:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventType'
                required:
                  - resource
                  - data
        '400':
          description: >-
            Bad request — invalid input or violated business rule (e.g., wrong
            subscription status for the requested operation).
        '401':
          description: Unauthorized — missing, expired, or invalid API key.
        '403':
          description: Forbidden — authenticated but not permitted to access this resource.
        '404':
          description: >-
            Not found — the resource does not exist or belongs to a different
            tenant.
        '422':
          description: >-
            Unprocessable entity — well-formed request that fails semantic
            validation.
components:
  parameters:
    TenantHeader:
      name: X-Tenant-ID
      x-speakeasy-name-override: tenant
      x-speakeasy-globals-hidden: true
      in: header
      schema:
        type: string
      required: true
      description: >-
        Unique identifier of the tenant in the system (usually a store
        identifier)
  schemas:
    EventType:
      type: object
      properties:
        type:
          minLength: 1
          type: string
        stream:
          description: >-
            activity: everything that happened to subscribers (subscriptions,
            customers, orders, billing, workflow runs, logins, mail), whoever
            did it; actor.type says who (staff, customer, system, bulk-action,
            api, unknown; staff is the panel). audit: shop-level actions:
            settings, exports, API access, bulk-action jobs and workflow edits.
            Fixed per type.
          type: string
          enum:
            - activity
            - audit
        category:
          minLength: 1
          type: string
        severity:
          type: string
          enum:
            - info
            - problem
        payloadFormat:
          type: string
          enum:
            - typed
            - legacy
        summary:
          minLength: 1
          type: string
        aliases:
          description: >-
            Other spellings a type filter accepts for this type. Events always
            carry type itself.
          type: array
          items:
            minLength: 1
            type: string
        payloadSchema:
          oneOf:
            - type: 'null'
            - description: JSON Schema for typed event data; null for legacy payloads.
              type: object
              additionalProperties: {}
      required:
        - type
        - stream
        - category
        - severity
        - payloadFormat
        - summary
        - aliases
        - payloadSchema
      title: EventType
  securitySchemes:
    AdminApiKey:
      type: apiKey
      name: X-Juo-Admin-Api-Key
      in: header
      description: >-
        Long-lived Admin API key issued from the Juo merchant portal. Pass as
        the `X-Juo-Admin-Api-Key` header.
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Short-lived JWT minted via the merchant browser-session flow. Carries
        the authenticated staff identity so that API calls are attributed to the
        specific staff user in the activity log.

````

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