API reference
Chat
Buyer conversations, replies, internal notes, and labels.
List chat conversations
/v1/chat/conversationsInbox, most recent activity first.
Scopes:chat:read
Query parameters
storeIdstringoptionalformat: uuid
filterstringoptionalOne of:
allunreadneeds_humanopenresolvedlateassigneestringoptionalme, unassigned, or a user id.
max length 40
labelstringoptionalmax length 40
qstringoptionalmax length 100
beforestringoptionalformat: date-time
limitintegeroptionalmin 1 · max 100
Response200 · application/json
OK
itemsarray<ChatConversation>requiredShow 22 child attributes
contactIdstringrequirednullableformat: uuid
assignedUserIdstringrequirednullableformat: uuid
labelsarray<string>requiredwaitingSincestringrequirednullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanrequiredWaiting longer than the tenant's response target.
idstringrequiredformat: uuid
storeIdstringrequiredformat: uuid
storeNamestringrequiredmarketplacestringrequiredOne of:
tiktokshopeelazadatokopediaexternalConversationIdstringrequiredbuyerNamestringrequirednullablebuyerAvatarstringrequirednullablecanSendbooleanrequiredFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerrequiredlastMessageAtstringrequirednullableformat: date-time
lastMessagePreviewstringrequirednullablelastMessageRolestringrequirednullableOne of:
buyershopagentsystemrobotstatusstringrequiredOne of:
openresolvedneedsHumanbooleanrequiredhandoffReasonstringrequirednullableagentPausedbooleanrequiredhasDraftbooleanrequired
curl "https://api.comnethub.app/v1/chat/conversations?limit=20" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Get chat conversation
/v1/chat/conversations/{conversationId}Conversation with messages, agent draft, and buyer orders.
Scopes:chat:read
Path parameters
conversationIdstringrequiredformat: uuid
Response200 · application/json
OK
contactIdstringrequirednullableformat: uuid
assignedUserIdstringrequirednullableformat: uuid
labelsarray<string>requiredwaitingSincestringrequirednullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanrequiredWaiting longer than the tenant's response target.
idstringrequiredformat: uuid
storeIdstringrequiredformat: uuid
storeNamestringrequiredmarketplacestringrequiredOne of:
tiktokshopeelazadatokopediaexternalConversationIdstringrequiredbuyerNamestringrequirednullablebuyerAvatarstringrequirednullablecanSendbooleanrequiredFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerrequiredlastMessageAtstringrequirednullableformat: date-time
lastMessagePreviewstringrequirednullablelastMessageRolestringrequirednullableOne of:
buyershopagentsystemrobotstatusstringrequiredOne of:
openresolvedneedsHumanbooleanrequiredhandoffReasonstringrequirednullableagentPausedbooleanrequiredhasDraftbooleanrequirednotesarray<ChatNote>requiredShow 5 child attributes
idstringrequiredformat: uuid
userIdstringrequirednullableformat: uuid
userNamestringrequirednullablebodystringrequiredcreatedAtstringrequiredformat: date-time
messagesarray<ChatMessage>requiredOldest first, at most the latest 200.
Show 9 child attributes
idstringrequiredformat: uuid
rolestringrequiredOne of:
buyershopagentsystemrobotsenderNamestringrequirednullabletypestringrequiredMarketplace message type, e.g. TEXT, IMAGE, ORDER_CARD, PRODUCT_CARD.
textstringrequirednullablecontentobject (map)requiredParsed marketplace content (url for images, order_id for order cards, ...).
sentByUserIdstringrequirednullableformat: uuid
sentByAgentbooleanrequiredcreatedAtstringrequiredformat: date-time
draftReplystringrequirednullabledraftRunIdstringrequirednullableformat: uuid
lastRunChatAgentRunrequirednullableShow 12 child attributes
idstringrequiredformat: uuid
conversationIdstringrequiredformat: uuid
modestringrequiredOne of:
offsuggestautooutcomestringrequiredOne of:
repliedsuggestedhandoffskippederrorreplystringrequirednullablereasonstringrequirednullabletoolsarray<ChatAgentToolCall>requiredShow 3 child attributes
namestringrequiredinputobject (map)requiredokbooleanrequired
modelstringrequirednullableinputTokensintegerrequirednullableoutputTokensintegerrequirednullablecacheReadTokensintegerrequirednullablecreatedAtstringrequiredformat: date-time
buyerOrdersarray<ChatBuyerOrder>requiredShow 7 child attributes
orderIdstringrequiredformat: uuid
externalOrderIdstringrequiredstatusstringrequiredmarketplaceStatusstringrequirednullabletotalstring (decimal)requiredDecimal string with two fraction digits.
currencystringrequiredplacedAtstringrequiredformat: date-time
curl "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Update chat conversation
/v1/chat/conversations/{conversationId}Resolve or reopen, clear the handoff flag, pause the agent.
Scopes:chat:write
Path parameters
conversationIdstringrequiredformat: uuid
Request bodyapplication/json
assignedUserIdstringoptionalnullableformat: uuid
labelsarray<string>optionalmax items 20
statusstringoptionalOne of:
openresolvedneedsHumanbooleanoptionalClears the handoff flag.
One of:
falseagentPausedbooleanoptional
Response200 · application/json
OK
contactIdstringrequirednullableformat: uuid
assignedUserIdstringrequirednullableformat: uuid
labelsarray<string>requiredwaitingSincestringrequirednullableOldest unanswered buyer message; null when the shop spoke last.
format: date-time
latebooleanrequiredWaiting longer than the tenant's response target.
idstringrequiredformat: uuid
storeIdstringrequiredformat: uuid
storeNamestringrequiredmarketplacestringrequiredOne of:
tiktokshopeelazadatokopediaexternalConversationIdstringrequiredbuyerNamestringrequirednullablebuyerAvatarstringrequirednullablecanSendbooleanrequiredFalse when the marketplace does not allow the shop to message this buyer.
unreadCountintegerrequiredlastMessageAtstringrequirednullableformat: date-time
lastMessagePreviewstringrequirednullablelastMessageRolestringrequirednullableOne of:
buyershopagentsystemrobotstatusstringrequiredOne of:
openresolvedneedsHumanbooleanrequiredhandoffReasonstringrequirednullableagentPausedbooleanrequiredhasDraftbooleanrequired
curl -X PATCH "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assignedUserId": "0192f0c4-8d1e-7a4b-9c3e-5f6a7b8c9d0e",
"labels": [
"string"
],
"status": "open",
"needsHuman": false,
"agentPaused": true
}'Send chat message
/v1/chat/conversations/{conversationId}/messagesSend a text reply through the marketplace.
Scopes:chat:write
Path parameters
conversationIdstringrequiredformat: uuid
Request bodyapplication/json
textstringrequiredmin length 1 · max length 2000
fromDraftbooleanoptionalClears the agent draft after sending.
Response201 · application/json
OK
idstringrequiredformat: uuid
rolestringrequiredOne of:
buyershopagentsystemrobotsenderNamestringrequirednullabletypestringrequiredMarketplace message type, e.g. TEXT, IMAGE, ORDER_CARD, PRODUCT_CARD.
textstringrequirednullablecontentobject (map)requiredParsed marketplace content (url for images, order_id for order cards, ...).
sentByUserIdstringrequirednullableformat: uuid
sentByAgentbooleanrequiredcreatedAtstringrequiredformat: date-time
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/messages" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string"
}'Add chat note
/v1/chat/conversations/{conversationId}/notesAdd an internal note (never sent to the buyer).
Scopes:chat:write
Path parameters
conversationIdstringrequiredformat: uuid
Request bodyapplication/json
bodystringrequiredmin length 1 · max length 2000
Response201 · application/json
OK
idstringrequiredformat: uuid
userIdstringrequirednullableformat: uuid
userNamestringrequirednullablebodystringrequiredcreatedAtstringrequiredformat: date-time
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/notes" \
-H "Authorization: Bearer $THECOMNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "string"
}'List chat labels
/v1/chat/labelsLabels in use on conversations.
Scopes:chat:read
Response200 · application/json
OK
itemsarray<string>required
curl "https://api.comnethub.app/v1/chat/labels" \
-H "Authorization: Bearer $THECOMNET_API_KEY"Mark chat read
/v1/chat/conversations/{conversationId}/readMark buyer messages read at the marketplace.
Scopes:chat:write
Path parameters
conversationIdstringrequiredformat: uuid
Response204
OK
No response body.
curl -X POST "https://api.comnethub.app/v1/chat/conversations/$CONVERSATION_ID/read" \
-H "Authorization: Bearer $THECOMNET_API_KEY"List chat quick replies
/v1/chat/quick-repliesSaved replies.
Scopes:chat:read
Response200 · application/json
OK
itemsarray<ChatQuickReply>requiredShow 3 child attributes
idstringrequiredformat: uuid
shortcutstringrequiredbodystringrequired
curl "https://api.comnethub.app/v1/chat/quick-replies" \
-H "Authorization: Bearer $THECOMNET_API_KEY"