> 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. # document > Read-only accessor for the underlying SWML document. [ref-build]: /docs/server-sdks/reference/typescript/agents/swml-builder/build Read-only getter for the underlying SWML document object. Provides direct access to the mutable document (the returned reference is the internal object, not a copy). > **Note** > > Prefer [`build()`][ref-build] when you want an explicit method call for > symmetry with other accessors. The `document` getter exists for callers that > want property-style access. ## **Type** `{ version: string; sections: Record }` ## **Example** ```typescript {6} import { SwmlBuilder } from '@signalwire/sdk'; const builder = new SwmlBuilder(); builder.answer(); console.log(builder.document.version); // "1.0.0" console.log(builder.document.sections.main.length); // 1 ``` > Read-only accessor for the underlying SWML document.