DELETE/threads/{thread_id}/messages/{message_id}

Delete a message

Deletes a message from a thread. Provide both identifiers to select the thread and the message to remove; the response confirms the deletion.

2 parameters
thread_idstringrequired
The ID of the thread containing the message.
message_idstringrequired
The ID of the message to delete.

2 status codes
200Returns the message ID, a `deleted` flag, and the `thread.message.deleted` object type.
idstringrequired
deletedbooleanrequired
objectstringrequired
Allowed:thread.message.deleted
429Returned when the request is rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request exceeds a rate limit. The thread_id path parameter identifies the containing thread, and the message_id path parameter identifies the message to delete.