> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# contentControls.getContent

> Get the text content of a content control.

## Summary

Get the text content of a content control.

* Operation ID: `contentControls.getContent`
* API member path: `editor.doc.contentControls.getContent(...)`
* Mutates document: `no`
* Idempotency: `idempotent`
* Supports tracked mode: `no`
* Supports dry run: `no`
* Deterministic target resolution: `yes`

## Expected result

Returns a ContentControlsGetContentResult with the content string and format.

## Input fields

| Field             | Type                   | Required | Description           |
| ----------------- | ---------------------- | -------- | --------------------- |
| `target`          | object(nodeType="sdt") | yes      |                       |
| `target.kind`     | enum                   | yes      | `"block"`, `"inline"` |
| `target.nodeId`   | string                 | yes      |                       |
| `target.nodeType` | `"sdt"`                | yes      | Constant: `"sdt"`     |

### Example request

```json theme={null}
{
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "sdt"
  }
}
```

## Output fields

| Field     | Type   | Required | Description        |
| --------- | ------ | -------- | ------------------ |
| `content` | string | yes      |                    |
| `format`  | enum   | yes      | `"text"`, `"html"` |

### Example response

```json theme={null}
{
  "content": "example",
  "format": "text"
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `INVALID_INPUT`
* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* None

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "target": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "enum": [
              "block",
              "inline"
            ]
          },
          "nodeId": {
            "type": "string"
          },
          "nodeType": {
            "const": "sdt"
          }
        },
        "required": [
          "kind",
          "nodeType",
          "nodeId"
        ],
        "type": "object"
      }
    },
    "required": [
      "target"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "content": {
        "type": "string"
      },
      "format": {
        "enum": [
          "text",
          "html"
        ]
      }
    },
    "required": [
      "content",
      "format"
    ],
    "type": "object"
  }
  ```
</Accordion>
