***

title: addVerb
slug: /reference/typescript/agents/swml-service/add-verb
description: Add a SWML verb to the main section of the document.
max-toc-depth: 3
---------------------

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

Add a verb to the `main` section of the current SWML document. Delegates to
the underlying SwmlBuilder's `addVerb()` method.

## **Parameters**

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

<ParamField path="config" type="unknown" required={true} toc={true}>
  Configuration for the verb.
</ParamField>

## **Returns**

`this` -- Returns the service for method chaining.

## **Example**

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

const service = new SWMLService({ name: 'my-ivr' });
service
  .addVerb('answer', {})
  .addVerb('play', { url: 'https://example.com/greeting.mp3' })
  .addVerb('hangup', {});
```