> ## Documentation Index
> Fetch the complete documentation index at: https://help.scribe-mail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scribe API signature content: the block tree format

> Signatures and campaigns store their layout as a content block tree. Learn the structure Scribe validates when you write signature content.

Signatures and marketing campaigns store their visual layout as a **content block tree**: a nested JSON structure of typed blocks. When you create or update a signature, you send this tree as `draft_content`. For a campaign, you send it as `content`.

<Info>
  The full schema is documented as `signature_content` on the **Create a signature** (`POST /v1/signatures`) request in the endpoint reference. This page explains how the tree is shaped so your writes pass validation.
</Info>

## The shape of the tree

The tree always starts with a single `stack` block at the root. Every block has a `type`, and a `stack` holds an ordered list of child blocks in its `children` array. A child can itself be a `stack`, which is how rows, columns, and groups are built.

```json theme={null}
{
  "type": "stack",
  "children": [
    { "type": "text", "...": "..." },
    { "type": "image", "...": "..." }
  ]
}
```

## Block types

| Type         | Renders                                                               |
| ------------ | --------------------------------------------------------------------- |
| `stack`      | A container that lays out its `children` as rows, columns, or groups. |
| `text`       | A line of text, built from text tokens and smart-field tokens.        |
| `image`      | An image, such as a logo or a photo.                                  |
| `icon`       | A single icon.                                                        |
| `button`     | A call-to-action button with a link.                                  |
| `list`       | A labelled list, for example a block of contact details.              |
| `socialList` | A row of social media icons.                                          |
| `divider`    | A horizontal separator.                                               |
| `marketing`  | A promotional banner driven by a marketing campaign.                  |

The `list` and `socialList` blocks contain their own item blocks (`listItem`, `listItemLabel`, and `socialListItem`).

## Smart-field tokens

Text and other blocks can include **smart-field tokens** that resolve to a teammate's data, such as their name, job title, or phone number, when the signature renders. This is how one template produces a personalized signature for every teammate. Define the available fields with the smart fields endpoints (`GET /v1/smart_fields` and `POST /v1/smart_fields`).

## Write content safely

Validation is strict. An invalid tree is rejected with [`422`](/api-reference/errors), and the response pinpoints the offending field. The safest way to produce a valid tree is to start from one that already renders:

<Steps>
  <Step title="Read an existing signature">
    Fetch a signature whose layout is close to what you want with `GET /v1/signatures`, and copy its `content`.
  </Step>

  <Step title="Modify the tree">
    Change only what you need, for example swapping an image URL or editing the text of a block, and keep the structure intact.
  </Step>

  <Step title="Write it back">
    Send the updated tree as `draft_content` on `POST /v1/signatures` or `PATCH /v1/signatures/{id}`.
  </Step>
</Steps>

<Tip>
  To clear a content field, send `null`.
</Tip>

## Publish your changes

Writing `draft_content` updates the draft only. To make a signature live, call `POST /v1/signatures/{id}/publish`. Publishing copies the draft into the published content and triggers installation for the assigned recipients. To re-trigger installation without changing the content, call `POST /v1/signatures/{id}/install`.

## Related

* [Signatures overview](/en/signatures-overview): how signatures work in Scribe.
* [Smart fields](/en/smart-fields): personalize signatures with dynamic data.
* [Campaigns overview](/en/marketing-overview): run promotional banners across your team's signatures.
