Optimistic Mutations
Instant local writes via realtime.mutate
realtime.mutate writes through Zero for instant local updates. The mutation
is applied optimistically — your UI updates immediately, then the server
confirms or rebases.
The API matches mutate.* exactly — same resources, same actions, same
parameters. The difference: mutate.* is a REST call that waits for server
confirmation; realtime.mutate.* applies locally first, then syncs.
Mutations are grouped by resource: realtime.mutate.{resource}.{action}(params).
message
Send, edit, and delete messages
message.send
Send a message to a channel. Optionally target a thread or reply to another message.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | string | Yes | |
threadId | string | No | |
channelId | string | Yes | |
content | string | Yes | |
replyingToId | string | No |
message.delete
Permanently delete a message by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
thread
Message threads
thread.insert
Create a new thread attached to a channel.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
channelId | string | Yes | |
serverId | string | Yes | |
title | string | No |
thread.updateTitle
Update the title of an existing thread.
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | string | Yes | |
content | string | Yes |
reaction
Emoji reactions
reaction.insert
Add an emoji reaction to a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
messageId | string | Yes | |
content | string | Yes |
reaction.delete
Remove a reaction by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
indicator
Typing indicators
indicator.insert
Create a typing indicator for real-time presence.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | string | No | |
channelId | string | No | |
threadId | string | No | |
type | string | Yes | |
lastActiveAt | number | No |
indicator.update
Update the last active time of an indicator.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
lastActiveAt | number | No |
indicator.delete
Remove a typing indicator.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
secret
App secrets and API keys
secret.set
Store a secret value (API key, token) for an installed app.
| Parameter | Type | Required | Description |
|---|---|---|---|
appInstallId | string | Yes | |
serverId | string | Yes | |
key | string | Yes | |
value | string | Yes |
secret.delete
Delete a stored secret by key.
| Parameter | Type | Required | Description |
|---|---|---|---|
appInstallId | string | Yes | |
serverId | string | Yes | |
key | string | Yes |
channel
Create and manage channels
channel.insert
Create a new channel in a server.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | string | Yes | |
name | string | Yes | |
description | string | Yes |
channel.update
Update channel properties (name, description, etc.).
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | No | |
description | string | No |
channel.delete
Delete a channel and all its contents.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
pin
Pinned messages
pin.insert
Pin a message in a channel.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | string | No | |
channelId | string | Yes | |
messageId | string | Yes |
pin.delete
Unpin a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
role
Roles and permissions
role.insert
Create a new role with permissions.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
color | string | Yes | |
serverId | string | No |
role.update
Update role name, color, or permissions.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | No | |
color | string | No |
role.delete
Delete a role.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
serverMember
Server membership
serverMember.delete
Remove (kick) a member from the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |