API reference / Support Agent
Take over, hand back, resolve or translate a conversation
Send only what changes. held: true takes the conversation over, and the Support agent answers nothing in it. held: false hands it back, also after the Support agent asked for a person: the Support agent reads what it missed, and answers the next message. resolved: true resolves it and hands it back, and false opens it again. read: false marks it unread for the caller, and true reads it. translate turns Live translate on, with language as the language of the team (a tag such as en), or off. Troopy reads the language of the visitor from its messages, and turns Live translate off when the visitor writes in the language of the team. blocked: true blocks the visitor, for owners and admins: it sees no chat from then. false unblocks it. A person writes here, never a teammate.
/api/v1/support-conversations/{id}Other ways to call it
troopy support updateIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
id*stringA 24-character id
Body
application/jsonheldbooleanresolvedbooleanreadbooleanfalse marks the conversation unread for the caller. The other people keep their own marks
blockedbooleantrue blocks the visitor by its browser and its email, and ends its chat. false unblocks it. Owners and admins
translateobject2 properties
on*booleanlanguagestringThe language of the team, as a tag such as en
Default "en" · At least 2 characters · At most 35 characters
Response
200 · application/jsondata*object33 properties
id*stringA 24-character id
botId*stringA 24-character id
botName*stringThe name of the Support Agent
origin*stringThe website where the visitor chats
status*enum<string>online: the page of the visitor is open now
onlineoffline
lastSeenAt*string | nullcreatedAt*stringISO 8601 date and time
expiresAt*stringWhen the chat of the visitor ends. After it, a reply goes only by email
lastMessageAt*stringISO 8601 date and time
messageCount*integerexcerpt*stringThe last message that the visitor sees, 180 characters at most
lastFrom*enum<string> | nullvisitorbotpersonnoteevent
lastBy*string | nullThe person of the team who wrote the last message, when a person did
country*string | nullcity*string | nullunread*integerThe messages of the visitor that the caller did not read
taken*object | nullThe person who holds the conversation. The Support agent answers nothing while a person holds it
2 properties
id*stringname*stringresolved*booleanwaitingSince*string | nullSince when the visitor waits for an answer. Null: nobody waits
asked*object | nullThe Support agent, or the count of visitor messages, asked for a person, and nobody holds the chat yet. The Support agent answers nothing until a person replies or hands it back
2 properties
at*stringISO 8601 date and time
reason*stringWhy, in one sentence for the team
contact*object | nullThe signed-in user that the website named with TroopyChat.identify. Null for a visitor that it named not
5 properties
id*string | nullThe id of the user in the product of the business
email*string | nullname*string | nullphoto*string | nullThe address of the copy of the photo in Troopy's storage
verified*booleanThe backend of the website signed the email (or the id) with the identity secret of the Support Agent
email*string | nullThe email that the visitor gave in the chat, for the replies of the team
ticket*object | nullThe bug ticket of the chat. A chat has one open ticket
7 properties
key*stringtitle*stringstatus*enum<string>backlogtodoin_progressneeds_youin_reviewdonecanceled
stage*enum<string> | nullThe step of the engineering flow. Null: the ticket is not in the flow
analyzeplanbuildtestrelease
reports*integerThe reports of the visitor's problem that the ticket holds
liveAt*string | nullWhen the ticket went live. The team then tells the visitor that the problem is fixed
told*booleanA person of the team replied to the visitor after the ticket went live
customer*object | nullThe same person as a customer of the business, by the email or the id of its contact. Needs customers:read
7 properties
id*stringA 24-character id
name*string | nullstatus*enum<string>freetrialactivepast_duecancelingchurnedpaid
plan*string | nullmrr*numberWhat the customer pays a month, in the units of its currency
currency*string | nullrisk*enum<string>nonewatchhigh
visitor*object | nullThe visitor as Analytics knows one. Troopy keeps no address
8 properties
countrystring | nullregionstring | nullcitystring | nulltimeZonestring | nulllanguagestring | nullbrowserstring | nullosstring | nulldevicestring | nullpages*array<object>The last 10 pages of the visitor, by path
3 properties
path*stringtitle*string | nullat*stringISO 8601 date and time
ended*booleanThe conversation of the visitor ended. A reply then goes only by email (mailTo)
mailTo*string | nullWhere a reply of the team goes when the visitor does not read it in the chat: the email of the visitor
readAt*string | nullThe last time that the chat of the visitor was open on a page that showed. The visitor read the replies before it
rating*object | nullHow the visitor rated the help, 1 to 5, after a person resolved the conversation
3 properties
score*integerAt least 1 · At most 5
comment*string | nullat*stringISO 8601 date and time
translate*object | nullLive translate: the language of the team and of the visitor
2 properties
team*stringvisitor*string | nullNull until the first translation reads the language that the visitor writes in
translating*booleanmessages*array<object>11 properties
id*stringrole*enum<string>visitor, bot (the Support agent), person (a reply of a person of the team), note (for the team only) or event (the team took the conversation over, or resolved it)
visitorbotpersonnoteevent
text*stringat*stringISO 8601 date and time
by*object | null2 properties
id*stringname*stringoriginal*string | nullThe words that the person wrote, when the reply went to the visitor in the language of the visitor
translation*object | nullThe message in the language of the team, for Live translate
2 properties
text*stringlang*stringstate*enum<string> | nullA reply that waits for its translation, or that could not get one. The visitor sees neither
sendingfailed
byEmail*booleanA message of the visitor that came as an answer to an email of the team
attachments*array<object>5 properties
id*stringname*stringcontentType*string | nullsize*number | nullavailable*booleangif*object | null4 properties
url*stringtitle*stringwidth*numberheight*number