Skip to main content
Conversations

Delete a conversation item

DELETE
/openai/v1/conversations/{conversation_id}/items/{item_id}

Removes the specified item from a conversation.

Path Parameters
conversation_idstringrequired
The id of the conversation on which the item needs to be deleted from.
item_idstringrequired
The id of the conversation item to delete.
Header Parameters
x-ms-user-identitystringoptional
Opaque per-user identity string used to scope endpoint-scoped data to a specific end user. The caller must have the agents/endpoints/UserIdentityImpersonation/action RBAC permission.
Responses
idstringrequired
The unique ID of the conversation.
objectenumrequired
The object type, which is always conversation.
conversation
metadataOpenAI.Metadatarequired
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.
created_atintegerrequired
The time at which the conversation was created, measured in seconds since the Unix epoch.
Request
curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \
  -H "Authorization: Bearer $OPENAI_API_KEY"
Response
{
  "id": "conv_123",
  "object": "conversation",
  "created_at": 1741900000,
  "metadata": {"topic": "demo"}
}