palbaseDocs

Palbase Messaging · API

DELETE/messaging/conversations/{conversation_id}/members/{user_id}

Leave a group, or remove someone

The reader leaves a group (their own id), or its admins remove another (never the owner). An owner who leaves hands the group to an admin, or to whoever was in it longest; a group left by everyone is deleted. They keep what it said while they were in it.

Called by a signed-in user of your app, with their token and the publishable key.

Path

conversation_idstring (uuid) · requiredThe conversation.
user_idstring · requiredThe member.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/messaging/conversations/<conversation_id>/members/<user_id>" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN"

Responses

204Done

400Not a group (`not_a_group`)

401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)

403Not allowed (`admins_only`, `owner_role`)

404No such conversation, or member of it (`member_not_found`)

429Over the project's request limit; Retry-After says when to try again

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation RemoveMember of messaging's contract.