add_section

View as MarkdownOpen in Claude

Add a new named section to the SWML document. Delegates to SWMLService.add_section().

Parameters

section_name
strRequired

Name of the section to create.

Returns

Self — The builder instance for method chaining.

Example

1from signalwire import SWMLService, SWMLBuilder
2
3service = SWMLService(name="multi-section")
4builder = SWMLBuilder(service)
5
6doc = (
7 builder
8 .answer()
9 .add_section("greeting")
10 .play(url="say:Hello!")
11 .build()
12)
13print(doc)