Skip to main content
DELETE
/
livekit
/
participant
Handler for DELETE /livekit/participant endpoint
curl --request DELETE \
  --url https://api.sayna.ai/livekit/participant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "participant_identity": "user-alice-456",
  "room_name": "conversation-room-123"
}
'
{
  "participant_identity": "user-alice-456",
  "room_name": "conversation-room-123",
  "status": "removed"
}
Removes a participant from a LiveKit room, forcibly disconnecting them. Access is authorized via metadata.auth_id check.

Authorization

ModeBehavior
Authenticated (auth.id present)Requires room.metadata.auth_id == auth.id.
Unauthenticated (auth.id absent)Access is allowed (backward-compatible mode).
Room names are used exactly as provided. No prefixing or modification is applied.

Request

Requires room_name and participant_identity in the request body.

Error responses

StatusCondition
400 Bad RequestEmpty room name or participant identity.
404 Not FoundRoom/participant not found or access denied (masked for security).
500 Internal Server ErrorLiveKit not configured or removal failed.
This endpoint does not revoke the participant’s token. To prevent rejoining, use short-lived tokens and avoid issuing new tokens to removed participants.

Authorizations

Authorization
string
header
required

JWT token obtained from the authentication service. Required when AUTH_REQUIRED is enabled.

Body

application/json

Request body for removing a participant from a LiveKit room

Example

{
"room_name": "conversation-room-123",
"participant_identity": "user-alice-456"
}
participant_identity
string
required

The identity of the participant to remove

Example:

"user-alice-456"

room_name
string
required

The LiveKit room name where the participant is connected

Example:

"conversation-room-123"

Response

Participant removed successfully

Response for a successful participant removal

Example

{
"status": "removed",
"room_name": "conversation-room-123",
"participant_identity": "user-alice-456"
}
participant_identity
string
required

The identity of the removed participant

Example:

"user-alice-456"

room_name
string
required

The room name

Example:

"conversation-room-123"

status
string
required

Status of the removal operation

Example:

"removed"