APIMutation

Mutation

152 mutations, grouped by the domain their name starts with or names, in the order the schema lists them.

Invite 2

createInvite

createInvite(input: CreateInviteInput!): CreateInvitePayload!

No description in the schema.

revokeInvite

revokeInvite(inviteId: ID!): WorkspaceInvite!

Revoke a workspace invite: from now on it admits nobody, and members who joined with it stay. Owner of the invite's workspace only (FORBIDDEN for its other members); NOT_FOUND for an unknown invite or one of a workspace the caller is not in. Revoking a revoked invite returns it unchanged.

Server 2

joinServerByInvite

No description in the schema.

createServer

createServer(input: CreateServerInput!): Server!

No description in the schema.

Message 11

sendMessage

sendMessage(input: SendMessageInput!): Message!

No description in the schema.

replyToMessage

replyToMessage(input: ReplyToMessageInput!): Message!

No description in the schema.

editMessage

editMessage(input: EditMessageInput!): Message!

No description in the schema.

forwardMessage

forwardMessage(input: ForwardMessageInput!): Message!

No description in the schema.

deleteMessage

deleteMessage(input: DeleteMessageInput!): Boolean!

No description in the schema.

pinMessage

pinMessage(input: PinMessageInput!): Boolean!

No description in the schema.

unpinMessage

unpinMessage(input: UnpinMessageInput!): Boolean!

No description in the schema.

clearMessageFlag

clearMessageFlag( serverId: ID! conversationId: ID! messageId: ID! ): Boolean!

Clear the automatic text art check's flag on a message (Owner/Moderator); true when the message is not flagged afterwards, whether or not it was. Audited (admin.clear_message_flag) when a flag was cleared. Listed in serverInfo.capabilities as message_flag.

deleteMemberMessages

deleteMemberMessages( serverId: ID! userId: ID! since: DateTime includeUnjoinedPrivate: Boolean! ): DeletedMemberMessages!

Delete a person's messages in the workspace's channels, thread replies included, sent at or after since (all of them when null); private channels the caller is not in only with includeUnjoinedPrivate. Owner/Moderator, with the targeting rules of kickMember; works for a former member. Never touches DMs, groups, the direct space, encrypted or archived conversations. Deletes at most 1000 messages per call: call again while hasMore. Each channel gets one MessagesDeleted event; audited (admin.delete_member_messages) when any was deleted. Listed in serverInfo.capabilities as delete_member_messages.

sendEncryptedMessage

sendEncryptedMessage(input: SendEncryptedMessageInput!): Message!

An encrypted message under a client-chosen id, in the group's current epoch. Sending the same id and envelope again answers the stored message.

editEncryptedMessage

editEncryptedMessage(input: EditEncryptedMessageInput!): Message!

A new envelope carrying an encrypted message's complete new content.

Conversation 11

createConversation

createConversation(input: CreateConversationInput!): Conversation!

No description in the schema.

updateConversationTopic

updateConversationTopic(input: UpdateConversationTopicInput!): Conversation!

No description in the schema.

leaveConversation

leaveConversation(serverId: ID!, conversationId: ID!): Boolean!

Leave a channel or group (not a DM).

addConversationMembers

addConversationMembers( serverId: ID! conversationId: ID! userIds: [ID!]! = [] remoteMembers: [RemoteMemberInput!] ): Conversation!

Add (invite) people to a channel or group the caller belongs to: workspace members by userIds, and in the direct space anyone by principal id in remoteMembers, here or on another server, as createConversation names them. In the server's default workspace a channel takes them from an Owner, a Moderator or a private channel's creator, a group as a DM with each would be started, and one call names at most 50.

ArgumentTypeDescription
serverIdID!
conversationIdID!
userIds[ID!]! = []
remoteMembers[RemoteMemberInput!]

removeConversationMember

removeConversationMember( serverId: ID! conversationId: ID! userId: ID! ): Boolean!

Remove a member from a channel or group: Owner/Moderator may remove anyone, others only themselves.

setConversationArchived

setConversationArchived( serverId: ID! conversationId: ID! archived: Boolean! ): Conversation!

Archive or unarchive a channel (Owner/Moderator). Archived channels are read-only.

muteConversation

muteConversation(input: MuteConversationInput!): Boolean!

No description in the schema.

unmuteConversation

unmuteConversation(input: UnmuteConversationInput!): Boolean!

No description in the schema.

setConversationNotificationLevel

setConversationNotificationLevel( serverId: ID! conversationId: ID! level: NotificationLevel ): ConversationNotificationLevel!

Set the viewer's level for one conversation they can read; level: null goes back to the workspace default. muteConversation/unmuteConversation keep working alongside.

acceptConversationInvite

acceptConversationInvite(serverId: ID!, conversationId: ID!): Conversation!

Accept the caller's pending invitation (Conversation.pendingMemberIds): they become a member and a member's device adds theirs to the group. Needs a device set up for encryption (VALIDATION otherwise); already a member, it changes nothing; NOT_FOUND when the caller was not invited.

declineConversationInvite

declineConversationInvite(serverId: ID!, conversationId: ID!): Boolean!

Decline the caller's pending invitation; NOT_FOUND when there is none.

Channel 5

joinChannel

joinChannel(serverId: ID!, conversationId: ID!): Conversation!

Join a public, unarchived channel. Idempotent.

createChannelLens

createChannelLens(input: CreateChannelLensInput!): ChannelLens!

No description in the schema.

updateChannelLens

updateChannelLens(input: UpdateChannelLensInput!): ChannelLens!

No description in the schema.

deleteChannelLens

deleteChannelLens(serverId: ID!, lensId: ID!): Boolean!

No description in the schema.

setChannelPosting

setChannelPosting( serverId: ID! conversationId: ID! policy: PostingPolicy! allowsThreads: Boolean! ): Conversation!

Set who may post in a channel: EVERYONE, or MODERATORS (the workspace's Owner and Moderators). Under MODERATORS, allowsThreads says whether everyone else may still add reactions and reply in threads. Owner/Moderator; channels only (VALIDATION otherwise); not on an archived channel. Audited (chat.set_channel_posting).

Attachment 3

createAttachment

createAttachment(input: CreateAttachmentInput!): UploadTicket!

No description in the schema.

finalizeAttachment

finalizeAttachment(input: FinalizeAttachmentInput!): Attachment!

No description in the schema.

deleteAttachment

deleteAttachment(input: DeleteAttachmentInput!): Boolean!

No description in the schema.

Command 1

executeCommand

executeCommand(input: ExecuteCommandInput!): CommandResult!

No description in the schema.

User 3

createUserCommand

createUserCommand(input: CreateUserCommandInput!): Command!

No description in the schema.

updateUserCommand

updateUserCommand(input: UpdateUserCommandInput!): Command!

No description in the schema.

deleteUserCommand

deleteUserCommand(input: DeleteUserCommandInput!): Boolean!

No description in the schema.

Keybind 3

createKeybind

createKeybind(input: CreateKeybindInput!): Keybind!

No description in the schema.

updateKeybind

updateKeybind(input: UpdateKeybindInput!): Keybind!

No description in the schema.

deleteKeybind

deleteKeybind(input: DeleteKeybindInput!): Boolean!

No description in the schema.

Workspace 13

joinDefaultWorkspace

joinDefaultWorkspace: ID!

Join the current default workspace as Member with its public channels. Active bans are refused; existing membership is unchanged.

setWorkspaceState

setWorkspaceState(input: SetWorkspaceStateInput!): WorkspaceStateEntryGql!

No description in the schema.

deleteWorkspaceState

deleteWorkspaceState(input: DeleteWorkspaceStateInput!): Boolean!

No description in the schema.

addWorkspacePlugin

addWorkspacePlugin(input: AddWorkspacePluginInput!): WorkspacePlugin!

Add the statement's plugin to the workspace's registry. Owner or Moderator.

updateWorkspacePlugin

updateWorkspacePlugin(input: UpdateWorkspacePluginInput!): WorkspacePlugin!

Change an entry's statement, status or bundle URL. Owner or Moderator.

removeWorkspacePlugin

removeWorkspacePlugin(serverId: ID!, pluginId: String!): Boolean!

Remove an entry from the workspace's registry. Owner or Moderator.

joinRemoteWorkspace

joinRemoteWorkspace(input: JoinRemoteWorkspaceInput!): RemoteJoinResult!

Join a workspace on another host: the relay presents the caller's identity, proof and delegation, and records the subscription. Through a public link that takes join requests, the host files a request instead (outcome: REQUESTED).

transferWorkspaceOwnership

transferWorkspaceOwnership(input: TransferWorkspaceOwnershipInput!): Server!

Make another member the workspace's owner. The caller becomes a moderator; a workspace has exactly one owner, so this is the only way the owner role moves (setMemberRole never grants it). Both role changes are announced with MemberRoleChanged.

Errors

  • UNAUTHENTICATED: no session.
  • FORBIDDEN: the caller is not the owner.
  • NOT_FOUND: userId is not a member.
  • VALIDATION: the direct space, a guest as the new owner, the caller themself, or a new owner who already owns as many workspaces as the instance allows.

deleteWorkspace

deleteWorkspace(input: DeleteWorkspaceInput!): DeleteWorkspacePayload!

Delete the workspace for good: its members, channels and conversations with their messages and files, invites, pins, workspace state, keybinds, pipelines, macros, plugins and custom emoji, and the notification rules scoped to it. Every member gets MemberLeft for themself and their event stream for the workspace ends; after that the workspace answers NOT_FOUND or FORBIDDEN like one they never joined.

Errors

  • UNAUTHENTICATED: no session.
  • FORBIDDEN: the caller is not the owner.
  • VALIDATION: the direct space, or confirmName is not the workspace's name.

setWorkspaceDmPolicy

setWorkspaceDmPolicy( workspaceId: ID! outsideFloor: DmOutsideFloor! memberDefault: DmMembers! ): WorkspaceDmPolicy!

Set a workspace's DM rules: the floor for DMs to its members from outside their workspaces, and how a DM from a fellow member arrives unless the recipient chose. The workspace's Owner only; anyone else gets FORBIDDEN.

setMyWorkspaceDmSetting

setMyWorkspaceDmSetting(workspaceId: ID!, members: DmMembers!): MyDmSettings!

Set how a DM from the members of one of the caller's workspaces arrives, whatever the workspace's default. NOT_FOUND unless the caller is a member.

leaveWorkspace

leaveWorkspace(serverId: ID!): Boolean!

Leave the workspace: the caller is removed from it and from every conversation of it, with their macros and pipelines there; their messages stay. Members get MemberLeft with cause left and the caller's event stream for the workspace ends. They come back only with a new invite or the public link.

Errors

  • UNAUTHENTICATED: no session.
  • FORBIDDEN: the caller is not a member.
  • VALIDATION: the direct space, the server's default workspace, or the caller is the owner, who transfers ownership or deletes the workspace instead.

renameWorkspace

renameWorkspace(serverId: ID!, name: String!): Server!

Rename the workspace: trimmed, 1 to 128 characters, not the name of another workspace the owner owns (ignoring case). Every member gets WorkspaceUpdated. Returns the workspace.

Errors

  • UNAUTHENTICATED: no session.
  • FORBIDDEN: the caller is not the owner.
  • VALIDATION: the direct space, or a blank or overlong name.
  • CONFLICT: the owner owns another workspace of that name.

Emoji 2

createCustomEmoji

createCustomEmoji(input: CreateCustomEmojiInput!): CustomEmoji!

No description in the schema.

deleteCustomEmoji

deleteCustomEmoji(emojiId: ID!): Boolean!

No description in the schema.

Macro 4

createMacro deprecated

createMacro(input: CreateMacroInput!): MacroDef!

No description in the schema.

updateMacro deprecated

updateMacro(input: UpdateMacroInput!): MacroDef!

No description in the schema.

deleteMacro deprecated

deleteMacro(macroId: ID!): Boolean!

No description in the schema.

executeMacro deprecated

executeMacro(input: ExecuteMacroInput!): CommandResult!

No description in the schema.

Pipeline 4

createPipeline

createPipeline(input: CreatePipelineInput!): PipelineGql!

Create a pipeline. Any member, but only an Owner or Moderator may give it a Post as bot action (FORBIDDEN), on the Member Joined trigger, with an active bot of the workspace and a plaintext channel that is not archived and that the bot is in (VALIDATION).

updatePipeline

updatePipeline(input: UpdatePipelineInput!): PipelineGql!

Replace a pipeline's definition. Allowed for its creator and for an Owner or Moderator of its workspace; anyone else gets FORBIDDEN. Adding or changing a Post as bot action takes an Owner or Moderator; keeping one unchanged takes only the right to change the pipeline. A client that does not know the action sends it back as chat.post_message with the args it was given, which keeps it; other args are VALIDATION.

deletePipeline

deletePipeline(pipelineId: ID!): Boolean!

Delete a pipeline. Allowed for its creator and for an Owner or Moderator of its workspace; anyone else gets FORBIDDEN.

togglePipeline

togglePipeline(pipelineId: ID!, enabled: Boolean!): PipelineGql!

Switch a pipeline on or off. Allowed for its creator and for an Owner or Moderator of its workspace; anyone else gets FORBIDDEN.

Report 5

reportMessage

reportMessage( serverId: ID! conversationId: ID! messageId: ID! reason: String! ): MessageReport!

Report a message to the workspace moderators, or in the direct space to the instance operators. Any member who can read it, once per message (CONFLICT on a second report). Audited (chat.report_message).

resolveReport

resolveReport( serverId: ID! reportId: ID! outcome: ReportOutcome! ): MessageReport!

Close an open report as resolved or dismissed (Owner/Moderator; for the direct space, an instance operator). Audited (admin.resolve_report).

reportEncryptedMessage

reportEncryptedMessage(input: ReportEncryptedMessageInput!): Boolean!

Report an encrypted message by revealing its content and franking key; the server checks them against its receipt before the moderators see them.

reportDmRequest

reportDmRequest(id: ID!, reason: String!): Boolean!

Report a DM request as abuse; a pending one is ignored too.

instanceResolveReport

instanceResolveReport(id: ID!): InstanceAbuseReport!

Mark an abuse report resolved; NOT_FOUND when there is no such report. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
idID!

The report's id.

Notification 2

updateNotificationSettings

updateNotificationSettings(serverId: ID!, input: UpdateNotificationSettingsInput!): NotificationSettings!

Replace the viewer's notification settings in the workspace (default level, keywords, daily do-not-disturb window, digest, reactions). Keywords: at most 20, each 2 to 40 characters.

markNotificationsRead

markNotificationsRead( serverId: ID! ids: [ID!] allBefore: DateTime ): Int!

Mark the viewer's notifications read: the given ids, or every notification created at or before allBefore (exactly one of the two). Returns how many changed.

Key 7

keyLoginChallenge

keyLoginChallenge: KeyLoginChallenge!

Start a key login: a single-use challenge for a device to sign. No session needed.

loginWithKey

loginWithKey( proof: SignedStatementInput! passwordTicket: String keepSignedIn: Boolean! keepKeyHeld: Boolean! ): LoginPayload!

Sign in with a login statement signed by one of the account's device keys. Sets the session and CSRF cookies.

An account of this server also brings passwordTicket, from passwordLoginFinish: single use, valid for 120 seconds, and only for that account. Without one, with one that is used, expired or another account's, or for an account without a password, the answer is UNAUTHENTICATED, as for a wrong proof. Accounts of other servers sign in with the key alone.

keepSignedIn ("Keep me signed in") sets persistent cookies. Unticked, the cookies last until the browser closes and the session answers only requests that carry sessionSecret (returned here) in the X-RIM-Session-Secret header; plain file downloads, reloadSession and logout excepted. A kept session of a client that holds its own keep key (keepKeyHeld, the desktop app) gets no keepKey; a web client's kept session gets the keep key the server holds for it.

rotateIdentityKey

rotateIdentityKey(input: RotateIdentityKeyInput!): KeyIdentity!

Append a rotation to the key log. A rotation signed by the recovery key works without a session, revokes every device and session, and enrolls the device given with it.

signupWithKey

signupWithKey(input: SignupWithKeyInput!): SignupWithKeyPayload!

Create an account from a key identity and a password: passwordRegistration is the OPAQUE RegistrationUpload registered with passwordRegistrationStart. The registration mode decides the tokens (exactly one in invite-only mode, none in open mode, one token or proofOfWork in pow mode). An instance invite bound to an email address gives the account that address (EMAIL_TAKEN when another account has it); otherwise the account has no email. Signs the new account in on the device that signed up, setting the session and CSRF cookies, and returns the account's new server share in the clear.

uploadMlsKeyPackages

uploadMlsKeyPackages(keyPackages: [String!]!): MlsKeyPackageStatus!

Store key packages of the session's device, all or none. A last-resort package replaces the device's previous one.

claimMlsKeyPackages

claimMlsKeyPackages(input: ClaimMlsKeyPackagesInput!): [ClaimedKeyPackage!]!

One key package per device waiting to be added; devices with none usable are left out.

setReloadKey

setReloadKey: String!

Make a new reload key for this session, which was signed in without "Keep me signed in", and return it, 32 bytes as unpadded base64url. The tab seals what it stores in sessionStorage under it, right after signing in and after each reload. The server keeps only this key; the previous one stops opening anything. UNAUTHENTICATED for a kept session.

Device 7

addDeviceKey

addDeviceKey(certificate: SignedStatementInput!): DeviceKey!

Add a device certified by the current identity key.

revokeDeviceKey

revokeDeviceKey(revocation: SignedStatementInput!): DeviceKey!

Revoke a device, signed by the identity key or by the device itself. Ends its sessions.

startDeviceLink

startDeviceLink: StartedDeviceLink!

Start linking a new device to the signed-in account. Cancels the account's previous live link. The link lives 10 minutes.

sendDeviceLinkOffer

sendDeviceLinkOffer(linkId: String!, offer: SealedMessageInput!): Boolean!

The new device's sealed offer. No session needed: the link id is the capability.

sendDeviceLinkAnswer

sendDeviceLinkAnswer(linkId: String!, answer: SealedMessageInput!): DeviceLink!

The old device's sealed answer, carrying the new device's certificate. The link then lives another 10 minutes.

completeDeviceLink

completeDeviceLink(linkId: String!): Boolean!

Called by the new device right after its first loginWithKey.

cancelDeviceLink

cancelDeviceLink(linkId: String!): Boolean!

Cancel a link from either device, with or without a session.

Relay 2

ackRelayItems

ackRelayItems(upTo: ID!): Boolean!

Move the session device's cursor up to upTo.

leaveRelay

leaveRelay: Boolean!

Cancel the caller's subscriptions at every host, then delete their queue, requests, contacts and blocks on this relay.

Other 65

logout

logout: Boolean!

No description in the schema.

logoutOtherSessions

logoutOtherSessions: Int!

End every session of the signed-in account except this one. Returns how many ended.

toggleReaction

toggleReaction(input: ToggleReactionInput!): [ReactionGroup!]!

No description in the schema.

markAsRead

markAsRead(input: MarkAsReadInput!): Boolean!

No description in the schema.

markAsUnread

markAsUnread(input: MarkAsUnreadInput!): Boolean!

Moves the viewer's read marker back so that the message and every later one count as unread. Nothing becomes less unread: when they already count, the marker stays. Notifications already read stay read.

markAllAsRead

markAllAsRead(input: MarkAllAsReadInput!): Boolean!

No description in the schema.

startTyping

startTyping(serverId: ID!, conversationId: ID!): Boolean!

Announce that the caller is typing in a direct conversation. Typing is announced in direct conversations only: the mutation answers true when it emitted a TypingStarted event and false when it did not, which is in a channel or a group, in a DM whose message request the caller has not accepted, or on a repeat inside the throttle window.

heartbeat

heartbeat(input: HeartbeatInput!): Boolean!

No description in the schema.

updateMyProfile

updateMyProfile(input: UpdateMyProfileInput!): User!

Update fields on the authenticated user's profile.

Returns the full updated User so the client can refresh local cache without an extra me { ... } round-trip.

Errors

  • UNAUTHENTICATED — no session.
  • FEATURE_DISABLED — avatarUrl given while the instance has the avatars feature off.
  • FORBIDDEN — displayName from a member whose relay is another server; their display name comes from their profile card.
  • VALIDATION — displayName > 64 chars, statusText > 256 chars, bio > 2000 chars, or avatarUrl neither empty nor the URL of one of the caller's own uploaded avatars (/api/files/avatars/<caller id>/avatar-<content hash>.<ext>, as POST /api/files/avatar answers it).
  • NOT_FOUND — caller's user row missing (should not happen in practice).
  • INTERNAL — repository failure.

Examples

mutation Update($input: UpdateMyProfileInput!) {
updateMyProfile(input: $input) {
id username displayName avatarUrl statusText bio
}
}

setMemberRole

setMemberRole( serverId: ID! userId: ID! role: ServerMemberRoleGql! ): ServerMember!

Change a member's role. Owner: any role but OWNER, never their own. Moderator: MEMBER <-> GUEST only. Audited (admin.set_member_role).

kickMember

kickMember( serverId: ID! userId: ID! reason: String ): Boolean!

Remove a member from the workspace (Owner/Moderator; nobody can kick the owner, and a moderator cannot kick a moderator), with their macros and pipelines there. They may re-join with a new invite. Audited.

banMember

banMember( serverId: ID! userId: ID! reason: String expiresAt: DateTime ): ServerBan!

Remove a member and block them from re-joining until expiresAt (or until unbanned when omitted). Same targeting rules as kickMember. Audited.

unbanMember

unbanMember(serverId: ID!, userId: ID!): Boolean!

Lift a ban (Owner/Moderator). Returns whether a ban existed. Audited.

timeoutMember

timeoutMember( serverId: ID! userId: ID! until: DateTime! reason: String ): MemberTimeout!

Time a member out until until (at most 30 days ahead): they keep reading but every write fails with TIMED_OUT. Same targeting rules as kickMember. Audited.

clearTimeout

clearTimeout(serverId: ID!, userId: ID!): Boolean!

End a member's timeout early. Returns whether one was in force. Audited.

setSlowMode

setSlowMode( serverId: ID! conversationId: ID! seconds: Int! ): Conversation!

Set a channel's slow mode, in seconds (0 to 21600; 0 turns it off). Owner/Moderator. Audited (chat.set_slow_mode).

setDoNotDisturb

setDoNotDisturb( serverId: ID! paused: Boolean! until: DateTime ): NotificationSettings!

Turn the viewer's manual do-not-disturb pause on (until turned off, or until until) or off. While paused, notifications are still recorded but arrive quiet.

publishProfileCard

publishProfileCard(card: SignedStatementInput!): ProfileCard!

Publish a profile card signed by the current identity key.

submitMlsCommit

submitMlsCommit(input: SubmitMlsCommitInput!): MlsCommit!

A Commit for the group's current epoch, or an incarnation's first Commit (epoch 0). STALE_EPOCH names the current incarnation and epoch when another Commit came first.

ackMlsWelcomes

ackMlsWelcomes(ids: [ID!]!): Int!

Acknowledge Welcomes of the session's device; answers how many were acknowledged now.

requestMlsReadd

requestMlsReadd(input: RequestMlsReaddInput!): Boolean!

Ask the group's other devices to remove and add the session's device again.

addContact

addContact(principalId: String!, relayUrls: [String!]!): Contact!

Add a contact, or replace its relay URLs (1 to 8 of at most 256 bytes each).

removeContact

removeContact(principalId: String!): Boolean!

No description in the schema.

acceptDmRequest

acceptDmRequest(id: ID!): DmRequest!

Release the request's held items, let later ones flow, and add the sender as a contact.

ignoreDmRequest

ignoreDmRequest(id: ID!): DmRequest!

Delete the request's held items and drop later items of the conversation.

blockPrincipal

blockPrincipal(principalId: String!): Boolean!

Ignore a principal's pending requests and refuse its invites and key package claims.

unblockPrincipal

unblockPrincipal(principalId: String!): Boolean!

No description in the schema.

remoteJoinChallenge

remoteJoinChallenge( hostServerId: String! hostOrigin: String! inviteToken: String publicLinkToken: String ): RemoteJoinChallenge!

Pin the host at hostOrigin as hostServerId and fetch a login challenge from it for a join, with the workspace inviteToken names (the invite is not used), or the workspace, its name and the link's mode publicLinkToken names. At most one of the two.

renewDelegations

renewDelegations(delegations: [SignedStatementInput!]!): [RemoteSubscription!]!

Present fresh delegations of the caller's devices to their hosts; one entry per delegation, in order.

applyRemoteRevocation

applyRemoteRevocation(revocation: SignedStatementInput!): SignedStatement!

Apply a device revocation on this host directly, as an app does when a host did not acknowledge it through the relay. Needs no session: it acts only on the revocation's signature, and attempts are limited per IP. Returns the host's signed acknowledgement.

requestAccountDeletion

requestAccountDeletion(input: RequestAccountDeletionInput!): AccountDeletionSchedule!

Schedule the signed-in account for deletion once the grace period ends (14 days unless the operator set RIM_ACCOUNT_DELETION_GRACE_DAYS, 0 to 30). Every other session of the account ends now; this one keeps working, and cancelAccountDeletion keeps the account until the grace period ends. me.deletionScheduledFor shows the pending deletion.

Then the account is purged: its sessions, devices, keys, workspace memberships, plaintext messages, files and personal settings are removed, workspaces where it was the only member are deleted, and its username becomes free. The user row stays as a tombstone (deleted-<id prefix>, "Deleted account", no email, password or key) that cannot sign in and shows in no member list or search; it stays the author of the account's encrypted messages, which are kept so the conversations' history does not shift, and of a deleted message others replied to. The tombstone keeps the account's key identity id, so the same key identity cannot sign up on this server again.

Errors

  • UNAUTHENTICATED: no session.
  • FORBIDDEN: a person from another server, who deletes their account at their relay.
  • VALIDATION: confirmUsername is not the account's username, or the account owns a workspace that has other members: hand it over (transferWorkspaceOwnership) or delete it (deleteWorkspace) first.
  • CONFLICT: a deletion is already pending.

cancelAccountDeletion

cancelAccountDeletion: Boolean!

Cancel the signed-in account's pending deletion during its grace period. Returns whether a deletion was pending.

Errors

  • UNAUTHENTICATED: no session.

instanceBlockPrincipal

instanceBlockPrincipal( principalId: String! reason: String! cascade: Boolean! = false ): [InstancePrincipalBlockOutcome!]!

Block a principal on this server: its pending DM requests are ignored, and the account holding it here has its sessions ended, its invites with uses left revoked and its email refused. Returns one outcome per account blocked, the principal's first. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
principalIdString!

The principal to block (rimp1_…).

reasonString!

Why it is blocked, 1 to 1000 characters.

cascadeBoolean! = false

Also block every account its invites created, recursively.

instanceUnblockPrincipal

instanceUnblockPrincipal(principalId: String!): InstancePrincipalUnblockOutcome!

Lift a principal's block and its account's email block. Ended sessions and revoked invites stay ended. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
principalIdString!

The principal to unblock (rimp1_…).

instanceBlockIp

instanceBlockIp( cidr: String! reason: String! expiresInDays: Int ): InstanceIpBlockOutcome!

Block an address or range, or replace the reason and expiry of its block. A running server applies it within 30 seconds. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
cidrString!

An address or a CIDR range, IPv4 or IPv6.

reasonString!

Why it is blocked, 1 to 1000 characters.

expiresInDaysInt

Days until the block lifts, 1 to 365; null blocks until it is removed.

instanceUnblockIp

instanceUnblockIp(cidr: String!): Boolean!

Lift the block on an address or range, named as it was blocked or in any form naming the same range. Returns whether there was one. A running server applies it within 30 seconds. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
cidrString!

The address or CIDR range to unblock.

instanceClearProfile

instanceClearProfile( principalId: String! reason: String! lockDays: Int ): InstanceProfileClearOutcome!

Clear the display name, picture, status and bio of the account holding a principal on this server, deleting its stored pictures, and optionally lock them: until the lock ends the account can only clear them. Another server keeps showing the display name in its copy of the person's signed profile card. NOT_FOUND when no account here holds the principal. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
principalIdString!

The principal whose account to clear (rimp1_…).

reasonString!

Why it is cleared, 1 to 1000 characters; written to the audit log.

lockDaysInt

Days to lock the profile for, 1 to 365; null leaves it unlocked.

setMyDmSettings

setMyDmSettings(outside: DmOutside!): MyDmSettings!

Set who outside the caller's workspaces may start a DM with them: REQUESTS, or NONE. REQUESTS under a floor that refuses such DMs is VALIDATION, naming it.

updatePublicJoinLink

updatePublicJoinLink(input: UpdatePublicJoinLinkInput!): PublicJoinLink!

Change the workspace's public link: on or off, mode, role (MEMBER or GUEST) and allowRemote. Turning it on for the first time issues its token; turning it off makes every lookup of it answer NOT_FOUND until it is turned on again. Owner only (FORBIDDEN); VALIDATION for the direct space, the server's default workspace and any other role.

reissuePublicJoinLink

reissuePublicJoinLink(serverId: ID!): PublicJoinLink!

Issue a new token for the workspace's public link; the old one stops working at once. The settings stay. Owner only, with the refusals of updatePublicJoinLink.

joinByPublicLink

joinByPublicLink(token: String!, message: String): JoinByPublicLinkPayload!

Join a workspace through its public link (DIRECT), or ask to join with an optional message of at most 500 characters (REQUESTS). For an account of this server; the link never creates an account. An invalid link is NOT_FOUND and counts towards the address's misses (RATE_LIMITED past them); a ban is FORBIDDEN; a full workspace, a too long message, 20 open requests or a decline less than 24 hours ago are VALIDATION; a member or an open request is CONFLICT.

withdrawJoinRequest

withdrawJoinRequest(requestId: ID!): JoinRequest!

Take back the caller's open join request. NOT_FOUND unless it is theirs, CONFLICT once it is no longer open.

acceptJoinRequest

acceptJoinRequest(serverId: ID!, requestId: ID!): JoinRequest!

Accept an open join request: the person joins with the link's current role and the public channels, as a direct join does; a person who has joined another way since is left as they are and the request is closed as accepted. Owner and Moderators only (FORBIDDEN); a request of another workspace is NOT_FOUND, one no longer open is CONFLICT, a ban FORBIDDEN, a full workspace VALIDATION.

declineJoinRequest

declineJoinRequest(serverId: ID!, requestId: ID!): JoinRequest!

Decline an open join request; the person may ask again 24 hours later. Owner and Moderators only, with the refusals of acceptJoinRequest other than the join checks.

passwordRegistrationStart

passwordRegistrationStart(principalId: String!, request: String!): String!

Start registering the password of a new account, before signupWithKey: the OPAQUE RegistrationRequest for principalId, answered with the RegistrationResponse. No session needed. CONFLICT when an account of this server has the principal; RATE_LIMITED when the address asks too often.

passwordLoginStart

passwordLoginStart(principalId: String!, request: String!): PasswordLoginStart!

Start a password login, before passwordLoginFinish: the OPAQUE CredentialRequest for principalId. Every start counts as a wrong try until a login finishes. An account takes ten starts an hour; past that a start is RATE_LIMITED with retryAfterSeconds, the time until the hour's window ends. Nothing locks the password. A principal without a password here gets an answer of the same shape that no password finishes. No session needed.

passwordLoginFinish

passwordLoginFinish(loginId: ID!, credentialFinalization: String!): PasswordLoginFinish!

Finish a password login with the OPAQUE CredentialFinalization. On success the tries are cleared, and the answer carries a single-use ticket for loginWithKey (valid for 120 seconds), the account's server share sealed under the login's transport key, and its rewraps. The login id is used once, whatever the outcome. No session needed. Every refusal is UNAUTHENTICATED: an unknown, used or expired login, or a wrong password.

passwordChangeStart

passwordChangeStart(credentialRequest: String!, registrationRequest: String!): PasswordChangeStart!

Start changing the signed-in account's password: the OPAQUE CredentialRequest for the current password and the RegistrationRequest for the new one. Counts as a try, as for passwordLoginStart. NOT_FOUND when the account has no password.

passwordChangeFinish

passwordChangeFinish( loginId: ID! credentialFinalization: String! registrationUpload: String! rewrap: String! ): PasswordChanged!

Finish a password change: the CredentialFinalization for the current password, the RegistrationUpload for the new one, and the rewrap (the previous unlock key sealed under the new one) for the account's other devices. Keeps the server share, keeps the newest three rewraps, and ends every other session of the account. UNAUTHENTICATED when the current password does not verify or the login is unknown or expired.

passwordResetChallenge

passwordResetChallenge(principalId: String!): KeyLoginChallenge!

Issue a single-use challenge, valid for 120 seconds, for a password-reset statement signed by the recovery key. No session needed.

passwordResetStart

passwordResetStart(statement: SignedStatementInput!, registrationRequest: String!): PasswordResetStart!

Start a password reset: a password-reset statement over a passwordResetChallenge, signed by the recovery key of the account's key log head, and the RegistrationRequest for the new password. No session needed. UNAUTHENTICATED for any statement that does not verify, deliberately not told apart.

passwordResetFinish

passwordResetFinish(resetId: ID!, registrationUpload: String!): Boolean!

Finish a password reset with the RegistrationUpload for the new password. Keeps the server share, deletes the rewraps, clears the tries and the lock, and ends every session of the account. No session needed. UNAUTHENTICATED when the reset is unknown, used or expired. Returns true.

reloadSession

reloadSession: ReloadSessionPayload!

After a reload, hand this session's tab the reload key its stored data is sealed under, and a new one the server keeps instead. It needs the session cookie and the CSRF header, but not the session secret, which the tab lost in the reload. It answers once, and only while the session is unkept and no WebSocket of it is open, within 60 seconds of its WebSocket closing; otherwise UNAUTHENTICATED, and the account is locked on this device.

createBot

createBot(input: CreateBotInput!): CreatedBot!

Create a bot, a guest of the workspace in no channel, and its first token, shown this once. Owner or Moderator; FORBIDDEN for anyone else, VALIDATION for the direct space, a bad field or a workspace with 25 active bots, FEATURE_DISABLED while the bots feature is off.

updateBot

updateBot(input: UpdateBotInput!): Bot!

Change a bot's name, what is said about it or whether it sees members joining. Owner or Moderator of its workspace.

deactivateBot

deactivateBot(botUserId: ID!): Bot!

Deactivate a bot: its tokens stop working, its webhooks are revoked and it leaves the workspace and its channels. Its messages stay. Doing it again changes nothing. There is no way back. Owner or Moderator of its workspace.

createBotToken

createBotToken(botUserId: ID!, label: String!): CreatedBotToken!

Create a token for an active bot, shown this once; a label is 1 to 64 characters and a bot has at most 5 active tokens (VALIDATION). Owner or Moderator of its workspace.

revokeBotToken

revokeBotToken(tokenId: ID!): BotToken!

Revoke a token. Revoking it again changes nothing. NOT_FOUND for an unknown token and for a token of a bot in a workspace the caller does not moderate.

createIncomingWebhook

createIncomingWebhook(input: CreateIncomingWebhookInput!): CreatedIncomingWebhook!

Create a channel's incoming webhook, bound to a bot of its workspace, and add the bot to the channel if it is not there. The token is shown this once. Owner or Moderator, and for a private channel one who is in it; FORBIDDEN for anyone else, VALIDATION for anything but a plaintext channel that is not archived and for a bot of another workspace or a deactivated one, CONFLICT when the channel already has a webhook that is not revoked.

revokeIncomingWebhook

revokeIncomingWebhook(id: ID!): IncomingWebhook!

Revoke a webhook. Revoking it again changes nothing. NOT_FOUND for an unknown webhook and for one of a workspace the caller does not moderate.

updateIncomingWebhookFormat

updateIncomingWebhookFormat( id: ID! preset: WebhookPreset! template: JSON ): IncomingWebhook!

Change how a webhook turns a delivery into a message. The URL stays the same. A template needs the preset PLAIN; PLAIN or GITHUB with no template goes back to that preset. VALIDATION for a format that is refused, naming the rule, and for a revoked webhook; FORBIDDEN for a private channel the caller is not in; NOT_FOUND for an unknown webhook and for one of a workspace the caller does not moderate.

startWebhookTestSession

startWebhookTestSession(serverId: ID!, webhookId: ID): WebhookTestSession!

Open a test session that holds what arrives, in memory, for the caller alone. Without webhookId it answers a token for a URL that posts nothing; with one it copies that webhook's deliveries. Owner or Moderator; FORBIDDEN without the standing of creating a webhook or changing that one's format, NOT_FOUND for an unknown webhook or one of another workspace, RATE_LIMITED past 3 open sessions in the workspace or 20 on the server.

endWebhookTestSession

endWebhookTestSession(sessionId: ID!): Boolean!

Drop a test session and what it holds. Its starter alone; NOT_FOUND for anyone else and for one that ended.

saveHomeLayout

saveHomeLayout(layout: JSON!, editedAt: DateTime!): HomeLayoutSaved!

Save the signed-in person's Home layout, made at editedAt on their device. The stored layout is kept instead when its editedAt is later, an editedAt later than the server's clock counting as the clock; kept says which. VALIDATION names the check a layout fails; FORBIDDEN for a person from another server.

resetHomeLayout

resetHomeLayout: Boolean!

Delete the signed-in person's Home layout, so every device shows the default. Answers whether one was stored. FORBIDDEN for a person from another server.

Generated from rim-ui/schema.graphql, the committed copy of the server's /api/sdl, at bcefe82