Delete a conversation item¶
Delete an item from a local conversation. The item can no longer be retrieved.
DELETE https://token.moi.matrixorigin.cn/v1/conversations/{conversation_id}/items/{item_id}
Before you begin¶
Prepare a personal access token with Genesis access.
Use the credential used to Create a conversation, and choose a local conversation that has not been deleted or bound to an upstream model.
Choose an item returned by Create a conversation item or List conversation items.
Request example¶
Replace $GENESIS_ACCESS_TOKEN and $CONVERSATION_ID with your personal access token and the selected conversation ID.
Replace $ITEM_ID with the selected item ID.
curl -X DELETE "https://token.moi.matrixorigin.cn/v1/conversations/$CONVERSATION_ID/items/$ITEM_ID" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The |
|
string |
Yes |
The target item’s |
Successful response¶
A successful request confirms deletion; the item can no longer be retrieved.
{
"id": "$ITEM_ID",
"object": "conversation.item.deleted",
"deleted": true
}
Field |
Type |
Description |
|---|---|---|
|
string |
Identifier of the deleted resource. |
|
string |
Deletion result type. |
|
boolean |
|
Error response¶
The request returns 404 when the resource is missing, deleted, or inaccessible to the current credential.
{
"error": {
"message": "conversation item not found",
"type": "conversation_item_not_found",
"code": "conversation_item_not_found"
}
}
Field |
Type |
Description |
|---|---|---|
|
object |
Error details. |
|
string |
Error description. |
|
string |
Error type. |
|
string |
Error code. |