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

# addSection

> Add a new empty section to the SWML document.

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

Add a new empty section to the SWML document. Sections are named containers for
ordered lists of verbs. Every document starts with a `main` section.

<Note>
  Silently no-ops if a section with the given name already exists (unlike the
  Python SDK which returns `False` on duplicate). Follow up with
  [`addVerbToSection()`][ref-addverbtosection] to populate the section.
</Note>

## **Parameters**

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

## **Returns**

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

## **Example**

```typescript {4}
import { SWMLService } from '@signalwire/sdk';

const service = new SWMLService({ name: 'multi-section' });
service.addSection('fallback');
service.addVerbToSection('fallback', 'play', {
  url: 'https://example.com/sorry.mp3',
});
service.addVerbToSection('fallback', 'hangup', {});

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