दस्तावेज़ पर जाएँ
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