***

title: addVerbToSection
slug: /reference/typescript/agents/swml-builder/add-verb-to-section
description: Append a verb to a named section, creating the section if it does not exist.
max-toc-depth: 3
---------------------

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

Append a verb to a named section of the SWML document. If the section does not
exist, it is created automatically.

## **Parameters**

<ParamField path="sectionName" type="string" required={true} toc={true}>
  The target section name.
</ParamField>

<ParamField path="verbName" type="string" required={true} toc={true}>
  The SWML verb name (e.g., `"answer"`, `"play"`, `"hangup"`).
</ParamField>

<ParamField path="config" type="unknown" required={true} toc={true}>
  The verb's configuration payload.
</ParamField>

## **Returns**

`void`

## **Example**

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

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

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