Server SDKs
Build AI agents, control calls, send messages, and more
Append a verb to a named section of the SWML document. If the section does not exist, it is created automatically.
The target section name.
The SWML verb name (e.g., "answer", "play", "hangup").
"answer"
"play"
"hangup"
The verb’s configuration payload.
void
1import { SwmlBuilder } from '@signalwire/sdk';23const builder = new SwmlBuilder();4builder.addVerb('answer', {});5builder.addVerbToSection('goodbye', 'play', {6 url: 'https://example.com/goodbye.mp3',7});8builder.addVerbToSection('goodbye', 'hangup', {});910console.log(builder.renderDocument());