---
title: "Create a room"
method: POST
path: "/api/memory/{agentId}/rooms"
tags: ["memory"]
---

# Create a room

`POST /api/memory/{agentId}/rooms`

Create a new room for an agent

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `name` string, required — Name of the room
  - `type` 'DM' | 'GROUP' | 'CHANNEL' — Type of room
  - `source` string — Source of the room
  - `worldId` string, uuid — ID of the world
  - `serverId` string — Server ID
  - `metadata` object — Additional room metadata

## Response `201`

Room created successfully

- object
  - `success` boolean
  - `data` object
    - `id` string, uuid
    - `name` string
    - `agentId` string, uuid
    - `createdAt` integer
    - `source` string
    - `type` string
    - `worldId` string, uuid
    - `serverId` string
    - `metadata` object

## Other responses

- `400` — Invalid agent ID or missing required fields
- `404` — Agent not found
- `500` — Error creating room

---

[API](https://skmtc.net/elizaos/apis/eliza-os-api.md) · [All operations](https://skmtc.net/elizaos/apis/eliza-os-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elizaos/eliza-os-api/revisions/f43280bfdb0c/schema)
