NAME
OpenAPI::Client::OpenAI::Path::threads-thread_id-messages-message_id - Documentation for the /threads/{thread_id}/messages/{message_id} path.
OPERATIONS
DELETE /threads/{thread_id}/messages/{message_id}
deleteMessage
$client->delete_message({
body => { ... },
});
Deletes a message.
Path/query parameters
thread_id(in path, required, string) - The ID of the thread to which this message belongs.message_id(in path, required, string) - The ID of the message to delete.
Responses
200 - OK
Content-Type: application/json
Example:
{
"deleted" : false,
"id" : "string",
"object" : "thread.message.deleted"
}
GET /threads/{thread_id}/messages/{message_id}
getMessage
$client->get_message({
body => { ... },
});
Retrieve a message.
Path/query parameters
thread_id(in path, required, string) - The ID of the thread to which this message belongs.message_id(in path, required, string) - The ID of the message to retrieve.
Responses
200 - OK
Content-Type: application/json
Example:
{
"assistant_id" : "asst_abc123",
"attachments" : [],
"content" : [
{
"text" : {
"annotations" : [],
"value" : "Hi! How can I help you today?"
},
"type" : "text"
}
],
"created_at" : 1698983503,
"id" : "msg_abc123",
"metadata" : {},
"object" : "thread.message",
"role" : "assistant",
"run_id" : "run_abc123",
"thread_id" : "thread_abc123"
}
POST /threads/{thread_id}/messages/{message_id}
modifyMessage
$client->modify_message({
body => { ... },
});
Modifies a message.
Path/query parameters
thread_id(in path, required, string) - The ID of the thread to which this message belongs.message_id(in path, required, string) - The ID of the message to modify.
Responses
200 - OK
Content-Type: application/json
Example:
{
"assistant_id" : "asst_abc123",
"attachments" : [],
"content" : [
{
"text" : {
"annotations" : [],
"value" : "Hi! How can I help you today?"
},
"type" : "text"
}
],
"created_at" : 1698983503,
"id" : "msg_abc123",
"metadata" : {},
"object" : "thread.message",
"role" : "assistant",
"run_id" : "run_abc123",
"thread_id" : "thread_abc123"
}
SCHEMAS
DeleteMessageResponse
Properties:
deleted(boolean, required)id(string, required)object(string, required)Allowed values: thread.message.deleted
MessageObject
Properties:
assistant_id(anyOf, required)attachments(anyOf, required)completed_at(anyOf, required)content(array of object, required) - The content of the message in array of text and/or images.created_at(integer, required) - The Unix timestamp (in seconds) for when the message was created.id(string, required) - The identifier, which can be referenced in API endpoints.incomplete_at(anyOf, required)incomplete_details(anyOf, required)metadata(Metadata, required)See "Metadata" below for shape.
object(string, required) - The object type, which is alwaysthread.message.Allowed values: thread.message
role(string, required) - The entity that produced the message. One ofuserorassistant.Allowed values: user, assistant
run_id(anyOf, required)status(string, required) - The status of the message, which can be eitherin_progress,incomplete, orcompleted.Allowed values: in_progress, incomplete, completed
thread_id(string, required) - The thread ID that this message belongs to.
Metadata
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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
ModifyMessageRequest
Properties:
metadata(Metadata)See "Metadata" below for shape.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.