---
title: "ToMarkdownBody"
description: "The `ToMarkdownBody` entity."
section: "Reference"
group: "Types"
order: 238
---

## Definition

```ts
interface ToMarkdownBody {
  directoryId?: string | undefined;
  name?: string | undefined;
  ttlMs?: number | null | undefined;
}
```

## Fields

| Field         | Type                          | Notes                                                                                                                                                                                                                   |
| ------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `directoryId` | `string \| undefined`         | `optional` — Destination directory for the generated markdown file. Defaults to the workspace root. When omitted the file defaults to temp (1 day TTL); when set the file is permanent unless `ttlMs` is also provided. |
| `name`        | `string \| undefined`         | `optional` — Filename for the generated markdown file. Defaults to the source filename with a `.md` extension.                                                                                                          |
| `ttlMs`       | `number \| null \| undefined` | `optional`                                                                                                                                                                                                              |
