Delete message
Beta

delete https://api.openai.com/v1/threads/{thread_id}/messages/{message_id}

Deletes a message.source

Path parameters

The ID of the thread to which this message belongs.source

The ID of the message to delete.source

Returns

Deletion statussource

Example request
1
2
3
4
curl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v2"
Response
1
2
3
4
5
{
  "id": "msg_abc123",
  "object": "thread.message.deleted",
  "deleted": true
}