---
title: "Create a world for an agent"
method: POST
path: "/api/agents/{agentId}/worlds"
tags: ["agents"]
---

# Create a world for an agent

`POST /api/agents/{agentId}/worlds`

Create a new world for a specific agent

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `name` string — Name of the world
  - `sourceType` string — Type of source (e.g., discord, telegram)
  - `sourceId` string — Platform-specific identifier
  - `metadata` object — Additional world metadata

## Response `201`

World created successfully

- object
  - `success` boolean
  - `data` object
    - `world` World
      - `id` string, uuid — Unique identifier for the world
      - `name` string — Name of the world
      - `agentId` string, uuid — ID of the agent that owns this world
      - `sourceType` string — Type of source (discord, telegram, etc)
      - `sourceId` string — Platform-specific identifier
      - `metadata` object — Additional world metadata

## Other responses

- `400` — Invalid agent ID or request
- `404` — Agent not found
- `500` — Error creating world

---

[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)
