Modify message (v1)
POST
https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123Modifies a message.
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
metadata
object
required
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
modified
string
required
user
string
required
Example
{
"metadata": {
"modified": "true",
"user": "abc123"
}
}
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
id
string
required
object
string
required
created_at
integer
required
thread_id
string
required
role
string
required
content
array [object {2}]
required
type
string
optional
text
object
optional
file_ids
array[string]
required
assistant_id
null
required
run_id
null
required
metadata
object
required
modified
string
required
user
string
required
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"
}
}
Last modified: 2 months ago