Skip to main content
POST
Create API key

Authorizations

Authorization
string
header
required

Worlds API data-plane token.

Body

application/json
namespace
string
required

Namespace to scope the API key to. Required. The key can only access worlds within this namespace.

Minimum string length: 1
worldId
string

Optional world ID to scope the key to a single world. Omit to allow access to all worlds in the namespace.

name
string

Human-readable label for the key. Helps identify keys in the list.

scopes
enum<string>[]

Optional scope grant. Defaults to ["data:read", "data:write"]. Use ["data:read"] for read-only keys.

Available options:
data:read,
data:write

Response

Created API key

uid
string
required

Unique identifier for the created API key.

token
string
required

The full bearer token (wzw format). Displayed once on creation — store it securely.

name
string
required

Human-readable label for the key.

namespace
string
required

Namespace the key is scoped to.

worldId
string | null
required

World ID the key is scoped to, or null if the key has namespace-wide access.

createTime
string
required

ISO 8601 timestamp when the key was created.