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

# Workspace change feed

> The account-wide change feed, NEWEST-FIRST. Poll with `since`: when `has_more` is false, the page holds every event since your checkpoint — save `next_since` (the newest `created_at`), overlap the next poll by a second, dedupe on event `id`. When `has_more` is true the window overflowed one page and middle events are NOT reachable by paging — recover by state, not by log: `GET /{resource}?filter[updated_at][gte]=<checkpoint>` per synced resource. Batch-refetch changed entities with `filter[id][in]=…`.



## OpenAPI

````yaml https://www.merchkit.com/api/v1/openapi get /events
openapi: 3.1.0
info:
  title: Merchkit API
  version: 1.0.0
  description: >-
    Operate your Merchkit PIM programmatically. Products, images, vendors,
    categories, and data sources are all "entities" in one uniform shape: system
    fields (`id`, `type`, `label`, `parent_id`, timestamps) at the top level and
    every customer-defined key — scalars AND references — in a sparse
    `attributes` map. References read as labeled stubs `{id, type, label}` and
    write as bare UUIDs or `{id}` objects ("write what you read"). UUIDs are the
    only path identifiers; find by your own key with a filter (`GET
    /products?filter[sku]=ARIA-DT-72`) or write by it with `POST
    /{resource}/upsert` and `/batch` (products, images, vendors, and categories
    only — sources have neither route; they are created by the async `POST
    /sources` job pipeline). Start every integration with `GET
    /attributes?type=product` to learn your keys. Completeness is per-channel.
    All errors share one envelope (see the `Error` schema). Authenticate with a
    workspace-scoped API key: `Authorization: Bearer mk_live_...`. See /llms.txt
    for an agent guide.
servers:
  - url: https://www.merchkit.com/api/v1
    description: Merchkit API v1
security:
  - ApiKeyAuth: []
paths:
  /events:
    get:
      summary: Workspace change feed
      description: >-
        The account-wide change feed, NEWEST-FIRST. Poll with `since`: when
        `has_more` is false, the page holds every event since your checkpoint —
        save `next_since` (the newest `created_at`), overlap the next poll by a
        second, dedupe on event `id`. When `has_more` is true the window
        overflowed one page and middle events are NOT reachable by paging —
        recover by state, not by log: `GET
        /{resource}?filter[updated_at][gte]=<checkpoint>` per synced resource.
        Batch-refetch changed entities with `filter[id][in]=…`.
      operationId: listEvents
      parameters:
        - name: since
          in: query
          schema:
            type: string
            format: date-time
          description: Only events created at/after this ISO-8601 timestamp.
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
      responses:
        '200':
          description: Change events, newest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                  pagination:
                    $ref: '#/components/schemas/EventPagination'
              example:
                data:
                  - id: e7c94b1f-2a68-4d05-9c3e-8b1f6a2d7c50
                    type: entity.updated
                    entity_id: 9b2f6c1e-8a04-4c6e-b0d3-5f2f6f7a9e21
                    entity_type: product
                    attribute_key: price
                    value: 1299
                    actor:
                      kind: api_key
                    created_at: '2026-07-18T09:30:22Z'
                pagination:
                  limit: 50
                  has_more: false
                  next_since: '2026-07-18T09:30:22Z'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Event:
      type: object
      description: >-
        One change event from the append-only log. New-value-only: there is no
        old value and no diff. Actor is `{kind}` only — no emails or key ids
        pass through the feed.
      required:
        - id
        - type
        - entity_id
        - entity_type
        - attribute_key
        - value
        - actor
        - created_at
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - entity.created
            - entity.updated
            - entity.deleted
        entity_id:
          type: string
          format: uuid
        entity_type:
          type:
            - string
            - 'null'
          description: Null once the entity has been deleted.
        attribute_key:
          type:
            - string
            - 'null'
          description: The changed attribute for entity.updated; null otherwise.
        value:
          description: >-
            The NEW value for entity.updated events; null otherwise. The log
            stores only what was written — no old values.
        actor:
          type: object
          required:
            - kind
          properties:
            kind:
              type: string
              enum:
                - user
                - api_key
                - system
        created_at:
          type: string
          format: date-time
      example:
        id: e7c94b1f-2a68-4d05-9c3e-8b1f6a2d7c50
        type: entity.updated
        entity_id: 9b2f6c1e-8a04-4c6e-b0d3-5f2f6f7a9e21
        entity_type: product
        attribute_key: price
        value: 1299
        actor:
          kind: api_key
        created_at: '2026-07-18T09:30:22Z'
    EventPagination:
      type: object
      description: >-
        Event feeds page differently: newest-first with a `next_since`
        checkpoint instead of total/offset.
      properties:
        limit:
          type: integer
        has_more:
          type: boolean
          description: >-
            True when the window exceeded one page — recover by state
            (`filter[updated_at][gte]=<checkpoint>`), not by paging.
        next_since:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The newest `created_at` on the page — your next `since` checkpoint
            (overlap by 1s and dedupe on event id).
      example:
        limit: 50
        has_more: false
        next_since: '2026-07-18T09:30:22Z'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace-scoped API key. Available scopes:

        - `read:products`: List and read products, including variants,
        references, and completeness.

        - `write:products`: Create, update, and upsert products and their
        attribute values.

        - `delete:products`: Delete products.

        - `read:images`: List and read images.

        - `write:images`: Create, update, and upsert images and their attribute
        values.

        - `delete:images`: Delete images.

        - `read:vendors`: List and read vendors.

        - `write:vendors`: Create, update, and upsert vendors and their
        attribute values.

        - `delete:vendors`: Delete vendors.

        - `read:categories`: List and read categories.

        - `write:categories`: Create, update, and upsert categories and their
        attribute values.

        - `delete:categories`: Delete categories.

        - `read:sources`: List and read data sources, including scraped content.

        - `write:sources`: Create data sources (triggers processing) and update
        their attribute values.

        - `delete:sources`: Delete data sources.

        - `read:attributes`: List and read attribute definitions.

        - `write:attributes`: Create and update attribute definitions.

        - `read:views`: List and read saved grid views (MCP surface).

        - `write:views`: Create and update grid views (MCP surface).

        - `read:channels`: Read the enabled channel catalog.

        - `read:events`: Read the workspace change feed and per-entity events.

        - `read:jobs`: List and poll asynchronous job status.

````