---
title: "Update a world"
method: PATCH
path: "/api/agents/{agentId}/worlds/{worldId}"
tags: ["agents"]
---

# Update a world

`PATCH /api/agents/{agentId}/worlds/{worldId}`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/agents/{agentId}/worlds/{worldId}`
- Auth: none declared

Update world properties

## Path parameters

- `agentId` string, uuid, required
- `worldId` string, uuid, required

## Request body

- object
  - `name` string: Updated name for the world
  - `metadata` object: Updated metadata (merged with existing)

## Response `200`

World updated 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 world ID
- `404`: Agent or world not found
- `500`: Error updating world

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
