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

# List events

> Every event O.J. delivers by webhook is also kept here for 30 days, in the order it happened. Use it two
ways. If your webhook endpoint was down, list events with `created_after` set to the last one you processed
and catch up. If you would rather not run a webhook endpoint at all, poll this endpoint on a schedule and
treat it as your feed. The event bodies are identical to what the webhook would have delivered.




## OpenAPI

````yaml /api-reference/openapi.yaml get /events
openapi: 3.1.0
info:
  title: O.J. Agent Development Kit (ADK)
  version: 0.5.1
  summary: >-
    Send O.J. a business. Get back named lender matches, what's needed, offers
    and funding status.
  description: >
    The O.J. ADK lets platforms with small-business customers offer financing
    without becoming a lender or a

    broker. You send a business as a **referral**. O.J. matches it to lender
    programs, collects documents,

    submits to lenders and tracks the deal to funding. You earn a share of the
    commission on every funded loan.


    Integrate with **O.J. Embed** (drop-in screens), the **REST API** with
    webhooks, or **MCP** for agents. All

    three read and write the same referral.


    Conventions: OAuth 2.0 client credentials, amounts in cents, prefixed ids,
    cursor pagination, an

    `Idempotency-Key` on every POST, RFC 9457 errors, and Standard Webhooks
    signatures.
  license:
    name: Proprietary — O.J. partner terms
    identifier: LicenseRef-OJ-Partner
  contact:
    name: O.J. Developer Support
    email: developers@meet-oj.com
servers:
  - url: https://sandbox.api.meet-oj.com/partner/v0
    description: Sandbox
  - url: https://api.meet-oj.com/partner/v0
    description: Production
security:
  - oauth2: []
tags:
  - name: Referrals
    description: >-
      A referral is one business you sent to O.J. Every other resource belongs
      to a referral.
  - name: Matches
    description: >-
      The lenders a business matches, named, with estimated limits. `POST
      /match_checks` screens raw numbers without creating a referral. A match is
      not a credit decision; the lender decides.
  - name: Documents
    description: >-
      Documents O.J. still needs, and uploads by API. Most integrations show the
      `next_action` button instead.
  - name: Offers
    description: >-
      Offers returned by lenders. Indicative terms computed before a lender
      replies are marked `binding: false`.
  - name: Sessions
    description: >-
      Create a session to open an O.J. screen: a `client_token` for Embed, or a
      hosted `url` to redirect to.
  - name: Events
    description: >-
      Every change to a referral is an event, delivered by webhook, streamed
      over SSE, and kept for 30 days at `GET /events`.
  - name: Payouts
    description: >-
      Your share of the commission on each funded referral. Match rows to your
      bank statement with `statement_descriptor`. Payout destinations are set
      during onboarding and cannot be changed by API.
  - name: Conversation
    description: >-
      The message thread between O.J., the borrower and your team on a referral,
      across every channel.
  - name: Channels
    description: >-
      Channel connectors let O.J. reach your borrowers through channels you own
      (in-app inbox, SMS, Apple Business Messages, email), in your brand.
  - name: Policy
    description: >-
      Account-level rules: send approval, allowed Embed origins, contact
      channels, default intent and reminder cadence.
  - name: Programs
    description: >-
      For lenders running a program on O.J.: receive submissions, record
      decisions and report funding.
  - name: Webhooks
    description: >-
      Register endpoints that receive signed events. Deliveries follow Standard
      Webhooks.
paths:
  /events:
    get:
      tags:
        - Events
      summary: List events
      description: >
        Every event O.J. delivers by webhook is also kept here for 30 days, in
        the order it happened. Use it two

        ways. If your webhook endpoint was down, list events with
        `created_after` set to the last one you processed

        and catch up. If you would rather not run a webhook endpoint at all,
        poll this endpoint on a schedule and

        treat it as your feed. The event bodies are identical to what the
        webhook would have delivered.
      operationId: listEvents
      parameters:
        - name: type
          in: query
          description: Only return events of this type.
          schema:
            $ref: '#/components/schemas/EventType'
        - name: referral_id
          in: query
          description: Only return events for this referral.
          schema:
            type: string
        - name: created_after
          in: query
          description: >-
            Only return events that happened after this time. Use the
            `created_at` of the last event you processed.
          schema:
            type: string
            format: date-time
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/StartingAfter'
      responses:
        '200':
          description: A page of events
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                  has_more:
                    type: boolean
components:
  schemas:
    EventType:
      type: string
      description: >-
        The kinds of events O.J. sends. The name is `object.what_happened`. The
        Webhooks section of the docs explains when each one fires.
      enum:
        - referral.received
        - referral.matches_updated
        - referral.needs_partner
        - referral.needs_borrower
        - message.sent
        - message.received
        - referral.reminder_due
        - submission.awaiting_review
        - submission.decided
        - document_request.opened
        - document_request.satisfied
        - referral.submitted
        - offer.received
        - offer.accepted
        - referral.funded
        - referral.declined
        - referral.closed
        - payout.updated
    Event:
      type: object
      description: >
        A record that something happened. `type` says what, `referral_id` says
        to which referral, and `data` is a

        copy of the object concerned (the referral, the offer, the document
        request, and so on) as it looked at that

        moment. The same event, with the same `id`, is delivered by webhook and
        kept at `GET /events`, so you can

        safely ignore a duplicate.
      required:
        - id
        - type
        - created_at
        - data
      properties:
        id:
          type: string
          examples:
            - evt_01K5X3W0F3
        object:
          type: string
          const: event
        type:
          $ref: '#/components/schemas/EventType'
        referral_id:
          type: string
        created_at:
          type: string
          format: date-time
        data:
          type: object
          description: >-
            The object the event is about (referral, document_request, offer,
            message, or payout), as of the event.
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    StartingAfter:
      name: starting_after
      in: query
      description: Cursor — the id of the last object on the previous page.
      schema:
        type: string
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        One client per partner per environment. Access tokens expire after 15
        minutes. Scopes are granted per client. Sandbox clients use
        https://sandbox.api.meet-oj.com/oauth/token.
      flows:
        clientCredentials:
          tokenUrl: https://api.meet-oj.com/oauth/token
          scopes:
            referrals:write: Create referrals and upload documents
            referrals:read: Read referrals, matches, document requests, offers, events
            match_checks:write: Run identity-free match checks
            sessions:write: Mint hosted-session links
            webhooks:manage: Register and list webhook endpoints
            payouts:read: >-
              Read payouts (your statement). There is no payouts:write;
              destinations are managed in hosted onboarding by a person.
            messages:read: Read a referral's conversation
            messages:write: >-
              Send messages into a referral's conversation on behalf of the
              partner or the borrower
            channels:manage: Register and remove channel connectors
            policy:manage: Read and change the partner policy
            submissions:read: >-
              For banks running a program. List and read submissions awaiting
              review
            submissions:write: For banks running a program. Record decisions and report funding

````