> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# end

> End a conversation and start post-processing.

[ref-aichatclient]: /docs/server-sdks/reference/typescript/agents/ai-chat-client

[delete]: /docs/server-sdks/reference/typescript/agents/ai-chat-client/delete

End the conversation and start post-processing: the summary, and a request to
your `post_prompt_url` when your SWML sets one. The webhook is not instant, so
expect seconds.

To remove a conversation without any of that, use [`delete()`][delete].

## **Parameters**

**`conversationId`** `string` — required

The conversation to end.

---

## **Returns**

`Promise<boolean>` -- `true` when the service reported the conversation ended.

## **Example**

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

const client = new AIChatClient({ space: 'your-space' });

const ended = await client.end('chat-8f21');
console.log(ended ? 'Conversation ended' : 'No such conversation');
```