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

# List Api Events

> Cursor-paginated activity log for the caller's team.

Role-scoped identically to ``GET /v1/usage``: admins/owners see every
row in the team, members see only rows attributable to their own API
keys plus their own MCP-origin rows. Sort is ``(timestamp DESC,
id DESC)``; iterate ``next_cursor`` until ``null`` to drain.



## OpenAPI

````yaml /openapi/moda-public-api.yaml get /events
openapi: 3.1.0
info:
  title: Moda Public API
  description: >
    Programmatic access to Moda's canvas design platform. Create designs, export
    assets, manage brand kits, and run AI design tasks.


    ## Versioning


    Pin response shapes with a calendar-dated `Moda-Version` header (e.g.
    `2026-05-01`). **The pin is global** — it applies to every endpoint in the
    request, not just the one you adopted it for, so raising it to use a new
    endpoint also moves your other responses to that version's shapes.


    ### Migrating `2026-04-12` → `2026-05-01`


    - **Tasks** move from the flat `JobResponse` (`job_id`, `canvas_url`,
    `can_export`) to the canonical `Task` envelope. The export artifact is now
    under `result.export` as `{url, format, page_count}`; update any code that
    read the export URL from the old top-level fields.

    - **Multi-page PNG/JPEG exports are delivered as a single `.zip`** of
    per-page files (`page-1.png`, …), so `result.export.format` is `zip`. For
    one bundled document instead, request `format=pdf` or `pptx`; for a single
    image, pass `page_number`.
  version: 1.0.0
  x-moda-api-version: '2026-05-01'
servers:
  - url: https://api.moda.app/v1
    description: Production
security: []
tags:
  - name: canvases
    description: List, search, read, export, and share canvases
  - name: tasks
    description: Start and monitor AI design tasks
  - name: organizations
    description: List organizations and teams
  - name: credits
    description: Check credit balance and usage
  - name: brand-kits
    description: Manage brand kits
  - name: remix
    description: Duplicate and edit canvases
  - name: share-links
    description: Resolve share URLs to canvas identifiers
  - name: uploads
    description: Upload files for use as attachments
  - name: usage
    description: Aggregate API usage stats for the caller's team
  - name: embed
    description: Signed iframe embed sessions
  - name: web
    description: 'Metered web research: search and page reading'
  - name: websites
    description: >-
      Create, update, publish, screenshot, and manage hosted multi-page static
      sites
  - name: drive
    description: >-
      Organize the workspace: folders, the folder tree, and item
      move/rename/visibility/delete for folders, canvases, and files
paths:
  /events:
    get:
      tags:
        - usage
      summary: List Api Events
      description: |-
        Cursor-paginated activity log for the caller's team.

        Role-scoped identically to ``GET /v1/usage``: admins/owners see every
        row in the team, members see only rows attributable to their own API
        keys plus their own MCP-origin rows. Sort is ``(timestamp DESC,
        id DESC)``; iterate ``next_cursor`` until ``null`` to drain.
      operationId: listApiEvents
      parameters:
        - name: api_key_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional API-key UUID filter.
            title: Api Key Id
          description: Optional API-key UUID filter.
        - name: operation_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional exact-match filter on the event's OpenAPI
              ``operationId``.
            title: Operation Id
          description: Optional exact-match filter on the event's OpenAPI ``operationId``.
        - name: trigger_source
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - api
                  - mcp
                type: string
              - type: 'null'
            description: Restrict to ``api`` or ``mcp`` origin rows.
            title: Trigger Source
          description: Restrict to ``api`` or ``mcp`` origin rows.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - succeeded
                  - failed
                type: string
              - type: 'null'
            description: '``succeeded`` → 200-399; ``failed`` → status >= 400.'
            title: Status
          description: '``succeeded`` → 200-399; ``failed`` → status >= 400.'
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: ISO8601 UTC lower bound (inclusive). Defaults to ``to - 7d``.
            title: From
          description: ISO8601 UTC lower bound (inclusive). Defaults to ``to - 7d``.
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: ISO8601 UTC upper bound (exclusive). Defaults to ``now``.
            title: To
          description: ISO8601 UTC upper bound (exclusive). Defaults to ``now``.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: 'Max rows per page (cap: 200).'
            default: 50
            title: Limit
          description: 'Max rows per page (cap: 200).'
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Opaque cursor from the previous page's ``next_cursor``.
            title: Cursor
          description: Opaque cursor from the previous page's ``next_cursor``.
        - $ref: '#/components/parameters/ModaVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPage_EventResponse_'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Permission denied for this scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (idempotency / resource state).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - API Key: []
components:
  parameters:
    ModaVersion:
      name: Moda-Version
      in: header
      required: false
      description: >-
        Calendar-dated API version pin. New integrations should pin `2026-05-01`
        to opt into the newest response shapes. For back-compat the server also
        accepts requests with no header and resolves them to the current default
        (today: `2026-04-12`); that default advances on each [sunset
        date](/api-reference/versioning). Any unsupported value returns 400
        `unsupported_version`.
      example: '2026-05-01'
      schema:
        type: string
        enum:
          - '2026-04-12'
          - '2026-05-01'
        default: '2026-05-01'
        example: '2026-05-01'
  schemas:
    CursorPage_EventResponse_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/EventResponse'
          type: array
          title: Data
          description: Items in this page, in the endpoint's declared sort order.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: >-
            Opaque cursor to pass as ``?cursor=`` on the next request. ``null``
            means you've reached the end of the collection.
        returned:
          type: integer
          title: Returned
          description: >-
            Number of items in this page (always ``len(data)``; derived
            server-side).
          default: 0
        has_more:
          type: boolean
          title: Has More
          description: >-
            ``true`` when more items exist beyond this page — keep requesting
            with ``next_cursor`` until this is ``false``. Never trust
            ``len(data) < limit`` alone.
          default: false
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
          description: The effective page-size limit this response was computed with.
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: >-
            True total number of items in the collection (after filters), when
            the endpoint can count cheaply. ``null`` on log/search lanes — use
            ``has_more`` there.
      type: object
      required:
        - data
      title: CursorPage[EventResponse]
    ErrorEnvelope:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
          description: >-
            Stable machine string keyed to doc_url. Never changes once
            published.
        message:
          type: string
          title: Message
          description: >-
            Human-readable message, for developers. Not localized, not
            user-facing.
        doc_url:
          type: string
          title: Doc Url
          description: Permalink to the docs page for this code.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Correlator for logs/Sentry/audit.
        causes:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorEnvelope'
              type: array
            - type: 'null'
          title: Causes
          description: Aggregated upstream failures (e.g. per-page export errors).
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Code-specific detail payload (e.g. validation field list). Callers
            should pass ``None`` rather than ``{}`` to omit the key from the
            response.
        retry_after_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After Ms
          description: Hint for rate-limited or transient errors.
        retryable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Retryable
          description: >-
            Explicit retryability for this code, from the error-code registry:
            ``false`` means retrying the same request cannot succeed (fix the
            input / resource first); ``true`` means the condition is transient
            and a retry (with backoff / after the blocker clears) can succeed.
            Omitted for codes whose retryability is context-dependent — do not
            derive it from ``type`` or the HTTP status when this field is
            present.
      type: object
      required:
        - type
        - code
        - message
        - doc_url
      title: ErrorEnvelope
      description: >-
        Canonical error payload, nested under the top-level ``{"error": ...}``
        key.
    EventResponse:
      properties:
        id:
          type: string
          title: Id
          description: Raw UUID of the event row (UUIDv7, time-sortable).
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: When the request was received (naive UTC).
        operation_id:
          type: string
          title: Operation Id
          description: OpenAPI operationId for REST calls; MCP tool name for MCP calls.
        endpoint:
          type: string
          title: Endpoint
          description: HTTP method + path template, e.g. ``POST /v1/tasks``.
        trigger_source:
          type: string
          title: Trigger Source
          description: '``api`` or ``mcp``.'
        status_code:
          type: integer
          title: Status Code
          description: HTTP status returned to the caller.
        duration_ms:
          type: integer
          title: Duration Ms
          description: Wall-clock duration of the request in milliseconds.
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        credits_charged:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Charged
          description: Credits charged for this call; ``null`` for non-billable rows.
        prompt_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Preview
          description: >-
            First ~200 chars of the prompt for task-type handlers. ``null`` for
            historical rows or non-task operations.
        api_key:
          $ref: '#/components/schemas/ApiKeyRef'
        resource:
          anyOf:
            - $ref: '#/components/schemas/ResourceRef'
            - type: 'null'
          description: >-
            Present only for task-type or canvas-type resources. Omitted
            otherwise.
      type: object
      required:
        - id
        - timestamp
        - operation_id
        - endpoint
        - trigger_source
        - status_code
        - duration_ms
        - api_key
      title: EventResponse
      description: Single row of the ``GET /v1/events`` page.
    ErrorType:
      type: string
      enum:
        - invalid_request
        - authentication
        - permission
        - not_found
        - conflict
        - rate_limited
        - idempotency_conflict
        - unprocessable
        - upstream_error
        - internal_error
      title: ErrorType
      description: Closed set of high-level categories SDKs branch on.
    ApiKeyRef:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Raw UUID of the key, or ``null`` when unavailable.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Human-readable key name, or ``null`` when unavailable.
        created_by_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Name
          description: >-
            Display name of the user who created the key; ``null`` if
            unavailable.
      type: object
      required:
        - id
        - name
      title: ApiKeyRef
      description: |-
        Reference to the API key that originated an event.

        ``id`` and ``name`` are ``null`` for MCP-origin rows (no key) or rows
        whose key was deleted (FK ``ON DELETE SET NULL``). ``created_by_name``
        is the human name of the key's creator (admin view only -- members
        always see their own keys and don't need this cue).
    ResourceRef:
      properties:
        id:
          type: string
          title: Id
          description: Raw UUID of the resource.
        type:
          type: string
          title: Type
          description: Resource kind, e.g. ``task`` or ``canvas``.
        canvas_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Canvas Id
          description: Raw UUID of the associated canvas, if any.
        canvas_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Canvas Name
          description: Canvas name, if the canvas still exists.
        canvas_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Canvas Url
          description: Frontend URL for the canvas, if any.
      type: object
      required:
        - id
        - type
      title: ResourceRef
      description: >-
        Reference to the resource an event produced or addressed.


        Only present when ``resource_type`` is ``'task'`` or ``'canvas'``.
        Canvas

        fields are individually nullable: the canvas may have been deleted, or
        the

        task may pre-date its eventual canvas.
  securitySchemes:
    API Key:
      type: http
      description: API key from Settings > Developer > REST API
      scheme: bearer

````