Reference

Inbox Management

Read state, assignment, status, labels, collections, flows and deletes

State changes need CONVERSATIONS_MANAGE; the deletes need the separate CONVERSATIONS_DELETE. See Managing the inbox.

apiCreateChatCollection

Mutation

ScopeCONVERSATIONS_MANAGE

Create a rule-based collection (API key, conversations:manage). Same plan limits as members.

Arguments

CreateChatCollectionInput

nameString!Required
slugString
descriptionString
iconString
colorString
positionFloat

Returns

_idString!
nameString!
slugString!
descriptionString
iconString
colorString
positionFloat!
isSystemBoolean!
systemKeyString
isVisibleBoolean!
isLockedBoolean!
planLockedBoolean!
createdByString
chatCountFloat
createdAtDateTime!
updatedAtDateTime!
mutation {
  apiCreateChatCollection(input: { … }) { _id name slug description icon }
}

apiDeleteChat

Mutationexpensiveirreversible

ScopeCONVERSATIONS_DELETE

Irreversibly delete one chat thread with its messages and media (API key, conversations:delete).

Arguments

chatIdString!Required

Returns

messagesInt!
mediaInt!
mutation {
  apiDeleteChat(chatId: "…") { messages media }
}

apiDeleteChatCollection

Mutation

ScopeCONVERSATIONS_MANAGE

Delete a non-system collection of your organisation (API key, conversations:manage).

Arguments

idOrSlugString!Required

Returns

Boolean!
mutation {
  apiDeleteChatCollection(idOrSlug: "…")
}

apiDeleteConversation

Mutationexpensiveirreversible

ScopeCONVERSATIONS_DELETE

Irreversibly delete a conversation and all its threads (API key, conversations:delete). removePeople:true (needs contacts:erase too) GDPR-ERASES its contacts: their personal data is anonymised everywhere in your organisation (other conversations stay, anonymised) with an erasure log. It is not a wipe of the person.

Arguments

conversationIdString!Required
removePeopleBoolean!Required

Returns

chatsInt!
messagesInt!
mediaInt!
contactsErasedInt!
Contacts anonymised everywhere (GDPR erase, ErasureLog) by removePeople:true. Not a hard delete of the person.
mutation {
  apiDeleteConversation(conversationId: "…", removePeople: false) { chats messages media contactsErased }
}

apiMoveChatCollection

Mutation

ScopeCONVERSATIONS_MANAGE

Reorder a collection (API key, conversations:manage). Org is the key org.

Arguments

MoveCollectionInput

collectionIdOrSlugString!Required
Collection ID or slug
newPositionFloat!Required
Target position value. System collections: 0, 1, 2... User collections: 100, 101, 102...

Returns

_idString!
nameString!
slugString!
descriptionString
iconString
colorString
positionFloat!
isSystemBoolean!
systemKeyString
isVisibleBoolean!
isLockedBoolean!
planLockedBoolean!
createdByString
chatCountFloat
createdAtDateTime!
updatedAtDateTime!
mutation {
  apiMoveChatCollection(input: { … }) { _id name slug description icon }
}

apiStartFlowForChat

Mutation

ScopeCONVERSATIONS_MANAGE

Run a PUBLISHED flow of your organisation in a chat (API key, conversations:manage). Flows are not listable via the API: take the flowId from the dashboard.

Arguments

chatIdString!Required
flowIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  apiStartFlowForChat(chatId: "…", flowId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

apiStopFlowForChat

Mutation

ScopeCONVERSATIONS_MANAGE

Cancel the flow running in a chat (API key, conversations:manage).

Arguments

chatIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  apiStopFlowForChat(chatId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

apiUpdateChatCollection

Mutation

ScopeCONVERSATIONS_MANAGE

Update a collection of your organisation (API key, conversations:manage).

Arguments

idOrSlugString!Required

UpdateChatCollectionInput

nameString
slugString
descriptionString
iconString
colorString
isVisibleBoolean

Returns

_idString!
nameString!
slugString!
descriptionString
iconString
colorString
positionFloat!
isSystemBoolean!
systemKeyString
isVisibleBoolean!
isLockedBoolean!
planLockedBoolean!
createdByString
chatCountFloat
createdAtDateTime!
updatedAtDateTime!
mutation {
  apiUpdateChatCollection(idOrSlug: "…", input: { … }) { _id name slug description icon }
}

archiveLabel

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

idString!Required

Returns

_idString!
nameString!
organisationIdString!
colorString!
activeBoolean!
archivedBoolean!
isSystemBoolean!
descriptionString
createdAtDateTime!
updatedAtDateTime!
mutation {
  archiveLabel(id: "…") { _id name organisationId color active }
}

assignChatToOperator

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

chatIdString!Required
operatorIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  assignChatToOperator(chatId: "…", operatorId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

assignConversationThreads

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

conversationIdString!Required
operatorIdString

Returns

Int!
mutation {
  assignConversationThreads(conversationId: "…", operatorId: "…")
}

blockConversation

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

conversationIdString!Required
blockedBoolean!Required

Returns

Int!
mutation {
  blockConversation(conversationId: "…", blocked: false)
}

closeChat

Mutation

ScopeCONVERSATIONS_MANAGE

Close a chat: sets status to CLOSED, auto-unassigns operator, creates CHAT_CLOSED system message

Arguments

chatIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  closeChat(chatId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

createLabel

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

inputCreateLabelInput!Required

CreateLabelInput

nameString!Required
descriptionString
colorString
activeBoolean

Returns

_idString!
nameString!
organisationIdString!
colorString!
activeBoolean!
archivedBoolean!
isSystemBoolean!
descriptionString
createdAtDateTime!
updatedAtDateTime!
mutation {
  createLabel(input: { … }) { _id name organisationId color active }
}

readAllConversation

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

conversationIdString!Required

Returns

Int!
mutation {
  readAllConversation(conversationId: "…")
}

readAllMessages

Mutation

ScopeCONVERSATIONS_MANAGE

Mark all messages in a chat as read

Arguments

chatIdString!Required

Returns

Float!
mutation {
  readAllMessages(chatId: "…")
}

readMessages

Mutation

ScopeCONVERSATIONS_MANAGE

Bulk mark inbound messages read; returns the count actually transitioned

Arguments

ids[String!]!Required

Returns

Int!
mutation {
  readMessages(ids: "…")
}

reopenChat

Mutation

ScopeCONVERSATIONS_MANAGE

Reopen a closed/resolved chat: sets status to IN_PROGRESS and creates a CHAT_REOPENED system message

Arguments

chatIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  reopenChat(chatId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

restoreLabel

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

idString!Required

Returns

_idString!
nameString!
organisationIdString!
colorString!
activeBoolean!
archivedBoolean!
isSystemBoolean!
descriptionString
createdAtDateTime!
updatedAtDateTime!
mutation {
  restoreLabel(id: "…") { _id name organisationId color active }
}

setConversationAi

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

conversationIdString!Required
enabledBoolean!Required

Returns

Int!
mutation {
  setConversationAi(conversationId: "…", enabled: false)
}

setMessageLabels

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

SetMessageLabelsInput

messageIdString!Required
labelIds[String!]!Required

Returns

_idString!
messageIdFloat
externalMessageIdString
fromMessageSenderUnion
chatChat!
sentFromChannelBoolean
textString
captionString
showCaptionAboveMediaBoolean
hasMediaSpoilerBoolean
contactContact
replyToMessageMessage
mutation {
  setMessageLabels(input: { … }) { _id messageId externalMessageId type from }
}

unassignChat

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

chatIdString!Required

Returns

_idString!
chatIdFloat
externalChatIdString
businessConnectionIdString
externalUserIdString
titleString
usernameString
firstNameString
lastNameString
isForumBoolean
lastMessageMessage
lastMessageAtDateTime
profilePeople
channelIdentityChannelIdentity
integrationIdString
Integration ID (use integration field for full details)
createdAtDateTime
updatedAtDateTime
unReadCountFloat
engagedBoolean
True once the conversation has real engagement (a visitor inbound message OR a human-operator message). false = captured/hidden from the operator inbox; absent/unset = visible (legacy rows + all non-web channels). Set explicitly, never defaulted.
isBlockedBoolean
verified[String!]
isAIActiveBoolean
mutation {
  unassignChat(chatId: "…") { _id chatId externalChatId businessConnectionId externalUserId }
}

updateChatField

Mutation

ScopeCONVERSATIONS_MANAGE

Generic mutation to update any chat field by key

Arguments

UpdateChatFieldInput

chatIdString!Required
fieldChatFieldKey!Required
valueJSON
Value can be string, number, boolean, or null
blockScopeBlockScope
2-level scope for field: IS_BLOCKED or AI_AVAILABLE. CONTACT (default) applies to every thread of the contact; THREAD applies to only this chat.

Returns

Boolean!
mutation {
  updateChatField(input: { … })
}

updateLabel

Mutation

ScopeCONVERSATIONS_MANAGE

Arguments

idString!Required
inputUpdateLabelInput!Required

UpdateLabelInput

nameString
descriptionString
colorString
activeBoolean

Returns

_idString!
nameString!
organisationIdString!
colorString!
activeBoolean!
archivedBoolean!
isSystemBoolean!
descriptionString
createdAtDateTime!
updatedAtDateTime!
mutation {
  updateLabel(id: "…", input: { … }) { _id name organisationId color active }
}

On this page