Skip to main content
Messages

修改消息

修改指定消息的 metadata。

POST
/threads/{thread_id}/messages/{message_id}
cURL
curl --request POST \
  --url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/messages/{message_id}' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "modified": "true",
    "user": "abc123"
  }
}
'
{
  "id": "message_ea26d29d-4509-490e-98e9-9f6238bd821b",
  "object": "thread.message",
  "created_at": 1711508622598,
  "thread_id": "thread_e99a9fe7-0433-426f-98ad-a5139c36579c",
  "incomplete_details": {},
  "completed_at": null,
  "incomplete_at": null,
  "assistant_id": "",
  "run_id": "",
  "file_ids": [],
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": {
        "value": "你好",
        "annotations": []
      }
    }
  ],
  "metadata": {
    "modified": "true",
    "user": "abc123"
  },
  "name": "",
  "plugin_call": {},
  "tool_calls": [],
  "status": "",
  "request_id": "7877b011-cb94-9df1-9add-dc42b7d611f6"
}

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。

Path Parameters

string
required

待修改的 thread ID。

string
required

待修改的 message ID。

Body

application/json
object

元数据。

Response

200-application/json
Managed Agent API
Flow Agent API
RAG API
Connector API
框架集成
  • 框架
Assistant API(下线中)