leaveConference

View as MarkdownOpen in Claude

Leave an audio conference.

Parameters

conferenceId
stringRequired

The conference ID to leave.

Returns

Promise<Record<string, unknown>> — Server response confirming the leave.

Example

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
// Join a conference
const result = await call.joinConference('team-standup', { beep: 'onEnter' });
// Later, leave the conference
await call.leaveConference(result.conference_id as string);
});
await client.run();