Delete a conversation (delete-for-me)
Chat
Delete a conversation (delete-for-me)
Hide a conversation from the caller’s inbox only. The other participant is unaffected and no messages are destroyed.
DELETE
Delete a conversation (delete-for-me)
Overview
Performs a per-user “delete for me”: the conversation is hidden from the caller’s inbox only. The other participant still sees the conversation and its full message history. No messages are ever destroyed. This matches the standard chat-app delete-for-me semantics:- The conversation disappears from
GET /chat/conversationsfor the caller. - The peer’s inbox is unchanged.
- All messages remain readable via list-messages (the gate is participation, not the clear marker).
- The conversation reappears in the caller’s inbox automatically if a newer message arrives after the delete (i.e.
lastMessageAt > clearedAt).
clearedAt timestamp on the caller’s participantState entry; it does not delete the conversations row or any messages rows.
There is intentionally no “delete for everyone” / hard-delete endpoint. Deletion is always scoped to the calling user.
Authentication
Bearer <accessToken> required. requireOnboarded middleware applied.
Path parameters
| Name | Type | Required | Notes | Example |
|---|---|---|---|---|
id | string | yes | 24-char hex ObjectId of the conversation. The caller must be a participant. | 66400a8f1c2b4d5e6f7a9000 |
Query parameters
None.Request body
None.Response — 204 No Content
Empty body. The call is idempotent — deleting an already-deleted conversation re-stampsclearedAt and still returns 204.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 403 | ONBOARDING_INCOMPLETE | Caller has not finished onboarding. |
| 403 | FORBIDDEN | Caller is not a participant of this conversation. |
| 404 | NOT_FOUND | No conversation with that id (or id is not a 24-char hex ObjectId). |
Side effects
- Sets
clearedAt(server time) on the caller’sparticipantStateentry. - No change to the peer’s
participantState, theconversationsrow’sstatus, or anymessages.
Bulk delete
There is no bulk endpoint — to delete several conversations the client issues oneDELETE per conversation (the mobile app’s multi-select “trash” action loops over the selected ids). Each call is independent and idempotent.
See also
- List conversations — the inbox this endpoint hides a row from.
- Get conversation — still returns the conversation (delete is inbox-scoped, not an access revocation).
- Block a user — a stronger action that prevents future messaging in both directions.