---
title: "Get Workspace Owner Check"
method: GET
path: "/internal/workspaces/{workspace_id}/owner"
tags: ["internal-billing"]
---

# Get Workspace Owner Check

`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

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).

## Path parameters

- `workspace_id` string, required

## Query parameters

- `sub` string, required: User id (``users.user_id``) whose ownership is re-checked

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- WorkspaceOwnerView: Answer of the ownership re-check: is ``sub`` the workspace owner right now.
  - `workspace_id` string, required
  - `sub` string, required
  - `is_owner` boolean, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `09f17f5ada29`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/changes/internal/workspaces/:workspace_id/owner/get.md)

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
