Skip to main content
Leave Conversation
Removes the acting user (the token’s user, or the user a service key names in actingUserId) 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

string
required
The ID of the conversation to leave.

Query Parameters

string
Service key only, and required with one: the user this request acts as. The member who leaves. A user token always acts as its own user and must not send it (400 chat/acting-user-not-allowed).

Response

204 No Content on success, with no body.

Error Responses

A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials:
A service key sent no actingUserId.
The caller is the group’s only admin. Someone has to stay in charge, so another member must be made admin first.