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

> Returns your factory's main Room and all active (non-archived) API-created Rooms, ordered by most recent activity.



## OpenAPI

````yaml /openapi.json get /v1/rooms
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:
    get:
      tags:
        - Rooms
      summary: List Rooms
      description: >-
        Returns your factory's main Room and all active (non-archived)
        API-created Rooms, ordered by most recent activity.
      operationId: listRooms
      parameters:
        - name: limit
          in: query
          description: The maximum number of Rooms on the page.
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
        - name: cursor
          in: query
          description: The `nextCursor` of the previous page.
          schema:
            type: string
            minLength: 1
            maxLength: 1000
            pattern: ^[A-Za-z0-9_-]+$
      responses:
        '200':
          description: A page of Rooms.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomPage'
              example:
                rooms:
                  - id: cmhw0b1k90001l808a1x7v3qe
                    source: web
                    kind: web_chat
                    name: null
                    externalKey: null
                    lastActivityAt: '2026-11-20T09:15:31.044Z'
                    createdAt: '2026-10-02T14:03:12.587Z'
                  - id: cmhx3q7v20004l808sd5k2r1m
                    source: api
                    kind: api
                    name: Support ticket 4821
                    externalKey: zendesk-ticket-4821
                    lastActivityAt: '2026-11-19T17:42:08.311Z'
                    createdAt: '2026-11-19T17:40:55.902Z'
                nextCursor: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl "https://api.myworklayer.com/v1/rooms?limit=20" \
              -H "Authorization: Bearer $WORKLAYER_API_KEY"
        - lang: javascript
          label: fetch
          source: >-
            const response = await
            fetch('https://api.myworklayer.com/v1/rooms?limit=20', {
              headers: {
                Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
              },
            });

            const data = await response.json();

            console.log(data);
components:
  schemas:
    RoomPage:
      type: object
      required:
        - rooms
        - nextCursor
      properties:
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/Room'
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Send this value as `cursor` to get the next page. Null on the last
            page.
    Room:
      type: object
      description: >-
        A conversation between your app and the factory. Each factory has a main
        Room, and you can create more.
      required:
        - id
        - source
        - kind
        - name
        - externalKey
        - lastActivityAt
        - createdAt
      properties:
        id:
          type: string
          description: The Room id.
        source:
          type: string
          enum:
            - web
            - api
          description: >-
            Informational. `web` for the main Room, or `api` for an API-created
            Room.
        kind:
          type: string
          enum:
            - web_chat
            - api
          description: >-
            Informational. `web_chat` for the main Room, or `api` for an
            API-created Room.
        name:
          type:
            - string
            - 'null'
          description: The display name, or null.
        externalKey:
          type:
            - string
            - 'null'
          description: Your key for the Room. Always null for the main Room.
        lastActivityAt:
          type:
            - string
            - 'null'
          format: date-time
          description: The time of the last activity in the Room, or null.
        createdAt:
          type: string
          format: date-time
    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.
  responses:
    BadRequest:
      description: The request is not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            message: Invalid pagination parameters.
            error: Bad Request
    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.