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

# Archive a Room

> Archives an API-created Room. Once archived, the Room is omitted from listings and all routes for that Room return `404`. Cannot archive the main Room (`web`).



## OpenAPI

````yaml /openapi.json delete /v1/rooms/{roomId}
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}:
    parameters:
      - $ref: '#/components/parameters/RoomId'
    delete:
      tags:
        - Rooms
      summary: Archive a Room
      description: >-
        Archives an API-created Room. Once archived, the Room is omitted from
        listings and all routes for that Room return `404`. Cannot archive the
        main Room (`web`).
      operationId: archiveRoom
      responses:
        '204':
          description: The Room is archived.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The Room is the main Room.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 403
                message: The web chat Room cannot be changed.
                error: Forbidden
        '404':
          $ref: '#/components/responses/RoomNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X DELETE
            "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m" \
              -H "Authorization: Bearer $WORKLAYER_API_KEY"
        - lang: javascript
          label: fetch
          source: >-
            const response = await
            fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m',
            {
              method: 'DELETE',
              headers: {
                Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
              },
            });

            console.log(response.status); // 204
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
  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'
  schemas:
    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.
  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.