The Ontology Sharing API lets an ontology owner grant another user viewer or editor access to an ontology, and lets the recipient accept, leave, and reconcile shares from their inbox. Sharing issues a scoped token to the recipient under the hood; the raw token is never returned to the sharer — it is delivered to the recipient and claimed on accept. All paths are relative to the base URL and require authentication. All responses use the standard envelope.
Endpoints split into sharer-side (you own the ontology and grant access) and recipient-side (an ontology has been shared with you). Recipient-side endpoints additionally rely on your Supabase session, sent via the X-Supabase-Token header, so row-level security scopes the results to you.

Sharer-side

Share an ontology

Grant another user access to one of your ontologies. Identify the recipient by sub, by email, or by username together with organization.

List shares (outbox)

Return every share you have created, most recent first. Optionally filter to a single ontology.
data is an array of share objects (share_id, project_id, share_role, status, recipient identity, and timestamps).

Update the role on a share

Change a share between viewer and editor in place — the recipient is not forced to re-accept. Updating to the role it already has is a no-op that returns data.changed = false.

Revoke a share

Revoke access you previously granted. Pass either a share_id, or a project_id together with a recipient_sub. Revoking is idempotent.

Recipient-side

List inbox

Return every share currently visible to you as a recipient — pending invitations and already-accepted shares. Each entry is annotated with has_local_token so you can tell “accepted on this workspace” from “accepted elsewhere”.
This endpoint takes no parameters.
data is an array of inbox entries (share_id, project_id, share_role, status, has_local_token, sharer identity, and timestamps).

Accept a share

Claim a pending share. The scoped token is vaulted into your workspace so you can open the shared ontology. Idempotent for shares already accepted on this workspace.

Leave a share

Detach yourself from a share you previously accepted (or a pending one). This removes the local token and marks the share left. Idempotent.

Sync inbox

Reconcile your locally-vaulted shares against the source of truth. Local entries whose share is no longer accepted (revoked, superseded, left, or missing) are pruned. Use this as a safety net to catch up after a missed real-time update.
This endpoint takes no parameters.

Warehouse tables

Sharing an ontology shares the concepts. These endpoints share the stored tables underneath — a directory or table in your own warehouse area — with another user, by granting them access on the storage itself. Reach for this when someone needs to read your materialized output directly from their own tools, rather than through your ontology. For sharing individual uploaded files instead, see file sharing.

Share a table

Unshare a table

Takes path and grantee and removes that grantee’s access.

Inspect access

Returns the access list currently in force on a path.
All three resolve path under your own area, so you cannot share, revoke, or inspect data you do not own — the authenticated caller is always the owner.