POST /openapi/memorylake/api/v3/conversations/{conversationId}/messages/batch-get
所需权限:
workspace:conv_read路径参数
string
required
会话标识符
请求体
array
required
要获取的消息条目 ID 列表。每次请求最多 100 条。
curl -X POST 'https://app.memorylake.cn/openapi/memorylake/api/v3/conversations/conv-4f42addb6cb69d6ee7de2451cb590e06/messages/batch-get' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"entry_ids": [
"msg_3f4a5b6c7d8e9f0a",
"msg_9e4b2c3d5f6a7b8c"
]
}'
响应
array
与请求的条目 ID 匹配的消息对象数组
Show 消息对象
Show 消息对象
string
唯一消息标识符
array
object
附加的键值元数据
string
调用方提供的时间戳(ISO 8601)
string
消息所属的会话 ID
integer
消息在会话中的位置
string
发送消息的 Actor ID
string
创建时间戳
{
"success": true,
"data": [
{
"id": "msg_3f4a5b6c7d8e9f0a",
"content": [
{
"block_type": "TEXT",
"text": "Can you summarize last quarter's revenue numbers?"
}
],
"metadata": {},
"timestamp": "2025-06-01T14:10:00Z",
"conversation_id": "conv-4f42addb6cb69d6ee7de2451cb590e06",
"sequence_no": 3,
"actor_id": "actor-93688d5ec8d2e98701be3d5554cbc455",
"created_at": "2025-06-01T14:10:05Z"
},
{
"id": "msg_9e4b2c3d5f6a7b8c",
"content": [
{
"block_type": "TEXT",
"text": "Q1 revenue was $12.5M, up 15% from the previous quarter."
}
],
"metadata": {},
"timestamp": "2025-06-01T14:10:30Z",
"conversation_id": "conv-4f42addb6cb69d6ee7de2451cb590e06",
"sequence_no": 4,
"actor_id": "actor-9831773f1353358f4196b22505d879e0",
"created_at": "2025-06-01T14:10:32Z"
}
]
}