Skip to content
Create a World

Create a World

Create a World in your workspace.

POST/api/v1/worlds

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/worlds", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "name": "Customer support",
  "description": "An environment for your support agent."
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Request body#

namestringrequired

Trimmed name, 1–255 characters.

descriptionstring | null

Optional description, up to 2,000 characters. null or an empty string clears it.

iconSeedstring | null

Optional icon seed, up to 255 characters. null or an empty string uses the World ID.

Responses#

Returns the created World with iconSeed and ISO timestamps. An unset description is an empty string; an unset iconSeed falls back to the World ID.

201 response
{
  "id": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
  "name": "Customer support",
  "description": "An environment for your support agent.",
  "iconSeed": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
  "createdAt": "2026-10-10T12:00:00.000Z",
  "updatedAt": "2026-10-10T12:00:00.000Z"
}