문서로 건너뛰기
API

채팅

이 그룹의 모든 작업: 받는 값, 반환하는 값, 응답할 수 있는 오류.

작업

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

범위threads:read읽기

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.

쿼리 매개변수

qstring

Search the titles.

최대 200자
sortstring

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

다음 중 하나"newest""oldest""title"기본값"newest"
limitinteger

Rows per page, 1 to 100.

1 이상100 이하기본값25
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.

반환값

A page of chats.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

GET/chats/{id}

Retrieve a chat

범위threads:read읽기

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.

경로 매개변수

idstring필수

The chat id from GET /chats.

반환값

200Chat

The chat.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

PATCH/chats/{id}

Rename a chat

범위threads:write데이터 변경

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.

경로 매개변수

idstring필수

The chat id from GET /chats.

요청 본문

titlestring필수
1~120자

반환값

200Chat

The chat with its new title.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

DELETE/chats/{id}

Delete a chat

범위threads:write삭제

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.

경로 매개변수

idstring필수

The chat id from GET /chats.

반환값

Deleted.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

객체

Chatobject

objectstring필수
다음 중 하나"chat"
idstring필수
titlestring필수
kindstring필수
다음 중 하나"chat"
messageCountinteger필수
0 이상
updatedAtstring필수

When a message last arrived in it.

형식date-time

ChatListobject

objectstring
다음 중 하나"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.

null 가능

DeletedChatobject

objectstring
다음 중 하나"chat"
idstring
deletedboolean
다음 중 하나true