APIQuery

Query

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

Command 2

commands

commands(surface: CommandSurface, commandContext: CommandContextInput): [Command!]!

The commands the caller may run on surface (default PALETTE), sorted by id.

A command the server runs is listed only when commandContext.workspaceId names a workspace the caller is a member of, their role there may run it, and they hold each of its required capabilities. The commands the client runs itself are listed in every context. A listed command is one executeCommand runs for the caller in that context, apart from a confirmation, a timeout in force and the arguments given. Naming the direct space makes the caller a guest of it.

AI lists only the AI-callable commands, the caller's agent-callable macros among them, and fails with FEATURE_DISABLED while the AI command surface is off.

commandDiscover

commandDiscover( intentPhrase: String limit: Int workspaceId: ID ): [Command!]!

The AI-callable commands the caller may run, for an AI agent to discover its tools.

Filtered as commands filters: a command the server runs is listed only when workspaceId names a workspace the caller is a member of, their role there may run it, and they hold each of its required capabilities; the commands the client runs itself are always listed. A listed command is one executeCommand runs for the caller in that workspace, apart from a confirmation, a timeout in force and the arguments given.

With intentPhrase the commands are ranked by how well the phrase matches their intent samples, title and natural-language description. limit defaults to 50 and is capped at 100. workspaceId scopes the list to one workspace; the caller's agent-callable macros are listed for a workspace where they may run every step.

Limited to 5 calls per 60-second sliding window per user; more fail with RATE_LIMITED. Fails with FEATURE_DISABLED while the AI command surface is off.

Macro 3

macroStepCommands

macroStepCommands: [Command!]!

Every built-in and app command a macro step may name, sorted by id, whatever the caller's role and workspace: the built-ins the server runs and those the client runs, and the app commands other than the agent-management ones. Plugin commands are not in it.

myMacros deprecated

myMacros(serverId: ID!): [MacroDef!]!

The caller's own macros in the workspace. FORBIDDEN for a non-member.

macroByName deprecated

macroByName(serverId: ID!, name: String!): MacroDef

No description in the schema.

Keybind 1

resolvedKeybinds

resolvedKeybinds(workspaceId: ID): [Keybind!]!

No description in the schema.

Conversation 4

conversation

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

No description in the schema.

inboxConversations

inboxConversations( serverId: ID! dir: PageDir! cursor: InboxCursorInput limit: Int! ): ConversationPage!

No description in the schema.

conversationMemberRemovals

conversationMemberRemovals( serverId: ID! conversationId: ID! limit: Int ): [ConversationMemberRemoval!]!

A channel's latest removals (someone removed by an Owner or Moderator), newest first: at most limit, 50 by default and at most 100. Empty for a group or DM. Errors as for conversation. Listed in serverInfo.capabilities as conversation_member_removals.

mutedConversations

mutedConversations(serverId: ID!): [MutedConversation!]!

No description in the schema.

Channel 3

channels

channels( serverId: ID! dir: PageDir! cursor: ChannelCursorInput limit: Int! filter: ChannelListFilter ): ChannelPage!

No description in the schema.

channelLenses

channelLenses(serverId: ID!, conversationId: ID!): [ChannelLens!]!

No description in the schema.

applyChannelLens

applyChannelLens( serverId: ID! conversationId: ID! lensId: ID! limit: Int! = 50 ): [Message!]!

No description in the schema.

ArgumentTypeDescription
serverIdID!
conversationIdID!
lensIdID!
limitInt! = 50

Message 9

messages

messages( serverId: ID! conversationId: ID! dir: PageDir! cursor: MessageCursorInput limit: Int! includeDeleted: Boolean! ): MessagePage!

No description in the schema.

message

message( serverId: ID! conversationId: ID! messageId: ID! ): Message!

No description in the schema.

messageChanges

messageChanges(input: MessageChangesInput!): [ConversationMessageChanges!]!

The message change feed: for each conversation, the messages created, edited or deleted after its cursor (timeline and thread replies alike), oldest change first. A client cache stores each returned cursor and passes it back as after.

threadByRootMessage

threadByRootMessage( serverId: ID! conversationId: ID! rootMessageId: ID! ): Thread

No description in the schema.

threadMessages

threadMessages( serverId: ID! conversationId: ID! threadId: ID! dir: PageDir! cursor: MessageCursorInput limit: Int! includeDeleted: Boolean! ): MessagePage!

No description in the schema.

pinnedMessages

pinnedMessages(serverId: ID!, conversationId: ID!): [Message!]!

No description in the schema.

messageReports

messageReports( serverId: ID! status: MessageReportStatus dir: PageDir! cursor: MessageReportCursorInput limit: Int! ): MessageReportPage!

Message reports of the workspace (all statuses when status is omitted), ordered createdAt ASC, id ASC. Owner/Moderator only; for the direct space, instance operators only. The message body is included only when the moderator can read the conversation.

messageReport

messageReport(serverId: ID!, reportId: ID!): MessageReport!

One report of the workspace. Owner/Moderator only; for the direct space, instance operators only. For a verified report of an encrypted message it includes frankedContent, and records that the moderator viewed it (e2ee.report_viewed).

memberMessageCounts

memberMessageCounts( serverId: ID! userId: ID! since: DateTime ): MemberMessageCounts!

How many of a person's messages in the workspace's channels, sent at or after since (all of them when null), deleteMemberMessages would reach: in channels the caller reads, and in private channels the caller is not in (numbers only). Owner/Moderator; the targeting rules of kickMember, and works for a former member. Listed in serverInfo.capabilities as delete_member_messages.

searchMessages

searchMessages(input: SearchMessagesInput!): SearchResultPage!

Full-text search over the messages of a workspace the caller can read. input.query accepts free text plus the operators from:@user, in:#channel, has:link, has:attachment, after:YYYY-MM-DD and before:YYYY-MM-DD.

Results are cursor-paginated by recency, (sentAt, id), like every other message list. They are not ordered by rank: a relevance score is neither unique nor stable, so paging by it would skip or repeat results. rank and headline come with every item for display or a sort within the page.

Server 6

myServers

myServers: [Server!]!

No description in the schema.

server

server(serverId: ID!): Server!

No description in the schema.

serverMembers

serverMembers(serverId: ID!): [ServerMember!]!

No description in the schema.

serverBans

serverBans(serverId: ID!): [ServerBan!]!

Active bans of the workspace, newest first. Owner/Moderator only.

remoteServer

remoteServer(origin: String!): RemoteServer!

Pin the server at origin through this relay and return its discovery document.

serverInfo

serverInfo: ServerInfo!

The server's release version, API version, features, audit retention, instance notice, terms URL, limits, DM settings, abuse contact, minimum age and default workspace. Readable without a session.

Workspace 5

workspacePresence

workspacePresence(workspaceId: ID!): [UserPresenceGql!]!

Presence of the workspace's members who sent a heartbeat. A guest sees only the members they share a conversation with, as in the member directory.

workspaceState

workspaceState( serverId: ID! key: String! scope: WorkspaceStateScopeGql! ): WorkspaceStateEntryGql

No description in the schema.

workspaceStateList

workspaceStateList( serverId: ID! prefix: String! scope: WorkspaceStateScopeGql! limit: Int ): [WorkspaceStateEntryGql!]!

No description in the schema.

workspacePlugins

workspacePlugins(serverId: ID!): [WorkspacePlugin!]!

The workspace's plugin registry, ordered by plugin id. Any member, guests included.

workspaceInvites

workspaceInvites( serverId: ID! dir: PageDir cursor: WorkspaceInviteCursorInput limit: Int ): WorkspaceInvitePage!

The workspace's invites, newest first (createdAt DESC, id DESC), revoked, expired and used-up ones included. AFTER pages go to older invites. Defaults: dir AFTER, limit 50 (clamped to 1..=100). Owner only: anyone else gets FORBIDDEN. An invite's token is never listed.

Emoji 1

customEmojis

customEmojis(serverId: ID!): [CustomEmoji!]!

No description in the schema.

Pipeline 1

pipelines

pipelines(serverId: ID!, enabled: Boolean): [PipelineGql!]!

No description in the schema.

Audit 1

listAuditLog

listAuditLog(filter: AuditLogFilterInput, pagination: AuditLogPaginationInput): AuditLogPage!

Query the command audit log. Owners and moderators of a workspace read its whole log by setting filter.serverId. Everyone reads their own rows by setting filter.actorUserId to themselves. A filter with neither is rejected.

Invite 1

previewInviteToken

previewInviteToken(token: String!): InviteTokenPreviewGql!

Preview a registration token without consuming it.

Returns minimal metadata so the frontend can render the correct signup copy before the user submits credentials. Rate-limited at 30 req / 5 min per IP; no authentication required.

Notification 3

myNotificationSettings

myNotificationSettings(serverId: ID!): NotificationSettings!

The viewer's notification settings in the workspace (defaults until first saved).

myNotifications

myNotifications( serverId: ID! unreadOnly: Boolean dir: PageDir cursor: NotificationCursorInput limit: Int ): NotificationPage!

The viewer's notifications in the workspace, newest first (createdAt DESC, id DESC). AFTER pages go to older notifications. Defaults: unreadOnly false, dir AFTER, limit 50 (clamped to 1..=100).

myUnreadNotificationCount

myUnreadNotificationCount(serverId: ID!): Int!

Unread notifications of the viewer in the workspace (the bell badge).

Key 4

myKeyIdentity

myKeyIdentity: KeyIdentity!

The signed-in account's key log, devices and profile card on this server.

keyLog

keyLog(principalId: String!): [KeyLogEntry!]!

The public key log of a principal enrolled on this server, oldest first; empty when none is. No session needed: a person who lost every device reads the head here to sign a recovery rotation (rotateIdentityKey).

myMlsKeyPackageStatus

myMlsKeyPackageStatus: [MlsKeyPackageStatus!]!

The session device's stored key packages, per cipher suite.

sessionKeepKey

sessionKeepKey: String

The keep key the server holds for this session, 32 bytes as unpadded base64url, in the clear: what a web client signed in with "Keep me signed in" opens its data key with at start. null for a session signed in without it, and for one whose client holds its own keep key.

Device 4

deviceLink

deviceLink(linkId: String!): DeviceLink!

One of the signed-in account's device links: its state, expiry and, once the new device sent it, the sealed offer.

deviceLinkAnswer

deviceLinkAnswer(linkId: String!): SealedMessage

The sealed answer for the new device, null until the old device sends it. No session needed: the link id is the capability.

principalDevices

principalDevices(principalIds: [String!]!): [PrincipalDevices!]!

The certified devices of principals who share a workspace with the caller (the direct space included); an empty list for any other principal. At most 100 ids.

deviceRevocationStatus

deviceRevocationStatus(deviceId: ID!): [RevocationFanout!]!

Where the revocation of one of the caller's devices stands at each host holding them.

Relay 2

relayInfo

relayInfo: RelayInfo!

This server's id, roles and direct space. Readable without a session; a signed-in local user of a relay becomes a guest of the direct space, if not one yet.

relayItems

relayItems(after: ID, limit: Int): RelayItemPage!

The session device's queued host events above after (its cursor when omitted). limit is 1 to 500, 200 by default.

Report 1

instanceReports

instanceReports( openOnly: Boolean! = true after: ID limit: Int! = 100 ): [InstanceAbuseReport!]!

Abuse reports filed with this server, oldest first, a page at a time. Instance operators only; anyone else gets FORBIDDEN.

ArgumentTypeDescription
openOnlyBoolean! = true

Only the reports not yet resolved.

afterID

Start after this report: the last one of the previous page.

limitInt! = 100

The most reports to return, 1 to 500.

User 2

userCommand

userCommand(id: String!): UserCommand

The caller's user command with this id (user.<key>), enabled or not, with its steps in the order they run. Null when the caller has no user command with that id: a built-in id, another user's command and an unknown one all answer null.

userCommands

userCommands: [UserCommand!]!

The caller's user commands, enabled or not, with their steps, sorted by id.

Other 26

thread

thread( serverId: ID! conversationId: ID! threadId: ID! ): Thread!

No description in the schema.

me

me: User!

No description in the schema.

unreadCounts

unreadCounts(workspaceId: ID!): [UnreadCount!]!

No description in the schema.

registrationMode

registrationMode: RegistrationModeGql!

Return the deployment-wide registration mode.

Used by the login page to decide whether to render a "Sign up" link. No authentication required — this is public configuration metadata.

myMlsWelcomes

myMlsWelcomes(after: MlsWelcomeCursorInput, limit: Int): [MlsWelcome!]!

The session device's unacknowledged Welcomes, oldest first, after after (exclusive; from the oldest when null). limit is 1 to 100, 100 by default.

mlsCommits

mlsCommits( serverId: ID! conversationId: ID! incarnation: Int! afterEpoch: Int limit: Int ): MlsCommitPage!

Accepted Commits of an incarnation after afterEpoch (exclusive; from 0 when null), oldest first. limit is 1 to 100, 50 by default.

remoteIdentity

remoteIdentity(principalId: String!, relayUrl: String): RemoteIdentity!

A principal's identity: a local one directly, else fetched from relayUrl (pinning it) and cached for 24 hours.

contacts

contacts: [Contact!]!

The caller's contacts, oldest first.

dmRequests

dmRequests(status: DmRequestStatus): [DmRequest!]!

The caller's DM requests, newest first.

myBlockedPrincipals

myBlockedPrincipals: [BlockedPrincipal!]!

The principals the caller blocked, newest first.

streamHeads

streamHeads(serverId: ID!, streams: [String!]!): [StreamHead!]!

The current seq of each named event stream of a space hosted here that the caller can see; streams the caller cannot see are left out.

remoteSubscriptions

remoteSubscriptions: [RemoteSubscription!]!

The caller's subscriptions to workspaces on other hosts.

instancePrincipalBlocks

instancePrincipalBlocks: [InstancePrincipalBlock!]!

The principals this server refuses, newest first. Instance operators only; anyone else gets FORBIDDEN.

instanceIpBlocks

instanceIpBlocks: [InstanceIpBlock!]!

This server's IP deny list, expired blocks included, oldest first. Instance operators only; anyone else gets FORBIDDEN.

myDmSettings

myDmSettings: MyDmSettings!

Who may start a DM with the caller: their choice for people outside their workspaces, for each workspace's members, and what applies once the operator's and the workspaces' floors are taken in, with where a refusing floor comes from.

publicJoinLink

publicJoinLink(serverId: ID!): PublicJoinLink!

The workspace's public link, its settings and how it is used, for its Owner (FORBIDDEN for anyone else; VALIDATION for the direct space and the server's default workspace). A workspace that never had a link answers with enabled false and a null token.

publicJoinLinkPreview

publicJoinLinkPreview(token: String!): PublicJoinLinkPreview!

What a valid, switched-on public link shows; no sign-in needed. Every other token answers NOT_FOUND with the same message, and an address with 20 such answers in ten minutes gets RATE_LIMITED for every link lookup and join for an hour.

joinRequests

joinRequests( serverId: ID! dir: PageDir cursor: JoinRequestCursorInput limit: Int ): JoinRequestPage!

The workspace's open join requests, newest first (createdAt DESC, id DESC); AFTER pages go to older ones. Defaults: dir AFTER, limit 50 (clamped to 1..=100). Owner and Moderators only: anyone else gets FORBIDDEN.

myJoinRequests

myJoinRequests: [JoinRequest!]!

The caller's open join requests, newest first; at most 20.

bots

bots(serverId: ID!): [Bot!]!

The workspace's bots, deactivated ones included. Any member; FORBIDDEN for anyone else, FEATURE_DISABLED while the bots feature is off.

botTokens

botTokens(botUserId: ID!): [BotToken!]!

The bot's tokens, revoked ones included, never their secret. Owner or Moderator of its workspace; FORBIDDEN for anyone else, NOT_FOUND for an unknown bot, FEATURE_DISABLED while the bots feature is off.

incomingWebhooks

incomingWebhooks(serverId: ID!): [IncomingWebhook!]!

The workspace's incoming webhooks, revoked ones included, never their token. Owner or Moderator; FORBIDDEN for anyone else, FEATURE_DISABLED while the bots feature is off.

webhookFormats

webhookFormats: [WebhookFormatInfo!]!

The ready-made webhook formats, the same for everyone signed in. FEATURE_DISABLED while the bots feature is off.

previewWebhookFormat

previewWebhookFormat( serverId: ID! template: JSON! headers: [WebhookHeaderInput!]! body: String! ): WebhookFormatPreview!

What a sample delivery would come to under template, as a delivery runs it. Nothing is posted or stored. Owner or Moderator of the workspace; FORBIDDEN for anyone else, VALIDATION for a sample over 256 KiB.

webhookTestDeliveries

webhookTestDeliveries(sessionId: ID!, after: Int): WebhookTestDeliveries!

What a test session holds after after, oldest first, and its expiry, which this read extends. Its starter alone; NOT_FOUND for anyone else, for one that ended and once the starter lacks the standing to start it.

homeLayout

homeLayout: HomeLayout

The signed-in person's Home layout, or null when none is stored and the client shows its default Home. FORBIDDEN for a person from another server, whose layout lives at their own server.

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