> ## 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.

# List Workers

> Lists Workers in the Room, ordered by most recent activity. Returns active Workers (`running` and `waiting`) by default. In the main Room (`web`), returns all Workers across the factory; in API-created Rooms, returns only Workers spawned from that Room.



## OpenAPI

````yaml /openapi.json get /v1/rooms/{roomId}/workers
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}/workers:
    parameters:
      - $ref: '#/components/parameters/RoomId'
    get:
      tags:
        - Workers
      summary: List Workers
      description: >-
        Lists Workers in the Room, ordered by most recent activity. Returns
        active Workers (`running` and `waiting`) by default. In the main Room
        (`web`), returns all Workers across the factory; in API-created Rooms,
        returns only Workers spawned from that Room.
      operationId: listWorkers
      parameters:
        - name: status
          in: query
          description: >-
            `active` gives Workers that are `running` or `waiting`. `all` gives
            all Workers.
          schema:
            type: string
            enum:
              - active
              - all
              - running
              - waiting
              - idle
              - failed
              - stopped
            default: active
        - $ref: '#/components/parameters/Limit100'
        - $ref: '#/components/parameters/Cursor4096'
      responses:
        '200':
          description: A page of Workers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerPage'
              example:
                workers:
                  - workerId: 6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f24
                    title: Send tracking number for ticket 4821
                    status: running
                    lastActivityAt: '2026-11-19T17:41:40.006Z'
                nextCursor: null
        '400':
          description: >-
            A query parameter is not valid, or the cursor is from a different
            Room or status filter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                message: Invalid cursor for this request.
                error: Bad Request
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/RoomNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl
            "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/workers?status=active"
            \
              -H "Authorization: Bearer $WORKLAYER_API_KEY"
        - lang: javascript
          label: fetch
          source: >-
            const response = await
            fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/workers?status=active',
            {
              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
    Limit100:
      name: limit
      in: query
      description: The maximum number of items on the page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 30
    Cursor4096:
      name: cursor
      in: query
      description: The `nextCursor` of the previous page.
      schema:
        type: string
        minLength: 1
        maxLength: 4096
        pattern: ^[A-Za-z0-9_-]+$
  schemas:
    WorkerPage:
      type: object
      required:
        - workers
        - nextCursor
      properties:
        workers:
          type: array
          items:
            $ref: '#/components/schemas/Worker'
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Send this value as `cursor` to get the next page. Null on the last
            page. A page can have fewer items than `limit` and still have a
            cursor.
    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.
    Worker:
      type: object
      required:
        - workerId
        - title
        - status
        - lastActivityAt
      properties:
        workerId:
          type: string
        title:
          type: string
          description: Worker title (`Untitled` if none is set).
        status:
          $ref: '#/components/schemas/WorkerStatus'
        lastActivityAt:
          type:
            - string
            - 'null'
          format: date-time
    WorkerStatus:
      type: string
      enum:
        - running
        - waiting
        - idle
        - failed
        - stopped
      description: >-
        `running`: the Worker does work now. `waiting`: the Worker waits, for
        example for an answer from a person. `idle`, `failed` and `stopped`: the
        Worker does not run.
  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
    RoomNotFound:
      description: The Room is not found for this API key, or it is archived.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            message: Room not found.
            error: Not Found
    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.