Ir a la documentación
API

Chats

Cada operación de este grupo: lo que acepta, lo que devuelve y los errores con los que puede responder.

Operaciones

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

Alcancesthreads:readLee

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

qstring

Search the titles.

Hasta 200 caracteres
sortstring

newest and oldest order by the last change, and title alphabetically.

Uno de"newest""oldest""title"Predeterminado"newest"
limitinteger

Rows per page, 1 to 100.

Al menos 1Como máximo 100Predeterminado25
cursorstring

The 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 400 invalid_cursor.

Devuelve

A page of chats.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

SDK
chats.list()chats.listAll()chats.iterate()
CLI
openemail chats list
MCP
listChats

GET/chats/{id}

Retrieve a chat

Alcancesthreads:readLee

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 ruta

idstringObligatorio

The chat id from GET /chats.

Devuelve

200Chat

The chat.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

SDK
chats.get()
CLI
openemail chats get
MCP
getChat

PATCH/chats/{id}

Rename a chat

Alcancesthreads:writeCambia datos

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 ruta

idstringObligatorio

The chat id from GET /chats.

Cuerpo de la petición

titlestringObligatorio
De 1 a 120 caracteres

Devuelve

200Chat

The chat with its new title.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

SDK
chats.rename()
CLI
openemail chats rename
MCP
renameChat

DELETE/chats/{id}

Delete a chat

Alcancesthreads:writeElimina

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 ruta

idstringObligatorio

The chat id from GET /chats.

Devuelve

Deleted.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

SDK
chats.delete()
CLI
openemail chats delete
MCP
deleteChat

Objetos

Chatobject

objectstringObligatorio
Uno de"chat"
idstringObligatorio
titlestringObligatorio
kindstringObligatorio
Uno de"chat"
messageCountintegerObligatorio
Al menos 0
updatedAtstringObligatorio

When a message last arrived in it.

Formatodate-time

ChatListobject

objectstring
Uno de"list"
dataChat[]
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Puede ser null

DeletedChatobject

objectstring
Uno de"chat"
idstring
deletedboolean
Uno detrue