> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Docx create

> IMPORTANT: For headings and paragraphs, use docx_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via…

`docx_create`

IMPORTANT: For headings and paragraphs, use docx\_edit with type "markdown" instead: it is faster, creates proper styles, and handles positioning via target + placement. Only use docx\_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate docx\_format call. For subsequent operations, re-fetch blocks with docx\_get\_content to get fresh refs (refs expire after any mutation). When the user asks for a "heading", use action "heading" with a level (default 1). Use action "paragraph" for regular body text. Position with "at": \{kind:"documentEnd"} (default), \{kind:"documentStart"}, or \{kind:"after"/"before", target:\{kind:"block", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next "at" target to maintain correct ordering. Do NOT use newlines in "text" to create multiple paragraphs; call this tool separately for each one.

## Parameters

**action** `string, enum: 'heading' | 'paragraph' | 'table'` *required*

The action to perform. One of: heading, paragraph, table.

**force** `boolean`

Bypass confirmation checks.

**changeMode** `string, enum: 'direct' | 'tracked'`

Edit mode: "direct" applies changes immediately, "tracked" records as suggestions.

**dryRun** `boolean`

Preview the result without applying changes.

**at**

Position: \{kind:'documentEnd'} to append, \{kind:'documentStart'} to prepend, or \{kind:'before'|'after', target:\{kind:'block', nodeType:'...', nodeId:'...'}} for relative placement.

**text** `string`

Paragraph text content. Each call creates ONE paragraph. For multiple items (e.g. list items), call docx\_create separately for each item: do NOT use newlines to put multiple items in one paragraph.

**input** `object`

Full paragraph input as JSON (alternative to individual text/at params).

**level** `number`

Heading level (1-6). Required for action 'heading'.

**rows** `number`

Required for action 'table'.

**columns** `number`

Required for action 'table'.

**documentId** `string` *required*

The HERO documentId of the docx to target.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.