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

# Get an Event

> Retrieves the full stored payload of an Event submitted to this Room through the Factory API.



## OpenAPI

````yaml /openapi.json get /v1/rooms/{roomId}/events/{eventId}
openapi: 3.1.0
info:
  title: Worklayer Factory API
  version: 1.0.0
  description: >-
    Create custom interfaces to interact with your Worklayer factory—an
    always-on workspace with its own connected apps, skills, memory, files, and
    background Workers (also called an Environment in parts of the web app).
    Send Events into Rooms, read Room History, resolve human Reviews, follow or
    steer Workers, and receive real-time updates via signed Subscriptions.
servers:
  - url: https://api.myworklayer.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Rooms
    description: >-
      Create and manage isolated Rooms and read Room History. Every factory
      includes a main Room (`web`) and supports creating additional Rooms via
      the API. Room History is read-only.
  - name: Events
    description: Send Events into a Room and retrieve stored API Events.
  - name: Workers
    description: Inspect, stream, and steer background Workers spawned by your factory.
  - name: Review
    description: >-
      List and resolve pending approvals, questions, and app connections
      blocking a Worker.
  - name: Subscriptions
    description: >-
      Create, update, rotate, and delete HTTPS webhook endpoints for your
      factory.
  - name: Subscription events
    description: Signed webhook payloads delivered by Worklayer when factory events occur.
paths:
  /v1/rooms/{roomId}/events/{eventId}:
    parameters:
      - $ref: '#/components/parameters/RoomId'
      - name: eventId
        in: path
        required: true
        description: The `eventId` from Send an Event.
        schema:
          type: string
        example: b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08
    get:
      tags:
        - Events
      summary: Get an Event
      description: >-
        Retrieves the full stored payload of an Event submitted to this Room
        through the Factory API.
      operationId: getEvent
      responses:
        '200':
          description: The Event.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
              example:
                eventId: b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08
                type: order.shipped
                content: Order 1188 for ticket 4821 is shipped with UPS.
                attributes:
                  orderId: '1188'
                  carrier: UPS
                  trackingNumber: 1Z999AA10123456784
                delivery: queue
                modelContext: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: The Room or the Event was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                message: Not Found
                error: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          description: The Event file is not available now. Try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 503
                message: Event file unavailable
                error: Service Unavailable
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl
            "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08"
            \
              -H "Authorization: Bearer $WORKLAYER_API_KEY"
        - lang: javascript
          label: fetch
          source: >-
            const response = await
            fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08',
            {
              headers: {
                Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
              },
            });

            const data = await response.json();

            console.log(data);
components:
  parameters:
    RoomId:
      name: roomId
      in: path
      required: true
      description: >-
        Room ID. Pass `web` to target your factory's main Room (the conversation
        in the Worklayer web app).
      schema:
        type: string
        minLength: 1
        maxLength: 191
      example: cmhx3q7v20004l808sd5k2r1m
  schemas:
    Event:
      type: object
      required:
        - eventId
        - type
        - content
        - attributes
        - modelContext
        - delivery
      properties:
        eventId:
          type: string
        type:
          type: string
        content:
          type: string
        attributes:
          $ref: '#/components/schemas/JsonObject'
        modelContext:
          $ref: '#/components/schemas/JsonObject'
        delivery:
          $ref: '#/components/schemas/EventDelivery'
    Error:
      type: object
      description: The error body. Most errors have this shape.
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: The HTTP status code.
        message:
          type: string
          description: A short description of the error.
        error:
          type: string
          description: The name of the HTTP status.
    JsonObject:
      type: object
      additionalProperties: true
      description: >-
        A JSON object up to 32 KiB serialized, at most 8 levels deep, with up to
        128 keys per object. The keys `__proto__`, `prototype`, and
        `constructor` are disallowed.
    EventDelivery:
      type: string
      enum:
        - context
        - queue
        - steer
      description: >-
        Controls when the factory processes the Event. `queue` (default): after
        its current work, or immediately if idle. `steer`: mid-flight before the
        next step, or immediately if idle. `context`: stored silently without
        waking the factory and delivered on the next `queue` or `steer` Event.
        See [Events](/events#choose-when-the-factory-reads-an-event).
  responses:
    Unauthorized:
      description: >-
        The API key is missing, not valid or revoked. The response has the
        header `WWW-Authenticate: Bearer`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Unauthorized
    TooManyRequests:
      description: Too many requests in a short time. Wait, then send the request again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 429
            message: 'ThrottlerException: Too Many Requests'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: wrk-…
      description: >-
        Your factory's Worklayer API key (`wrk-...`). See [Get an API
        key](/quickstart#get-an-api-key) and [Authentication](/authentication).
        Requests sent from the playground execute live against your factory.

````

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