create_space
Provision the caller's space. Idempotent — the created flag says whether this call made it.
async fn create_space(&self, input: &CreateSpaceInput) -> Result<SpaceProvision, BrainHttpError>async fn create_space(&self, request: &SpaceCreateRequest) -> Result<SpaceCreateResponse>Parameters
ParameterTypeRequired
metadatastring (wire: bytes | null)optionalOpaque metadata to attach at provision time. Brain stores it and never interprets it.
Returns
FieldTypePresence
spacestringalwaysThe space's id.
createdbooleanalwaystrue when this call made it, false when it was already there. The rest of the body is identical either way, so this flag is the only way to tell. The edge also answers 201 versus 200.
created_at_unix_nanos / last_active_unix_nanos64-bit integeralwaysProvisioning time and last write.
memory_count / session_countintegeralwaysWhat is already in it.
You do not choose your space on the HTTP tier
The space comes from the credential. These verbs act on the caller's space. Addressing another space per request is a wire-tier capability — see act_as. Per-end-user isolation is a storage-key prefix inside one space, not a key per user; see Namespaces.
See also
Was this page helpful?