# Rename a space and/or change its audience

Any member with access to the space may rename it (`name` alone).

Sending `kind` (and `teamId` for a team space) re-targets the space's
audience — which subject it belongs to, and therefore who can see every
page inside it. Those rules are the platform's, enforced by
`authkit.AuthorizeRetarget` (docs/platform/subjects-and-containers.md):

- the space's creator may re-target their own space; anyone else needs
  `org.data.audience_manage` (owner/admin) — 403 otherwise
- a personal space is never reclassified (400) — move its pages out
  with `updatePage.workspaceId` instead
- only the creator may make a space `personal` (403 otherwise), so a
  space can't vanish into another person's private area
- a `team` target must be a team the caller belongs to (403 otherwise)

Re-submitting the current audience is a no-op and needs no permission.
Audience changes are written to the platform audit log as
`notes.space.audience_changed`.


Canonical: https://easerix.com/docs/developers/api/notes/workspaces/updateWorkspace

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="notes" operations={[{"path":"/v1/workspaces/{id}","method":"patch"}]} />
    </>
  );
}
