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
  }
}

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
  }
}

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
  }
}

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.