Modify message (v1)
POST
https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123' \
--header 'Authorization: Bearer $OPENAI_API_KEY' \
--header 'OpenAI-Beta: assistants=v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"modified": "true",
"user": "abc123"
}
}'
Response Response Example
{
"id": "msg_abc123",
"object": "thread.message",
"created_at": 1699017614,
"thread_id": "thread_abc123",
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "How does AI work? Explain it in simple terms.",
"annotations": []
}
}
],
"file_ids": [],
"assistant_id": null,
"run_id": null,
"metadata": {
"modified": "true",
"user": "abc123"
}
}
Request
Header Params
Content-Type
stringΒ
required
Example:
application/json
Authorization
stringΒ
required
Example:
Bearer $OPENAI_API_KEY
OpenAI-Beta
stringΒ
required
Example:
assistants=v1
Body Params application/json
Responses
Modified atΒ 2024-12-12 08:49:49