Edit message content and metadata after creation. NEW endpoint for content modification with proper authorization and validation.
Edit message content and metadata after creation. This is a new endpoint that provides content modification capabilities with proper authorization, validation, and audit trails.
thread_id string required
The unique identifier of the thread containing the message.
message_id string required
The unique identifier of the message to update.
content string optional
The new text content for the message. Content is automatically trimmed of leading/trailing whitespace. Cannot be empty or whitespace only.
metadata object optional
Custom key-value pairs for message metadata. Performs partial update - merges with existing metadata.
- Bash
- Python
- JavaScript
curl -X PATCH "https://api.aitronos.com/v1/threads/thread_abc123/messages/msg_123" \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Updated message content."
}'Response:
{
"id": "msg_123",
"created_at": "2025-11-17T10:00:00Z",
"updated_at": "2025-11-17T11:30:00Z",
"thread_id": "thread_abc123",
"role": "user",
"content": "Updated message content.",
"attachments": [],
"metadata": {
"edited": true,
"reason": "typo"
}
}