Crescendo Lab เอกสาร
ไทย
สมัครใช้งาน

ข้อมูลอ้างอิง API: Conversations

Platform API v1 ส่วน Conversations: path, พารามิเตอร์, ฟิลด์ของคำขอและคำตอบ, scope, idempotency และข้อผิดพลาดของทุก operation จาก contract

อัปเดตล่าสุด
ดู Markdown เปิดใน Claude เปิดใน ChatGPT

สร้างจาก API contract (Agent Lab Platform API 1.0.0-alpha.1) คำอธิบายเป็นภาษาอังกฤษตามต้นฉบับใน contract

Members' conversations, read and kept as the acting member: reading what was said needs the restricted conversations:read, as does searching them, listing what automation started and reading their files; changing where a conversation sits on its member's shelf, and archiving a departed member's file, needs conversations:write.

The conversations people started#

GET /v1/workspaces/{workspaceId}/conversations

The conversations members started, newest activity first, as the acting member's shelf shows them: their own, or every member's for a member who may read any conversation (owners and administrators). Conversations automation started are listed by GET …/conversations/background; evaluation runs' are not listed. archived=true lists what was put away instead; the two lists page separately. conversations:read is restricted: no installation holds it until the platform has reviewed the application.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
cursorquerystringไม่The nextCursor of the previous page. Opaque.
limitqueryintegerไม่Items per page. ค่าเริ่มต้น: 50.
archivedquerybooleanไม่List the archived conversations instead. ค่าเริ่มต้น: false.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationPageA page of conversations.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

A conversation and what was said in it#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}

The conversation and every message in it, oldest first. Readable by the member who started it, and by a member who may read any conversation, whose read is recorded in the workspace's audit log with the application beside them; anyone else's is not found, as is one of another workspace. Reading does not mark it read; PATCH with seen: true does. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationDetailThe conversation.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Rename, pin, archive or mark a conversation read#

PATCH /v1/workspaces/{workspaceId}/conversations/{conversationId}

Changes where the conversation sits on its member's shelf; only what is sent changes. Only the member who started it changes it: anyone else's conversation is not found, as is one of another workspace. Pinning is for conversations people started, and archiving one unpins it. The changes are made one at a time in this order: archived: false, pinned, archived: true, title, seen; a refusal (such as PIN_LIMIT_REACHED) leaves the ones before it made, so read the conversation again before retrying.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:writememberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.

เนื้อหาคำขอ

application/json: ConversationStateChange

ฟิลด์ชนิดจำเป็นคำอธิบาย
titlestringไม่The member's own name for it; empty clears it back to the generated one.
pinnedbooleanไม่—
archivedbooleanไม่Archiving also unpins it.
seenbooleanไม่The member opened it. Nothing marks a conversation unread. ค่าที่เป็นไปได้: true.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationThe conversation as it is now.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
409application/json: ErrorThe change cannot be made as asked: PIN_LIMIT_REACHED, the member has pinned as many conversations as they may (configure: unpin one first); CONVERSATION_ARCHIVED, an archived conversation cannot be pinned without archived: false in the same change (none).
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Find conversations by what was said in them#

GET /v1/workspaces/{workspaceId}/conversations/search

The conversations the acting member may list (their own, or every member's for a member who may read any conversation) whose messages contain every word of query, ignoring case, newest activity first. The newest 200 conversations are searched, and searched says how many were, so an empty items tells "nothing matched" from "nothing to search". A member who may read any conversation searching other members' conversations is recorded in the workspace's audit log with the application beside them (the count, never the term); when that cannot be recorded nothing is answered (503). conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
queryquerystringใช่The words to find; not blank, at most 200 characters.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationSearchThe conversations that matched.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

The conversations automation started#

GET /v1/workspaces/{workspaceId}/conversations/background

The conversations schedules and triggers started, newest activity first, each with how its run ended and what started it: the acting member's own, or every member's for a member who may read any conversation. Read one with GET …/conversations/{conversationId}. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
cursorquerystringไม่The nextCursor of the previous page. Opaque.
limitqueryintegerไม่Items per page. ค่าเริ่มต้น: 50.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: BackgroundConversationPageA page of background conversations.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

How each schedule and trigger has been doing#

GET /v1/workspaces/{workspaceId}/conversations/background/summary

The newest window background conversations the acting member may list, grouped by the schedule or trigger that started them, with how their runs ended. The counts describe that window, not a source's whole history. Conversations naming no source are counted in unattributedCount. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: BackgroundConversationSummaryThe summary.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

How many background results the member has not opened#

GET /v1/workspaces/{workspaceId}/conversations/background/unseen

How many of the acting member's own newest window background conversations hold a result they have not opened; the member's own for an administrator too. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: BackgroundConversationUnseenThe count.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Tools that wait for the member's own credential#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/pending-authorizations

The tools in the conversation that would refuse the member who started it until that member connects their own credential for them. A tool that acts with the workspace's credential is not listed. Readable by the member who started it and by a member who may read any conversation; anyone else's is not found, as is one of another workspace. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: PendingAuthorizationListThe tools waiting for a credential.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Every file attached in a conversation#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments

The files members attached in the conversation, without their content, and whether the member who attached them is still a member. For a member who may read any conversation (owners and administrators), whatever conversation it is; anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. The member who attached a file reads it in the conversation's messages. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationAttachmentInventoryThe files.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

A file the member attached#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}

The file as it was attached, base64-encoded, for the member who started the conversation. Anyone else's, including a member who may read any conversation, is not found: they use POST …/export, which is recorded. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.
attachmentIdpathstringใช่A file attached in the conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationAttachmentContentThe file.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Export a file attached in any conversation#

POST /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}/export

The file as it was attached, base64-encoded, for a member who may read any conversation (owners and administrators). The export is recorded in the workspace's audit log as the acting member's, with the application beside them, before anything is answered; when it cannot be recorded nothing is answered. Anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. conversations:read is restricted.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:readmemberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.
attachmentIdpathstringใช่A file attached in the conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
200application/json: ConversationAttachmentContentThe file.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Archive a file whose uploader has left#

POST /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}/archive

Marks a file archived once the member who attached it is no longer a member of the workspace; the file is kept and can still be exported. Recorded in the workspace's audit log as the acting member's, with the application beside them. Needs a member who may read any conversation and manage the workspace; anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. A file whose uploader is still a member is not found, as one that does not exist. Archiving an archived file changes nothing.

ScopeทำในนามของการยืนยันตัวตนIdempotency-Key
conversations:writememberinstallationToken—

พารามิเตอร์

ชื่อตำแหน่งชนิดจำเป็นคำอธิบาย
workspaceIdpathstringใช่The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstringใช่The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
conversationIdpathstringใช่The conversation, by id.
attachmentIdpathstringใช่A file attached in the conversation, by id.

คำตอบ

สถานะเนื้อหาคำอธิบาย
204—Archived.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).