Skip to main content

GraphQL API reference

This section describes every query and mutation available through the GraphQL API and to a connected AI assistant, with their arguments and the data they return.

Operations an external caller may not run are not part of this API and are not listed: billing changes, AI provider credentials, workspace and account changes, the access key itself, and deleting conversations or visitor data.

General rules:

  • The endpoint answers introspection queries, so GraphQL tools can load the schema themselves.
  • Page-size arguments (perPage, first) accept at most 100. A larger value is refused with the code REQUEST_TOO_LARGE.
  • A credential with read access only can run queries, but no mutation.
  • Time values are ISO 8601 timestamps. UUID values are identifiers such as 3d1c4826-e219-4230-9833-41bef2be80ea.
  • A mutation that fails for a business reason still answers with HTTP 200 and returns the reason in its error field (see Error).

Dashboard queries​

The numbers shown on the eChat Dashboard.

Queries that take a period argument accept one of the DashboardPeriod values: WEEK (the last 7 days), TWO_WEEKS (the last 14 days, the default) or MONTH (the last 30 days). Each period includes today.

dashboardStats​

Returns today's activity on the store.

Output (DashboardStats):

FieldDescriptionData Type
activeSessionsVisitor sessions that are active right now.Int!
todayChatsConversations started today that have at least one message.Int!
yesterdayChatsConversations started yesterday.Int!
todayVisitorsNew visitors seen today.Int!
todayMessagesMessages sent today, by visitors and by the chatbot.Int!
lastWidgetSeenAtWhen the chat widget last reported a page view from the store. Empty if it never has.Time

dashboardPeriodStats​

Returns the totals for a period.

Arguments:

FieldDescriptionData Type
periodThe period to count. Defaults to TWO_WEEKS.DashboardPeriod!

Output (PeriodStats):

FieldDescriptionData Type
visitorsNew visitors in the period.Int!
messagesMessages sent in the period.Int!

dashboardVisitorsByCountry​

Returns the 10 countries with the most visitors in the period.

Arguments: period (DashboardPeriod!), as in dashboardPeriodStats.

Output ([CountryStat!]!):

FieldDescriptionData Type
nameCountry name.String!
codeTwo-letter country code.String!
visitorsVisitors from this country in the period.Int!

dashboardChatsByCountry​

Returns the 10 countries with the most conversations in the period.

Arguments: period (DashboardPeriod!), as in dashboardPeriodStats.

Output ([CountryChatStat!]!):

FieldDescriptionData Type
nameCountry name.String!
codeTwo-letter country code.String!
chatsConversations from this country in the period.Int!

dashboardDailyVolume​

Returns the number of conversations per day in the period.

Arguments: period (DashboardPeriod!), as in dashboardPeriodStats.

Output ([DailyVolumeStat!]!):

FieldDescriptionData Type
dateThe day, as YYYY-MM-DD.String!
chatsConversations started on that day.Int!

dashboardTopPages​

Returns the 10 store pages where the most visitors had the chat widget loaded in the period.

Arguments: period (DashboardPeriod!), as in dashboardPeriodStats.

Output ([PageStat!]!):

FieldDescriptionData Type
pageTitleTitle of the store page.String!
urlAddress of the store page.String!
visitorsDistinct visitors on this page.Int!

dashboardTokensUsage​

Returns how many AI tokens the chatbot used in the period, in total and per day.

Arguments: period (DashboardPeriod!), as in dashboardPeriodStats.

Output (TokensUsageStats):

FieldDescriptionData Type
totalTokensTokens used in the whole period.Int!
dailyTokensTokens per day, with a split per AI provider. See DailyTokensStat.[DailyTokensStat!]!

Conversation queries​

The chat history shown on the History page.

conversations​

Returns a page of conversations. Only conversations with at least one message are returned.

Arguments:

FieldDescriptionData Type
pagePage number, starting from 1.Int
perPageConversations per page. Defaults to 20, at most 100.Int
filtersNarrows the list. See ConversationFiltersInput.ConversationFiltersInput
sortingSort order. See ConversationSortingInput.ConversationSortingInput

Output (ChatConversationConnection):

FieldDescriptionData Type
edgesThe conversations on this page. Each edge holds a cursor and a node (ChatConversation).[ChatConversationEdge!]!
totalCountConversations matching the filters, on all pages.Int!
currentPageThe page returned.Int!
totalPagesNumber of pages.Int!

conversation​

Returns one conversation with its visitor, session and messages. Returns null if no conversation has this ID.

Arguments:

FieldDescriptionData Type
idThe conversation ID.UUID!

Output: ChatConversation.

conversationMessages​

Returns the messages of one conversation, oldest first.

Arguments:

FieldDescriptionData Type
conversationIdThe conversation ID.UUID!

Output: a list of ChatMessage.

conversationCountries​

Returns the countries the store's conversations came from. Use the codes in the countryCodes filter of conversations.

Output ([ConversationCountry!]!):

FieldDescriptionData Type
codeTwo-letter country code.String!
nameCountry name.String!

conversationCorrections​

Returns the chatbot answers in a conversation that someone has already corrected with an FAQ entry or a guidance rule.

Arguments:

FieldDescriptionData Type
conversationIdThe conversation ID.UUID!

Output ([MessageCorrection!]!):

FieldDescriptionData Type
messageIdThe corrected chatbot message.UUID!
kindWhat the correction is: FAQ (an FAQ entry) or RULE (a guidance rule).CorrectionKind!
recordIdID of the FAQ entry or the guidance rule.UUID!
titleThe FAQ question, or the name of the guidance rule.String!

visitorDataByEmail​

Shows how much data eChat holds for a visitor with this email address. Nothing is deleted. Use it to answer a customer's data access request.

Arguments:

FieldDescriptionData Type
emailThe visitor's email address.String!

Output (VisitorDataMatch):

FieldDescriptionData Type
conversationsConversations of visitors with this email.Int!
messagesMessages in those conversations.Int!

messageStats​

Kept for compatibility. Always returns zero in good, bad and total.


Knowledge base queries​

The documents and categories shown on the Knowledge Base page.

documents​

Returns a page of knowledge base documents.

Arguments:

FieldDescriptionData Type
pagePage number, starting from 1.Int
perPageDocuments per page. Defaults to 50, at most 100.Int
filtersNarrows the list. See DocumentFiltersInput.DocumentFiltersInput
sortingSort order. See DocumentSortingInput.DocumentSortingInput

Output (DocumentConnection):

FieldDescriptionData Type
edgesThe documents on this page. Each edge holds a cursor and a node (Document).[DocumentEdge!]!
totalCountDocuments matching the filters, on all pages.Int!
currentPageThe page returned.Int!
totalPagesNumber of pages.Int!

document​

Returns one document with its full text. Returns null if no document has this ID.

Arguments:

FieldDescriptionData Type
idThe document ID.UUID!

Output: Document.

categories​

Returns all knowledge base categories.

Output: a list of Category.

knowledgeBaseEmpty​

Returns true when the knowledge base has no documents yet.


FAQ queries​

The entries on the FAQ page.

faqs​

Returns a page of FAQ entries.

Arguments:

FieldDescriptionData Type
pagePage number, starting from 1.Int
perPageEntries per page. Defaults to 50, at most 100.Int
filtersNarrows the list. See FaqFiltersInput.FaqFiltersInput

Output (FaqConnection):

FieldDescriptionData Type
edgesThe entries on this page. Each edge holds a cursor and a node (Faq).[FaqEdge!]!
totalCountEntries matching the filters, on all pages.Int!
currentPageThe page returned.Int!
totalPagesNumber of pages.Int!

faq​

Returns one FAQ entry. Returns null if no entry has this ID.

Arguments:

FieldDescriptionData Type
idThe FAQ entry ID.UUID!

Output: Faq.


Guidance queries​

The rules on the Guidance page.

guidances​

Returns guidance rules. This list is paged with a cursor: pass the endCursor of one page as after to get the next.

Arguments:

FieldDescriptionData Type
firstRules to return. Defaults to 50, at most 100.Int
afterReturn the rules after this cursor.String
filtersNarrows the list. See GuidanceFiltersInput.GuidanceFiltersInput
sortingSort order. See GuidanceSortingInput.GuidanceSortingInput

Output (GuidanceConnection):

FieldDescriptionData Type
edgesThe rules returned. Each edge holds a cursor and a node (Guidance).[GuidanceEdge!]!
pageInfoWhether more rules follow, and the cursors. See PageInfo.PageInfo!
totalCountRules matching the filters.Int!

guidance​

Returns one guidance rule. Returns null if no rule has this ID.

Arguments:

FieldDescriptionData Type
idThe rule ID.UUID!

Output: Guidance.


Settings and account queries​

settings​

Returns the chatbot and widget settings from the Settings page. The AI provider key is never returned: openaiKey is always empty.

Output: Settings.

aiConfigured​

Returns true when the workspace has a working AI provider configured, so the chatbot can answer.

providers​

Returns the AI providers eChat supports and their models. The workspace's own provider keys are not part of this API.

Output ([ProviderInfo!]!):

FieldDescriptionData Type
idProvider code.String!
labelProvider name.String!
modelsModels of this provider. Each has a spec (model code) and a label (name).[ProviderModelOption!]!

account​

Returns the eChat account and the workspaces in it. Each connected store is one workspace.

Output (AccountInfo):

FieldDescriptionData Type
accountThe account: id, name and handle.Account!
workspacesWorkspaces in the account. See AccountWorkspace.[AccountWorkspace!]!
mergeSuggestionsOther accounts that hold workspaces of the same store, offered for merging.[AccountSummary!]!
straysAlways empty.[AccountWorkspace!]!

billingInfo​

Returns the plan and billing details of the workspace as a JSON object under the key billing.

Output (BillingInfo):

FieldDescriptionData Type
dataBilling details, as JSON.JSON

Knowledge base mutations​

saveDocument​

Creates a knowledge base document, or updates one when id is given.

Input (DocumentInput):

FieldDescriptionData Type
idID of the document to update. Leave it out to create a new one.UUID
categoryIdCategory the document belongs to.UUID
identifierA unique key of the document, such as shipping-policy.String!
nameDocument title.String!
bodyDocument text. Markdown is supported.String
visibilityWho the document is available to. Use ALL.String!

Output (DocumentSavePayload):

FieldDescriptionData Type
documentThe saved document. See Document.Document
errorWhy the document was not saved. Empty on success.Error

deleteDocument​

Deletes a knowledge base document.

Arguments:

FieldDescriptionData Type
idThe document ID.UUID!

Output: BooleanPayload.

saveCategory​

Creates a knowledge base category, or updates one when id is given.

Input (CategoryInput):

FieldDescriptionData Type
idID of the category to update. Leave it out to create a new one.UUID
parentIDParent category, for a subcategory.UUID
identifierA unique key of the category.String
nameCategory name.String
descriptionCategory description.String
visibilityWho the category is available to. Use ALL.String

Output (CategorySavePayload):

FieldDescriptionData Type
categoryThe saved category. See Category.Category
errorWhy the category was not saved. Empty on success.Error

deleteCategory​

Deletes a knowledge base category.

Arguments:

FieldDescriptionData Type
idThe category ID.UUID!

Output: BooleanPayload.


FAQ mutations​

saveFaq​

Creates an FAQ entry, or updates one when id is given.

Input (FaqInput):

FieldDescriptionData Type
idID of the entry to update. Leave it out to create a new one.UUID
questionWhat a customer asks.String!
answerWhat the chatbot should answer.String!
statusenabled or disabled. The chatbot uses enabled entries only.String!
sourceConversationIDThe conversation the entry corrects, if any.UUID
sourceMessageIDThe chatbot message the entry corrects, if any.UUID

Output (FaqSavePayload):

FieldDescriptionData Type
faqThe saved entry. See Faq.Faq
errorWhy the entry was not saved. Empty on success.Error

deleteFaq​

Deletes an FAQ entry.

Arguments:

FieldDescriptionData Type
idThe FAQ entry ID.UUID!

Output: BooleanPayload.


Guidance mutations​

saveGuidance​

Creates a guidance rule, or updates one when id is given.

Input (GuidanceInput):

FieldDescriptionData Type
idID of the rule to update. Leave it out to create a new one.UUID
nameRule name.String!
slugShort code the chatbot uses to address the rule. Leave it out and one is made from the name.String
triggerWhen the rule applies, such as "Customer wants to return an item".String!
instructionsWhat the chatbot should do when the rule applies.String!
statusenabled or disabled.String!
sourceConversationIDThe conversation the rule corrects, if any.UUID
sourceMessageIDThe chatbot message the rule corrects, if any.UUID

Output (GuidanceSavePayload):

FieldDescriptionData Type
guidanceThe saved rule. See Guidance.Guidance
errorWhy the rule was not saved. Empty on success.Error

deleteGuidance​

Deletes a guidance rule.

Arguments:

FieldDescriptionData Type
idThe rule ID.UUID!

Output: BooleanPayload.


Settings and support mutations​

saveSettings​

Changes the chatbot and widget settings. Only the fields you send are changed.

Two fields of the input are refused over this API, and a request that sets either of them is rejected as a whole: openaiKey (the AI provider key) and conversationRetentionDays (shortening it deletes conversations). Change them in the eChat backend.

Input (SettingsInput):

FieldDescriptionData Type
assistantChatbot behavior. See AssistantSettingInput.AssistantSettingInput
chatWidget look and behavior. See ChatSettingInput.ChatSettingInput
errorNotificationEmailsAddresses that get an email when the chatbot stops answering because of an AI provider problem.[String!]
errorNotificationsEnabledTurns those emails on or off.Boolean
hideWidgetWhenKbEmptyHides the chat widget while the knowledge base has no documents.Boolean

Output: BooleanPayload.

submitSupportTicket​

Sends a message to Mirasvit support on behalf of the workspace.

Input (SupportTicketInput):

FieldDescriptionData Type
replyToEmail address for the answer.String!
subjectSubject of the message.String!
messageText of the message.String!

Output: BooleanPayload.

Not available over this API​

The schema also lists uploadDocument and uploadImage. They need a file upload, which this API does not accept. To add a document, send its text with saveDocument.


Types​

ChatConversation​

FieldDescriptionData Type
idConversation ID.UUID!
instanceIdWorkspace ID.UUID!
statusConversation status. See ConversationStatus.ConversationStatus!
createdAtWhen the conversation started.Time!
updatedAtWhen the conversation last changed: a new message or a status change.Time!
endedAtWhen the conversation ended. Empty while it is open.Time
messageCountNumber of messages.Int!
totalTokensAI tokens the chatbot used in this conversation.Int!
providerTokensTokens per AI provider: provider and tokens.[ProviderTokens!]
sessionWhere the visitor was. See ChatConversationSession.ChatConversationSession
visitorWho the visitor is. See ChatConversationVisitor.ChatConversationVisitor
messagesThe messages, oldest first. See ChatMessage.[ChatMessage!]!

ChatConversationSession​

FieldDescriptionData Type
countryCodeTwo-letter code of the visitor's country.String!
countryNameThe visitor's country.String!
cityThe visitor's city.String!
pageCountStore pages the visitor opened.Int!

ChatConversationVisitor​

FieldDescriptionData Type
idVisitor ID.UUID!
nameVisitor name, if the visitor gave one.String!
emailVisitor email, if the visitor gave one.String!
phoneVisitor phone, if the visitor gave one.String!

ChatMessage​

FieldDescriptionData Type
idMessage ID.UUID!
conversationIdConversation the message belongs to.UUID!
bodyMessage text, as the visitor saw it.String!
originalBodyMessage text as it was first written.String
senderTypeWho sent it. See MessageSenderType.MessageSenderType!
senderNameName shown for the sender, such as the chatbot's name.String!
isReceivedThe message was delivered.Boolean!
isReadThe message was read.Boolean!
createdAtWhen the message was sent.Time!
productCardsProducts the chatbot showed in the message. See ProductCard.[ProductCard!]!
attachmentsFiles attached to the message. See ChatAttachment.[ChatAttachment!]!

ProductCard​

FieldDescriptionData Type
skuProduct SKU.String!
nameProduct name.String!
urlProduct page address.String!
imageProduct image address.String!
pricePrice shown on the card.String!
regularPricePrice before a discount, when the product is on sale.String!
priceFromLowest price, for a product with a price range.String!
priceToHighest price, for a product with a price range.String!
currencyCurrency code.String!
blurbShort text the chatbot wrote about the product.String!

ChatAttachment​

FieldDescriptionData Type
idAttachment ID.UUID!
nameFile name.String!
typeFile type, such as image/png.String!
sizeFile size in bytes.Int!
downloadURLAddress to download the file.String!

ConversationFiltersInput​

All fields are optional. Filters you send are combined.

FieldDescriptionData Type
statusesConversation statuses to include. Without it, TRIGGERED conversations are left out.[ConversationStatus!]
createdAtFrom, createdAtToConversations started in this time range.Time
updatedAtFrom, updatedAtToConversations changed in this time range. Use updatedAtFrom for an incremental sync.Time
countryCodesTwo-letter codes of visitor countries. See conversationCountries.[String!]
pageCountMin, pageCountMaxRange of store pages the visitor opened.Int
messageCountMin, messageCountMaxRange of messages in the conversation.Int
totalTokensMin, totalTokensMaxRange of AI tokens used.Int
visitorEmailConversations of the visitor with this email, matched case-insensitively.String

ConversationSortingInput​

FieldDescriptionData Type
fieldSort by: CREATED_AT, UPDATED_AT, ENDED_AT, PAGE_COUNT, MESSAGE_COUNT, TOTAL_TOKENS or DURATION.ConversationSortField!
directionASC or DESC.SortDirection!

ConversationStatus​

ValueDescription
OPENThe conversation is going on.
CLOSEDThe conversation has ended. eChat closes a conversation after 30 minutes without a new message.
TRIGGEREDNot used by current eChat versions. Left out of conversations unless you ask for it in statuses.
OFFLINENot used by current eChat versions.

MessageSenderType​

ValueDescription
VISITORThe store visitor.
AIThe chatbot.
AGENTA person answering in the chat.
SYSTEMAn automatic notice.

Document​

FieldDescriptionData Type
idDocument ID.UUID!
categoryIdCategory the document belongs to.UUID
identifierUnique key. Synced documents use a prefix for their source, such as product.24-MB01 or cms_page.about-us.String!
nameDocument title.String!
bodyDocument text.String!
visibilityWho the document is available to.String!

DocumentFiltersInput​

FieldDescriptionData Type
searchQueryText to find in the document name or identifier. A SKU finds its product.String
categoryIdOnly documents of this category.UUID

DocumentSortingInput​

FieldDescriptionData Type
fieldSort by NAME.DocumentSortField!
directionASC or DESC.SortDirection!

Category​

FieldDescriptionData Type
idCategory ID.UUID!
parentIDParent category. Empty for a top-level category.UUID
identifierUnique key of the category.String!
nameCategory name.String!
descriptionCategory description.String!
levelDepth in the category tree.Int!
visibilityWho the category is available to.String!
sortOrderPosition among its sibling categories.Int!
syncProviderThe sync that created the category, such as products or CMS pages. Empty for a category created by hand.String!
createdAtWhen the category was created.Time!
updatedAtWhen the category last changed.Time!
documentsDocuments in the category. See documents for the fields.DocumentConnection!

Faq​

FieldDescriptionData Type
idFAQ entry ID.UUID!
questionWhat a customer asks.String!
answerWhat the chatbot answers.String!
statusenabled or disabled.String!
sourceConversationIDThe conversation the entry corrects. Empty for an entry written on the FAQ page.UUID
sourceMessageIDThe chatbot message the entry corrects.UUID
createdAtWhen the entry was created.Time!
updatedAtWhen the entry last changed.Time!

FaqFiltersInput​

FieldDescriptionData Type
searchQueryText to find in the question or the answer.String
statusenabled or disabled.String

Guidance​

FieldDescriptionData Type
idRule ID.UUID!
nameRule name.String!
slugShort code the chatbot uses to address the rule.String!
triggerWhen the rule applies.String!
instructionsWhat the chatbot does when the rule applies.String!
statusenabled or disabled.String!
sourceConversationIDThe conversation the rule corrects. Empty for a rule written on the Guidance page.UUID
sourceMessageIDThe chatbot message the rule corrects.UUID
createdAtWhen the rule was created.Time!
updatedAtWhen the rule last changed.Time!

GuidanceFiltersInput​

FieldDescriptionData Type
searchQueryText to find in the rule.String
statusenabled or disabled.String

GuidanceSortingInput​

FieldDescriptionData Type
fieldSort by NAME.GuidanceSortField!
directionASC or DESC.SortDirection!

PageInfo​

FieldDescriptionData Type
hasNextPageMore items follow this page.Boolean!
hasPreviousPageItems come before this page.Boolean!
startCursorCursor of the first item on this page.String
endCursorCursor of the last item. Pass it as after.String

Settings​

FieldDescriptionData Type
openaiKeyAlways empty over this API.String!
providerStatusWhether the AI provider works. See ProviderStatusType.ProviderStatusType!
reconcileStatusWhether a sync was stopped to protect documents. See ReconcileStatusType.ReconcileStatusType!
assistantChatbot behavior. See AssistantSetting.AssistantSetting!
chatWidget look and behavior. See ChatSettingType.ChatSettingType!
primaryEmailContact email of the workspace owner.String!
fullNameFull name of the workspace owner.String!
firstNameFirst name of the workspace owner.String!
lastNameLast name of the workspace owner.String!
phonePhone of the workspace owner.String!
notificationEmailsAddresses that get eChat notifications.[String!]
errorNotificationEmailsAddresses that get an email when the chatbot stops answering because of an AI provider problem.[String!]
errorNotificationsEnabledThose emails are turned on.Boolean!
hideWidgetWhenKbEmptyThe chat widget is hidden while the knowledge base has no documents.Boolean!
conversationRetentionDaysDays a conversation is kept after its last activity. 0 keeps it until deleted.Int!

AssistantSetting​

The same fields, all optional, make up AssistantSettingInput.

FieldDescriptionData Type
basePromptThe chatbot's main instructions.String!
instructionsAdditional instructions for the chatbot.String!
toneOfVoiceHow the chatbot speaks to customers.String!
languageLanguage code the chatbot answers in, such as de.String!

AssistantSettingInput​

The fields of AssistantSetting, all optional.

ChatSettingType​

The same fields, all optional, make up ChatSettingInput.

FieldDescriptionData Type
isActiveThe chat widget is shown on the store.Boolean!
chatWindowThe chat window. See ChatWindowSetting.ChatWindowSetting!
chatButtonThe button that opens the chat. See ChatButtonSetting.ChatButtonSetting!
conversationConversation options. See ConversationSetting.ConversationSetting!

ChatSettingInput​

The fields of ChatSettingType, all optional.

ChatWindowSetting​

FieldDescriptionData Type
positionWhere the window opens on the page.String!
primaryColorMain color of the window.String!
titleWindow title.String!
subtitleLine under the title.String!
invitationMessageMessage that invites the visitor to chat.String!
linkTargetWhere links in chat messages open.String!

ChatButtonSetting​

FieldDescriptionData Type
positionWhere the button is on the page.String!
primaryColorButton color.String!
titleButton label.String!

ConversationSetting​

FieldDescriptionData Type
allowFileAttachmentsVisitors can attach files.Boolean!
soundNotificationsA sound plays on a new message.Boolean!
assistantNameName shown for the chatbot.String!
assistantAvatarImage shown for the chatbot.String!
preChatWelcomeGreeting shown before the visitor writes.String!
defaultQuestionsSuggested questions the visitor can click.[String!]!

ProviderStatusType​

FieldDescriptionData Type
codeOK, UNCHECKED, EMPTY_KEY, INVALID_KEY, INSUFFICIENT_QUOTA, RATE_LIMITED, MODEL_UNAVAILABLE or TRANSIENT_ERROR.ProviderStatus!
reasonThe problem, in words. Empty when the provider works.String!
checkedAtWhen the provider was last checked.Time

ReconcileStatusType​

A sync that was stopped because it would have removed most of a provider's documents.

FieldDescriptionData Type
providerThe sync provider that was stopped.String!
blockedAtWhen it was stopped. Empty when nothing is wrong.Time
wouldRemoveDocuments the sync would have removed.Int!
ownedDocuments the provider has in the knowledge base.Int!
sampleSome of the documents that would have been removed.[String!]!

AccountWorkspace​

FieldDescriptionData Type
idWorkspace ID.String!
nameWorkspace name.String!
domainStore domain.String!
magentoBaseURLStore base URL.String!
statusactive or disabled.String!
isCurrentThis is the workspace the credential belongs to.Boolean!
createdAtWhen the workspace was created.String!
lastActivityAtWhen the workspace last had a chat.String
liveStatusactive when the workspace had a chat recently, else idle.String!
licensedThe store has a valid eChat license.Boolean!

DailyTokensStat​

FieldDescriptionData Type
dateThe day, as YYYY-MM-DD.String!
tokensTokens used on that day.Int!
providersTokens per AI provider: provider and tokens.[ProviderTokens!]!

BooleanPayload​

Returned by mutations that have no object to return.

FieldDescriptionData Type
successThe operation was done.Boolean!
errorWhy it was not done. Empty on success.Error
messageAn optional note about the result.String

Error​

FieldDescriptionData Type
codeError code, such as INVALID_TYPE.String!
messageWhat went wrong, in words.String!

DashboardPeriod​

ValueDescription
WEEKThe last 7 days, including today.
TWO_WEEKSThe last 14 days, including today.
MONTHThe last 30 days, including today.

Usage Examples​

The responses below are shortened and show sample values.

Read the latest conversations​

Get the five conversations that changed last, with their visitor and country:

query {
conversations(perPage: 5, sorting: { field: UPDATED_AT, direction: DESC }) {
totalCount
edges {
node {
id
status
createdAt
messageCount
visitor { name email }
session { countryName }
}
}
}
}

Response:

{
"data": {
"conversations": {
"totalCount": 14,
"edges": [
{
"node": {
"id": "3d1c4826-e219-4230-9833-41bef2be80ea",
"status": "CLOSED",
"createdAt": "2026-09-23T12:01:44Z",
"messageCount": 6,
"visitor": { "name": "Anna", "email": "[email protected]" },
"session": { "countryName": "Germany" }
}
}
]
}
}
}

Sync conversations incrementally​

Get only the conversations that changed since the last run, with their messages:

query {
conversations(perPage: 100, filters: { updatedAtFrom: "2026-09-23T00:00:00Z" }) {
totalPages
edges {
node {
id
updatedAt
messages { senderType body createdAt }
}
}
}
}

Response:

{
"data": {
"conversations": {
"totalPages": 1,
"edges": [
{
"node": {
"id": "3d1c4826-e219-4230-9833-41bef2be80ea",
"updatedAt": "2026-09-23T12:04:10Z",
"messages": [
{ "senderType": "VISITOR", "body": "Do you ship to Austria?", "createdAt": "2026-09-23T12:01:44Z" },
{ "senderType": "AI", "body": "Yes, we ship to Austria. Delivery takes 3-5 business days.", "createdAt": "2026-09-23T12:01:49Z" }
]
}
}
]
}
}
}

Request the next pages with page until it reaches totalPages.

Add an FAQ entry​

mutation {
saveFaq(input: {
question: "Do you ship to Austria?"
answer: "Yes. Delivery to Austria takes 3-5 business days."
status: "enabled"
}) {
faq { id question status }
error { code message }
}
}

Response:

{
"data": {
"saveFaq": {
"faq": {
"id": "8b0f6c1e-5d7a-4c2b-9f3e-1a2b3c4d5e6f",
"question": "Do you ship to Austria?",
"status": "enabled"
},
"error": null
}
}
}

Find a product document by SKU​

query {
documents(perPage: 5, filters: { searchQuery: "24-MB01" }) {
edges {
node { id identifier name }
}
}
}

Response:

{
"data": {
"documents": {
"edges": [
{
"node": {
"id": "c2a7e0d4-91f3-4b6e-8a15-7d9e2f4b6c80",
"identifier": "product.24-MB01",
"name": "Joust Duffle Bag"
}
}
]
}
}
}

A refused operation​

A mutation sent with a read-only credential, an operation that is not part of this API, or a refused saveSettings field is refused with the code NOT_AVAILABLE:

mutation {
saveSettings(input: { openaiKey: "sk-..." }) { success }
}

Response:

{
"errors": [
{
"message": "saveSettings cannot set the AI provider key",
"extensions": { "code": "NOT_AVAILABLE" }
}
],
"data": null
}