> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# addSection

> Add a new empty named section to the SWML document.

[ref-addverbtosection]: /docs/server-sdks/reference/typescript/agents/swml-builder/add-verb-to-section

Add a new empty named section to the SWML document. Sections are named
containers for ordered lists of verbs. Every document starts with a `main`
section -- use this method to create additional sections (e.g., a `transfer`
flow).

Silently no-ops if a section with the given name already exists. Follow up
with [`addVerbToSection()`][ref-addverbtosection] to populate the section.

## **Parameters**

<ParamField path="sectionName" type="string" required={true} toc={true}>
  Name of the section to create.
</ParamField>

## **Returns**

`this` -- returns the builder for fluent chaining.

## **Example**

```typescript {5}
import { SwmlBuilder } from '@signalwire/sdk';

const builder = new SwmlBuilder();
builder.answer();
builder.addSection('fallback');
builder.addVerbToSection('fallback', 'play', {
  url: 'https://example.com/sorry.mp3',
});
builder.addVerbToSection('fallback', 'hangup', {});

console.log(builder.renderDocument());
```