Grant a federation share (write-ahead audit)
POST /admin/federation/shares
Creates federation_shares row + emits aa:Share activity + writes federation.share.granted audit event — all in one transaction per the design proposal §7.2 write-ahead invariant. Idempotent: duplicate POST on the active-row tuple (grantor, object, peer, target_user) returns 409 with the existing share.
Permission: caller must own the object OR have system.admin. Restricted objects require target_user_url (NaCl envelope wrap needs a key).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
‘user’ is excluded from the operator-facing API — user/follower shares are server-internal (Accept(Follow) creates them).
Recipient’s actor URL on the peer. Omit for a broadcast share (any user on the peer). REQUIRED for restricted/embargo objects (server validates).
Responses
Section titled “ Responses ”Share granted.
One federation_shares row per the 1.22.C design proposal. Pairing alone shares nothing; each row here is an explicit per-object grant.
object
NULL = broadcast within peer; non-null = specific user actor URL
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedObject or peer not found.
object
Human-readable error summary
Example
the request could not be completedActive share already exists for this tuple.
One federation_shares row per the 1.22.C design proposal. Pairing alone shares nothing; each row here is an explicit per-object grant.
object
NULL = broadcast within peer; non-null = specific user actor URL