Skip to main content
POST
Approve a pending share request (mod-only)
Org admin. Makes the schema or batch visible org-wide (schema = view; batch = full edit). Mods auto-approve their own shares at create time.

Authorizations

Authorization
string
header
required

Organisation API key from Settings → API / /api/keys/. The secret is shown once. Send Authorization: Bearer sk-abacus-…. One active key per organisation. Ingest (/api/v2/ingest/*) refuses API keys — that surface is Auth0-only with ingest:read / ingest:write scopes.

Path Parameters

id
integer
required

Body

application/json

Body for the decision endpoints (approve / reject / revoke / kick).

All four endpoints accept the same shape — an optional note. The note ends up on the saved OrgLibraryShare.note column.

note
string
Maximum string length: 500

Response

Output projection for an OrgLibraryShare row.

Composed for both the list endpoint and as the response body of every mutation endpoint, so the SPA can re-render the row from a POST response without a follow-up GET. content_object_summary is computed via SerializerMethodField because the underlying target is a generic FK — a normal nested serializer doesn't fit.

id
integer
required
read-only
content_type
string
required
read-only
object_id
integer
required
read-only
content_object_summary
object | null
required

Tiny shape: just enough to render a share row in the UI.

For Struct rows: {"id", "slug", "name", "status"} (slug is the SPA-routing key). For Batch rows: {"id", "name", "status"}. kind distinguishes them when the SPA wants a single discriminator field; it mirrors content_type.model.

state
enum<string>
required
  • pending - Pending
  • approved - Approved
  • rejected - Rejected
  • revoked - Revoked
  • kicked - Kicked
Available options:
pending,
approved,
rejected,
revoked,
kicked
shared_by
object | null
required

Compact user projection for shared_by / decided_by fields.

decided_by
object | null
required

Compact user projection for shared_by / decided_by fields.

decided_at
string<date-time> | null
required
read-only
note
string
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only