Skip to main content

Update Message

This endpoint allows you to update the metadata of a specific message within a chat session in TaskingAI.

Endpoint

  • Method: POST
  • URL: https://api.tasking.ai/v1/assistants/{assistant_id}/chats/{chat_id}/messages/{message_id}

Path Parameters

ParameterTypeDescription
assistant_idstringThe unique identifier for the assistant.
chat_idstringThe unique identifier for the chat.
message_idstringThe unique identifier for the message.

Header Parameters

All TaskingAI API requests require the following headers:

HeaderTypeDescription
Content-TypestringThe content type of the request. Set to application/json.
AuthorizationstringAPI key for authorization in the format Bearer $TASKINGAI_API_KEY. The key can be obtained in the project settings in your TaskingAI console.

Payload Parameters

Request Body (application/json)

ParameterTypeRequiredDescription
metadataobjectyesMetadata for the message. Can store up to 16 key-value pairs, each with key lengths < 64 and value lengths < 512.

Request Example

{
"metadata": {"key1": "value1"}
}

Response Example

{
"status": "success",
"data": {
"object": "Message",
"message_id": "message_1",
"chat_id": "chat_1",
"assistant_id": "assistant_1",
"role": "user",
"content": {"text": "What's the weather like today in New York?"},
"metadata": {"key1": "value1"},
"updated_timestamp": 1730210035453,
"created_timestamp": 1730210035453
}
}