internal-billing

Get Workspace Owner Check

Changed on

Re-check whether sub currently owns a workspace (#2181).

Service-authenticated, internal-only, read-only. The billing service calls this before a billing action so a user who has lost ownership since their billing session started (transfer, demotion, erasure) cannot act on the workspace's subscription.

is_owner is strict equality against the canonical owner pointer Workspace.owner_user_id (moved only by the ownership service and erasure). Identity links are not consulted (they share private contexts, not workspace roles) and there is no membership-table fallback.

404 is returned ONLY when no workspace row has this id. A soft-deleted workspace answers 200 is_owner: false — a deliberate deviation from the entitlement read, which 404s on it: the billing service treats a literal 404 as "this route is not deployed" and then falls back to its own session, so an existing-but-deleted workspace must fail closed with false instead. A workspace with no owner pointer also answers false. A row that is gone entirely (hard-deleted) answers 404 by the agreed contract.

Raises: ValidationError: workspace_id is not a UUID or sub is blank (422). NotFoundException: no workspace row has this id (404).

get/internal/workspaces/{workspace_id}/owner

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/internal/workspaces/{workspace_id}/owner
  • Auth: none declared

Path parameters

workspace_idstring required

Query parameters

substring required

User id (users.user_id) whose ownership is re-checked

Headers

authorizationstring nullable

Response

Successful Response

workspace_idstring required
substring required
is_ownerboolean required

Changes