# textbox

A **`textbox`** is a type of shape which is used to display text.&#x20;

<table><thead><tr><th width="155">Parameter</th><th width="98">Type</th><th width="124">Input</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td></td><td><mark style="color:red;">[required if <code>shapeId</code> not provided]</mark> Name of shape to update/manipulate. Find shape names <a href="https://docs.powerpointgeneratorapi.com/knowledge-base/finding-shape-names">here</a>.</td></tr><tr><td>shapeId</td><td>int</td><td></td><td><mark style="color:red;">[required if <code>name</code> not provided]</mark> A unique identifier of a given shape. This ID is not displayed in the document, it's hidden in the xml. </td></tr><tr><td>text</td><td>String or <mark style="color:blue;">Object</mark> </td><td></td><td><p><mark style="color:yellow;">[optional]</mark> Text to display in the textbox:</p><p></p><p>- <strong>String</strong>: A simple way to display plain text in the textbox.</p><p></p><p>- <strong>Object</strong>: Use for advanced formatting by defining text chunks. See <a href="#text-object"><mark style="color:blue;"><strong>text object</strong></mark></a> for more information.</p></td></tr><tr><td>settings</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> An array of shape-level settings. See <a href="/pages/RQKYKA3C8xfTVOiq0Yh1#settings-object"><mark style="color:blue;"><strong>settings object</strong></mark></a> for more information.</td></tr><tr><td>is_hidden</td><td>Boolean</td><td>true, false</td><td><mark style="color:yellow;">[optional]</mark> Hide shape </td></tr><tr><td>remove</td><td>Boolean</td><td>true, false</td><td><mark style="color:yellow;">[optional]</mark> Delete shape </td></tr></tbody></table>

JSON payload

{% code lineNumbers="true" %}

```json
"shapes": [
  {
    "name": "string",
    "text": "string",
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   },
  {
    "name": "string",
    "text": [],
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   } 
]
```

{% endcode %}

***

## \`text\` Object

An array of text objects, where each object represents a part of the text with its own text content and optional properties.

<table><thead><tr><th width="179">Parameter</th><th width="120">Type</th><th width="110">Input</th><th>Description</th></tr></thead><tbody><tr><td>text_run</td><td>String</td><td></td><td><mark style="color:red;">[required]</mark> Text chunk </td></tr><tr><td>text_properties</td><td><mark style="color:blue;">Object</mark></td><td></td><td><mark style="color:yellow;">[optional]</mark> A <a href="#text_properties-object"><mark style="color:blue;"><strong>text styling object</strong></mark></a>. List of font styling parameters to override existing styles for the given chunk of text. </td></tr></tbody></table>

JSON Payload

{% code lineNumbers="true" %}

```json
"text": [
  {
    "text_run": "This is part 1 of my sentence.",
    "text_properties": {}
  },
  {
    "text_run": "This is part 2 of my sentence.",
    "text_properties": {}
  }
]
```

{% endcode %}

***

### \`text\_properties\` Object

Text format properties.&#x20;

<table><thead><tr><th width="181">Parameter</th><th width="126">Type</th><th width="178">Input</th><th width="230">Description</th></tr></thead><tbody><tr><td>font_type</td><td>String</td><td>MS supported <a href="https://learn.microsoft.com/en-us/typography/font-list/#a">font names</a></td><td><mark style="color:yellow;">[optional]</mark> Font name</td></tr><tr><td>font_size</td><td>Integer</td><td>1 to 4000</td><td><mark style="color:yellow;">[optional]</mark> Font size</td></tr><tr><td>font_bold</td><td>Boolean</td><td>true, false</td><td><mark style="color:yellow;">[optional]</mark> Bold </td></tr><tr><td>font_italic</td><td>Boolean</td><td>true, false</td><td><mark style="color:yellow;">[optional]</mark> Italic </td></tr><tr><td>font_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text color</td></tr><tr><td>font_bg_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text background color</td></tr><tr><td>text_indent</td><td>Integer</td><td>0 to 142.24</td><td><mark style="color:yellow;">[optional]</mark> Set text indent</td></tr><tr><td>text_align</td><td>String (Enum)</td><td><p><code>left</code>,</p><p><code>center</code>,</p><p><code>right</code>,</p><p><code>justified</code>,</p><p><code>dist</code></p></td><td><mark style="color:yellow;">[optional]</mark> Set text alignment</td></tr><tr><td>font_underline</td><td>String (Enum)</td><td><p><code>single</code>,</p><p><code>double</code>,</p><p><code>heavy</code>,</p><p><code>dotted</code>,</p><p><code>heavydotted</code>,</p><p><code>dashed</code>,</p><p><code>heavydashed</code>,</p><p><code>heavylongdashed</code>,</p><p><code>dotdash</code>,</p><p><code>heavydotdash</code>,</p><p><code>heavydotdotdash</code>,</p><p><code>wavy</code>,</p><p><code>heavywavy</code>,</p><p><code>doublewavy</code></p></td><td><mark style="color:yellow;">[optional]</mark> Various text underline</td></tr><tr><td>text_line_spacing</td><td><p>Float,</p><p>Integer</p></td><td>1.00-9.99</td><td><mark style="color:yellow;">[optional]</mark> Set spacing above and within a paragraph. Line Spacing option is set to <code>Multiple</code>.  A value of <code>1</code> would equal single-spacing, while a value of <code>3</code> would equal triple-spacing</td></tr><tr><td>bullet</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Enable bullet point</td></tr><tr><td>bullet_type</td><td>String (Enum)</td><td><code>Symbol</code> or <code>Number</code></td><td><mark style="color:yellow;">[optional]</mark> Use symbols or numbers</td></tr><tr><td>bullet_font_name</td><td>String</td><td>MS supported <a href="https://learn.microsoft.com/en-us/typography/font-list/#a">font names</a></td><td><mark style="color:yellow;">[optional]</mark> Set bullet font type</td></tr><tr><td>bullet_character_code</td><td>Integer</td><td>0-50000</td><td><mark style="color:yellow;">[optional]</mark> Set bullet symbol </td></tr><tr><td>bullet_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set bullet color</td></tr><tr><td>bullet_size</td><td>Integer</td><td>0-5000</td><td><mark style="color:yellow;">[optional]</mark> Set bullet size relative to text</td></tr><tr><td>bullet_indent_level</td><td>Integer</td><td>0-100</td><td><mark style="color:yellow;">[optional]</mark> Set gap between bullet point and text. Tab based indent </td></tr><tr><td>bullet_indent</td><td><p>Integer,</p><p>Float</p></td><td>0-142.24 </td><td><mark style="color:yellow;">[optional]</mark> Set gap between bullet point and text. Unit is `cm` by default.</td></tr><tr><td>new_line</td><td> Boolean</td><td> true; false</td><td><mark style="color:yellow;">[optional]</mark> Appends a line break and creates a new paragraph</td></tr></tbody></table>

```json
"text_properties": {
    "font_type": "string",
    "font_size": numeric,
    "font_bold": boolean,
    "font_italic": boolean,
    "font_color": "string",
    "font_bg_color": "string",
    "text_align": "string",
    "text_indent": numeric,
    "text_line_spacing": numeric,
    "font_underline": "string",	
    "bullet": boolean,
    "bullet_type": "string",
    "bullet_font_name": "string",
    "bullet_character_code": numeric,
    "bullet_color": "string",
    "bullet_indent_level": numeric,
    "bullet_size": numeric,
    "bullet_indent": numeric,
    "new_line": boolean
  }
```

***

### \`settings\` Object

These settings are applied at shape level.&#x20;

<table><thead><tr><th width="181">Parameter</th><th width="126">Type</th><th width="159">Input</th><th width="230">Description</th></tr></thead><tbody><tr><td>height</td><td><p>Integer,</p><p>Float</p></td><td>0 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set shape height</td></tr><tr><td>width</td><td><p>Integer,</p><p>Float</p></td><td>0 to 5963.92</td><td><mark style="color:yellow;">optional]</mark> Set shape width</td></tr><tr><td>left</td><td><p>Integer,</p><p>Float</p></td><td>-5963.92 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set left position</td></tr><tr><td>top</td><td><p>Integer,</p><p>Float</p></td><td>-5963.92 to 5963.92</td><td><mark style="color:yellow;">[optional]</mark> Set top position</td></tr><tr><td>unit</td><td>String<br>(Enum)</td><td><p><code>cm</code>,</p><p><code>pt</code>,</p><p><code>points</code> </p></td><td><mark style="color:yellow;">[optional]</mark> Set unit of measurement for shape <code>width</code>, <code>height</code>, <code>left</code>, <code>top.</code>(default value if ‘unit’ field is not specified)</td></tr><tr><td>fill_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set shape background color</td></tr><tr><td>font_type</td><td>String</td><td>MS supported <a href="https://learn.microsoft.com/en-us/typography/font-list/#a">font names</a></td><td><mark style="color:yellow;">[optional]</mark> Font type</td></tr><tr><td>font_size</td><td>Integer</td><td>1 to 4000</td><td><mark style="color:yellow;">[optional]</mark> Font size</td></tr><tr><td>font_bold</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Bold </td></tr><tr><td>font_italic</td><td>Boolean</td><td>true; false</td><td><mark style="color:yellow;">[optional]</mark> Italic </td></tr><tr><td>font_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text color</td></tr><tr><td>font_bg_color</td><td>String</td><td><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties">Color name</a>,</p><p>RGB(0,0,0),</p><p><a href="https://www.color-hex.com/">Hex</a></p></td><td><mark style="color:yellow;">[optional]</mark> Set text background color</td></tr><tr><td>text_indent</td><td>Integer</td><td>0 to 142.24</td><td><mark style="color:yellow;">[optional]</mark> Set text indent</td></tr><tr><td>font_underline</td><td>String<br>(Enum)</td><td><p><code>single</code>,</p><p><code>double</code>,</p><p><code>heavy</code>,</p><p><code>dotted</code>,</p><p><code>heavydotted</code>,</p><p><code>dashed</code>,</p><p><code>heavydashed</code>,</p><p><code>heavylongdashed</code>,</p><p><code>dotdash</code>,</p><p><code>heavydotdash</code>,</p><p><code>heavydotdotdash</code>,</p><p><code>wavy</code>,</p><p><code>heavywavy</code>,</p><p><code>doublewavy</code></p></td><td><mark style="color:yellow;">[optional]</mark> Various text underline</td></tr><tr><td>text_align</td><td>String<br>(Enum)</td><td><p><code>left</code>,</p><p><code>center</code>,</p><p><code>right</code>,</p><p><code>justified</code>,</p><p><code>dist</code></p></td><td><mark style="color:yellow;">[optional]</mark> Set text alignment</td></tr><tr><td>text_line_spacing</td><td>Integer</td><td>1.00-9.99</td><td><mark style="color:yellow;">[optional]</mark> Set spacing above and within a paragraph. Line Spacing option is set to <code>Multiple</code>.  A value of <code>1</code> would equal single-spacing, while a value of <code>3</code> would equal triple-spacing</td></tr><tr><td>vertical_anchor</td><td>String<br>(Enum)</td><td><code>top</code>,<br><code>middle</code>,<br><code>bottom</code></td><td><mark style="color:yellow;">[optional]</mark> Set vertical text alignment</td></tr><tr><td>new_line</td><td> Boolean</td><td> true; false</td><td><mark style="color:yellow;">[optional]</mark> Appends a line break and creates a new paragraph</td></tr></tbody></table>

JSON payload

```json
"settings": {
  "height": numeric,
  "width": numeric,
  "top": numeric,
  "left": numeric,
  "unit": "string",
  "fill_color": "0,0,0",
  "font_type": "string",
  "font_size": numeric,
  "font_bold": boolean,
  "font_italic": boolean,
  "font_color": "string",
  "font_bg_color": "string",
  "font_underline": "string",
  "text_align": "string",
  "text_indent": numeric,
  "text_line_spacing": numeric,
  "vertical_anchor": "string",	
  "new_line": boolean
}	   
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/json-template-syntax/shapes/textbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
