Manage inbox threads

Mark threads read or unread, clear your whole Inbox at once, mute notifications on a thread, and pin threads to the top with markInboxThreadRead, markAllInboxThreadsRead, setInboxThreadMuted, and setInboxThreadPinned.


These five mutations manage your own relationship to a thread — read state, notification mute, and pin — without touching the thread’s content. Every one of them writes to your own participation record for the thread; nobody else’s read/mute/pin state is affected.

markInboxThreadRead / markInboxThreadUnread

Mark a single thread read or unread for the caller.

Request

mutation MarkThreadRead {
  markInboxThreadRead(threadId: "thread_123") {
    id
    isRead
  }
}
mutation MarkThreadUnread {
  markInboxThreadUnread(threadId: "thread_123") {
    id
    isRead
  }
}

Parameters

ParameterTypeRequiredDescription
threadIdID!YesThe InboxThread to update.

Response

{
  "data": {
    "markInboxThreadRead": {
      "id": "clm4n8qwx000008l0g4oxdqn7",
      "isRead": true
    }
  }
}

Returns

Both mutations return the updated InboxThread.

Errors

CodeWhen
FORBIDDENNo thread matches threadId in your current organization, or you have no participant row on it. Both cases return the same error — there is no separate “not found” code for this pair.
UNAUTHENTICATEDNo valid token was supplied.

markAllInboxThreadsRead

Marks every unread thread in your Inbox for the current organization as read in one call. Always succeeds for an authenticated, in-organization caller — it’s a bulk update, not a per-thread lookup, so there’s nothing to 404 on.

Request

mutation ClearInbox {
  markAllInboxThreadsRead
}

markAllInboxThreadsRead takes no arguments and returns a bare Boolean!.

Response

{
  "data": {
    "markAllInboxThreadsRead": true
  }
}
Scoped to the current organization

Unlike the older markAllMentionsAsRead, this clears unread state only within the organization you’re currently in — threads in your other organizations are untouched. A connected client (another tab, another device) is notified over onMarkAllInboxThreadsRead so it can clear its own badge without refetching.

setInboxThreadMuted

Mute or unmute push/email notifications for one thread, without changing its read state or hiding it from your feed.

Request

mutation MuteThread {
  setInboxThreadMuted(inboxThreadId: "thread_123", muted: true)
}

Parameters

ParameterTypeRequiredDescription
inboxThreadIdID!YesThe InboxThread to mute/unmute.
mutedBoolean!Yestrue to mute, false to unmute.

setInboxThreadMuted returns a bare Boolean! (the new muted state), not the thread.

Response

{
  "data": {
    "setInboxThreadMuted": true
  }
}
Silences notifications only

Muting never hides the thread from your Inbox feed and never changes isRead — it only suppresses push/email delivery for that thread going forward.

Errors

CodeWhen
BAD_USER_INPUTYou have no participant row on inboxThreadId (message: Thread not found.) — note this differs from the FORBIDDEN error markInboxThreadRead throws for the equivalent case.
UNAUTHENTICATEDNo valid token was supplied.

setInboxThreadPinned

Pin or unpin a thread to keep it at the top of your Inbox, outside the normal lastActivityAt ordering.

Request

mutation PinThread {
  setInboxThreadPinned(inboxThreadId: "thread_123", pinned: true)
}

Parameters

ParameterTypeRequiredDescription
inboxThreadIdID!YesThe InboxThread to pin/unpin.
pinnedBoolean!Yestrue to pin, false to unpin.

setInboxThreadPinned returns a bare Boolean! (the new pinned state).

Response

{
  "data": {
    "setInboxThreadPinned": true
  }
}
Cap of 20 pins, counted across every organization you belong to

You can pin at most 20 threads. Pinning a 21st throws rather than silently evicting an older pin — unpin one first. The cap is enforced globally across all organizations you’re a member of, not per-organization: if you’ve already pinned 20 threads in one organization, pinning anything in a different one also fails, even though pinnedInboxThreads in that other organization looks empty. Unpinning and re-pinning the same thread, or pinning an already-pinned thread, never counts against the cap.

Errors

CodeWhen
BAD_USER_INPUTYou have no participant row on inboxThreadId (message: Thread not found.), or pinning would exceed the 20-pin cap (message: You can only pin up to 20 threads — unpin one first.).
UNAUTHENTICATEDNo valid token was supplied.

Permissions

MutationRequires
markInboxThreadReadAuthenticated, active organization membership.
markInboxThreadUnreadAuthenticated, active organization membership.
markAllInboxThreadsReadAuthenticated, active organization membership.
setInboxThreadMutedAuthenticated. (Not scoped to a specific organization — works for any thread you participate in.)
setInboxThreadPinnedAuthenticated. (Same as above.)

None of these five require the organization’s license to be active — reducing your own notification load or catching up on unread threads is always allowed.