Delete a message
Access: Bearer token required. Also requires: Caller must be the sender of the message.
Soft-deletes one of the caller's own messages by setting its deletedAt. Deleted messages disappear from the messages endpoint and from socket history, but remain inside the messages array returned by the rooms list, and the room's lastMessage preview is not rewritten. No socket event is emitted, so other clients only notice on their next fetch. The success body has no data. All failures of this endpoint are thrown as plain errors and therefore come back as 500 in the standard error envelope, including not-found, not-owner and a malformed messageId.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
messageId*stringObjectId of the embedded message to delete.
Message soft-deleted
application/json- response
success*booleanmessage*stringcurl -X DELETE 'http://localhost:4000/api/v1/chat/messages/string'{ "success": true, "message": "Message deleted successfully"}
HomeLink Hub