Skip to main content
POST
Create a library invitation

Authorizations

Authorization
string
header
required

First-party Gumnut app session (Clerk session JWT). Only the Gumnut web and mobile apps can obtain one — API keys and OAuth tokens cannot manage credentials or library sharing, so these operations are not callable with the credentials this API otherwise accepts.

Body

application/json
library_id
string
required

ID of the single library this invitation targets.

role
enum<string>
required

Role offered to admitted members.

Available options:
viewer,
collaborator
expires_at
string<date-time>
required

Absolute expiration instant with a timezone offset; must be in the future.

max_joiners
integer
required

Maximum number of distinct accounts that can redeem this invitation.

Required range: 1 <= x <= 100

Response

Existing active invitation with the same policy and link.

invitation
InvitationResponse · object
required

Active invitation whose link is being returned.

url
string
required

Complete browser invitation URL; its fragment contains a bearer secret.