Skip to main content
DELETE
/
:projectId
/
api
/
v7
/
conversations
/
:conversationId
/
leave
Leave Conversation
curl --request DELETE \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/leave
Removes the current user from a conversation. Direct conversations (type: "direct") cannot be left. For group conversations, if the caller is the last admin, they must promote another member before leaving. The caller is evicted from the real-time room immediately.

Path Parameters

conversationId
string
required
The ID of the conversation to leave.

Response

{ "message": "Left conversation." }

Error Responses

{ "error": "Conversation not found.", "code": "chat/not-found" }
{ "error": "Direct conversations cannot be left.", "code": "chat/cannot-leave-dm" }
{ "error": "You are not an active member of this conversation.", "code": "chat/not-a-member" }
{ "error": "You are the last admin. Promote another member before leaving.", "code": "chat/last-admin" }