Conversas
Cada operação deste grupo: o que aceita, o que devolve e os erros com que pode responder.
Operações
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.
Parâmetros de consulta
qstringSearch the titles.
Até 200 caracteressortstringnewestandoldestorder by the last change, andtitlealphabetically.Um de"newest""oldest""title"Predefinição"newest"limitintegerRows per page, 1 to 100.
Pelo menos 1No máximo 100Predefinição25cursorstringThe 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.
Devolve
A page of chats.
Erros
Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros
Também disponível em
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.
Parâmetros de caminho
idstringObrigatórioThe chat id from
GET /chats.
Devolve
The chat.
Erros
Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros
Também disponível em
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.
Parâmetros de caminho
idstringObrigatórioThe chat id from
GET /chats.
Corpo do pedido
titlestringObrigatório- De 1 a 120 caracteres
Devolve
The chat with its new title.
Erros
Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros
Também disponível em
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.
Parâmetros de caminho
idstringObrigatórioThe chat id from
GET /chats.
Devolve
Deleted.
Erros
Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros
Também disponível em
Objetos
Chatobject
objectstringObrigatório- Um de
"chat" idstringObrigatóriotitlestringObrigatóriokindstringObrigatório- Um de
"chat" messageCountintegerObrigatório- Pelo menos 0
updatedAtstringObrigatórioWhen a message last arrived in it.
Formatodate-time
ChatListobject
objectstring- Um de
"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.
Pode ser null
DeletedChatobject
objectstring- Um de
"chat" idstringdeletedboolean- Um de
true