REST: Invites

Generated from mnema-talk v3.3.13 (cca4f0fdb723).

List my invites

GET /api/me/invites

The invites the signed-in member created, newest first, with the limits new ones must stay within. Needs a session only, so a member whose right was withdrawn still sees (and can revoke) what they made.

Authentication: Session cookie

Responses

StatusMeaningBody
200The member's invites and the limits.MemberInviteList
401No valid session (UNAUTHORIZED): missing, expired or revoked cookie, or the account was disabled.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
MemberInviteList
FieldTypeDescription
invites (required)Invite[]Invites are the member's own, newest first.
limits (required)MemberInviteLimitsLimits are the bounds new invites must stay within.

Create an invite as a member

POST /api/me/invites

Needs the Create invites permission, in the channel when one is named (403 otherwise; a channel the member cannot see answers 404). The invite always expires and has a use limit, both within the bounds the holders of Manage invites set; omitted fields take safe defaults (24 hours, 10 uses). The number of active invites and of invites per hour is limited per member. A lockdown that pauses invites refuses it (409).

Authentication: Session cookie

Request body (application/json, required): CreateMemberInviteRequest

FieldTypeDescription
channel_idstring | nullChannelID is the channel the joiner lands in; omitted: the default channel. The member must see the channel and hold Create invites in it.
expires_in_hoursinteger | nullExpiresInHours is 24 (or the limit, if lower) when omitted; never unlimited.
max_usesinteger | nullMaxUses is 10 (or the limit, if lower) when omitted; never unlimited.

Responses

StatusMeaningBody
201Created invite.Invite
400Invalid input (INVALID_INPUT): malformed JSON, unknown JSON fields, or a value above the limits.ErrorResponse
401No valid session (UNAUTHORIZED): missing, expired or revoked cookie, or the account was disabled.ErrorResponse
403FORBIDDEN: missing the Create invites permission, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: the channel does not exist or the member cannot see it.ErrorResponse
409CONFLICT: the member has too many active invites, or invites are paused.ErrorResponse
429RATE_LIMITED: too many requests, or too many invites created this hour.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Invite
FieldTypeDescription
channel_idstring | nullChannelID is the channel the invite lands the joiner in; null: the default channel. Only invites created from a channel's menu have one.
code (required)string
created_at (required)string (date-time)
created_by_idstring (uuid)CreatedByID and CreatedByName say who created the invite (a server before member invites sends neither, so a client treats them as optional).
created_by_namestring
expires_at (required)string | null
id (required)string (uuid)
max_uses (required)integer | null
uses_count (required)integer
weak (required)booleanWeak is true for a custom code that is easy to guess (too short, a common word). New codes like that are refused and old ones no longer work for sign-up; regenerate them.

Revoke my invite

DELETE /api/me/invites/{id}

Revokes an invite the signed-in member created; accounts that registered with it stay. Another member's invite answers 404. Needs no permission beyond a session, so a member whose right was withdrawn can still revoke what they made.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesResource ID.

Responses

StatusMeaningBody
204Success, no content.
400Invalid input (INVALID_INPUT): malformed JSON, unknown JSON fields, bad IDs or failed validation.ErrorResponse
401No valid session (UNAUTHORIZED): missing, expired or revoked cookie, or the account was disabled.ErrorResponse
403FORBIDDEN: cross-origin request rejected.ErrorResponse
404NOT_FOUND: the invite does not exist or is not the member's.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Something wrong on this page? Tell us.