Chats
Jede Operation in dieser Gruppe: was sie annimmt, was sie zurückgibt und mit welchen Fehlern sie antworten kann.
Operationen
The conversations held with the assistant in the app, as the Chats page lists them. Only the workspace owner reaches the chats: an API key, or an app the owner connected with every address. An access token acting for a member is a 403 owner_only, and a key or an app limited to particular addresses or domains is a 422 capability_unsupported.
GET/chats
List the assistant chats
The chats of the workspace, newest first, a page at a time, each with its title, how many messages it holds and when it last changed. q searches the titles and sort orders them. Only the workspace owner reaches the chats: an API key, or an app the owner connected with every address. An access token acting for a member is a 403 owner_only, and a key or an app limited to particular addresses or domains is a 422 capability_unsupported.
Requires the threads:read scope.
Query-Parameter
qstringSearch the titles.
Bis zu 200 Zeichensortstringnewestandoldestorder by the last change, andtitlealphabetically.Einer von"newest""oldest""title"Standard"newest"limitintegerRows per page, 1 to 100.
Mindestens 1Höchstens 100Standard25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Rückgabe
A page of chats.
Fehler
Die Fehler, die jede Operation zurückgeben kann400401403404422500Fehlerkatalog
Auch verfügbar über
GET/chats/{id}
Retrieve a chat
One chat by id. Only the workspace owner reaches the chats: an API key, or an app the owner connected with every address. An access token acting for a member is a 403 owner_only, and a key or an app limited to particular addresses or domains is a 422 capability_unsupported.
Requires the threads:read scope.
Pfadparameter
idstringErforderlichThe chat id from
GET /chats.
Rückgabe
The chat.
Fehler
Die Fehler, die jede Operation zurückgeben kann400401403404422500Fehlerkatalog
Auch verfügbar über
PATCH/chats/{id}
Rename a chat
Gives the chat a new title. Only the workspace owner reaches the chats: an API key, or an app the owner connected with every address. An access token acting for a member is a 403 owner_only, and a key or an app limited to particular addresses or domains is a 422 capability_unsupported.
Requires the threads:write scope.
Pfadparameter
idstringErforderlichThe chat id from
GET /chats.
Request-Body
titlestringErforderlich- 1 bis 120 Zeichen
Rückgabe
The chat with its new title.
Fehler
Die Fehler, die jede Operation zurückgeben kann400401403404422500Fehlerkatalog
Auch verfügbar über
DELETE/chats/{id}
Delete a chat
Deletes the chat and every message in it, for good. Nothing it did in the mailbox is undone. Only the workspace owner reaches the chats: an API key, or an app the owner connected with every address. An access token acting for a member is a 403 owner_only, and a key or an app limited to particular addresses or domains is a 422 capability_unsupported.
Requires the threads:write scope.
Pfadparameter
idstringErforderlichThe chat id from
GET /chats.
Rückgabe
Deleted.
Fehler
Die Fehler, die jede Operation zurückgeben kann400401403404422500Fehlerkatalog
Auch verfügbar über
Objekte
Chatobject
objectstringErforderlich- Einer von
"chat" idstringErforderlichtitlestringErforderlichkindstringErforderlich- Einer von
"chat" messageCountintegerErforderlich- Mindestens 0
updatedAtstringErforderlichWhen a message last arrived in it.
Formatdate-time
ChatListobject
objectstring- Einer von
"list" dataChat[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Kann null sein
DeletedChatobject
objectstring- Einer von
"chat" idstringdeletedboolean- Einer von
true