# Get template starter

`templates_starter`

One ready-made template drawn in one of its looks: its blocks, the defaults of its variables, and the HTML and the plain text it makes with those defaults filled in. Nothing is saved. To make a template from it, pass its id as `starter` to `templates.create`.

Needs the scope: `templates:read`

## Arguments

- `id` (string, required): The id of the starter, such as `welcome`. Up to 64 characters.
- `style` (string): The look to draw it in: `minimal`, `modern`, `bold`, `classic`, `dark` or `soft`. Without it, the default style of the starter. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.

## Returns

The answer comes back under `structuredContent`, with the same JSON as text in `content`. A call the API refuses comes back with `isError` set, and the code and the message under `structuredContent.error`. [MCP](https://opensend.sh/docs/mcp) shows how to connect a client.

- `object` ("template_starter"): Always `template_starter`.
- `id` (string): The id of the starter. Pass it as `starter` to `templates.create`.
- `name` (string): The name of the starter.
- `description` (string): What the message is for and what it holds.
- `category` (string): The kind of mail it is, such as `account` or `commerce`. One of: `account`, `commerce`, `notify`, `marketing`, `events`, `hospitality`, `health`, `education`, `real-estate`, `nonprofit`, `travel`, `recruiting`, `community`.
- `subject` (string): The subject line a template made from it starts with. `{{name}}` marks a variable.
- `styles` (string[]): The looks it can be drawn in. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.
- `defaultStyle` (string): The look it is drawn in when you name none. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.
- `variables` (object[]): The variables of its subject and its message, each with its default.
- `variables[].name` (string): The name of the variable. It stands in the message as `{{name}}`.
- `variables[].label` (string): What the variable holds, in a few words.
- `variables[].kind` (string): What it takes: `text`, `url` for a full address or `image` for the address of a picture. One of: `text`, `url`, `image`.
- `variables[].default` (string | null): The value it gets when a send gives none. `null` when it has none: it then stays in the message as `{{name}}` until a send fills it.
- `style` (string): The look it is drawn in here. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.
- `design` (object): The blocks of the message in that look, shaped like the `design` of a template.
- `design.preview` (string, optional): The line a mail app shows beside the subject before the message is opened. `{{NAME}}` marks a variable.
- `design.style` (Record<string, string | number>, optional): CSS for the whole message, by property name. A background colour fills the page, a `maxWidth` centres the content, and `fontFamily`, `fontSize` and `lineHeight` are what text gets unless a block sets its own.
- `design.dark` (Record<string, string | number>, optional): Colours for the whole message for a reader in dark mode, by property name: `backgroundColor` fills the page, and `color` and `borderColor` go to the content. It takes: color, backgroundColor, borderColor.
- `design.fonts` (object[], optional): Fonts the message loads from an address of your own, 4 at most. A block or the page uses one by naming its `family` in `fontFamily`, and gets its `fallback` added for the mail apps that load no web fonts.
- `design.fonts[].family` (string): The name of the font, such as `Inter`. A block or the page uses the font by naming it in `fontFamily`.
- `design.fonts[].fallback` (string): The fonts to use where this one does not load, the one you want most first, such as `Helvetica, Arial, sans-serif`. Pick fonts every device has.
- `design.fonts[].url` (string): The full `https` address of the font file, on your own domain or a CDN. It cannot be a variable.
- `design.fonts[].format` (string): The format of the file: `woff2`, `woff`, `truetype` or `opentype`. One of: `woff2`, `woff`, `truetype`, `opentype`.
- `design.fonts[].weight` (number | string, optional): The weight this file holds: a number from 100 to 900 in hundreds, or `normal` or `bold`. Without it, 400.
- `design.fonts[].style` (string, optional): The style this file holds: `normal` or `italic`. Without it, `normal`. One of: `normal`, `italic`.
- `design.css` (string, optional): CSS of your own for the whole message, up to 20000 characters. It goes into the head after the rules the design makes, and reaches a block by its `className`. A rule that has to beat the style a block carries needs `!important`. `</style`, `@import`, `expression(`, `javascript:`, `behavior:`, `-moz-binding` are refused.
- `design.body` (object[]): The blocks of the message, from top to bottom.
- `design.body[].kind` (string): What the block is. `Section`, `Row`, `Column` and `Container` hold other blocks. `Text`, `Heading`, `Button`, `Link`, `Markdown`, `CodeBlock` and `CodeInline` hold text. `Img` is an image, `Hr` a line and `Html` custom code: HTML of your own that goes into the message as it is. One of: `Section`, `Row`, `Column`, `Container`, `Text`, `Heading`, `Button`, `Link`, `Img`, `Hr`, `Markdown`, `CodeBlock`, `CodeInline`, `Html`.
- `design.body[].id` (string): The id of the block. No other block of the design has it.
- `design.body[].style` (Record<string, string | number>, optional): CSS for the block, by property name, such as `{ "fontSize": "16px", "color": "#111111" }`. Only properties that work in mail are taken.
- `design.body[].align` (string, optional): Where the block sits across its line: `left`, `center` or `right`. One of: `left`, `center`, `right`.
- `design.body[].className` (string, optional): Class names for the block, one or several with one space between them, such as `hero wide`, 200 characters at most. The `css` of the design reaches the block by them. A name cannot start with `r-`.
- `design.body[].only` (string, optional): The one kind of screen the block shows on: `desktop` hides it on a phone, and `phone` shows it on a phone and nowhere else. Without it, the block shows everywhere. One of: `desktop`, `phone`.
- `design.body[].phone` (Record<string, string | number>, optional): CSS that takes the place of the style of the block on a phone, a screen up to 600 pixels wide, by property name, such as `{ "fontSize": "14px", "padding": "12px" }`. It takes: fontSize, lineHeight, textAlign, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, margin, marginTop, marginRight, marginBottom, marginLeft, width, maxWidth, height.
- `design.body[].dark` (Record<string, string | number>, optional): Colours that take the place of the ones of the block for a reader in dark mode, by property name, such as `{ "color": "#f4f4f5" }`. It takes: color, backgroundColor, borderColor.
- `design.body[].text` (string, optional): The words of a block that holds text, up to 20000 characters. `{{NAME}}` marks a variable. A `Markdown` block takes Markdown here, a `CodeBlock` takes the code and an `Html` block takes its HTML, up to 60000 characters.
- `design.body[].children` (unknown[], optional): The blocks inside a `Section`, a `Row`, a `Column` or a `Container`, each shaped like a block of `body`. A `Row` takes `Column` blocks only, and a `Column` sits in a `Row` only.
- `design.body[].href` (string, optional): Where a `Button` or a `Link` leads: a full address, or one variable as the whole value, such as `{{URL}}`.
- `design.body[].target` (string, optional): Where the link opens: `_blank` for a new tab or `_self`. Without it, `_blank`. One of: `_blank`, `_self`.
- `design.body[].src` (string, optional): The address of the picture of an `Img`: a full address, or one variable as the whole value.
- `design.body[].alt` (string, optional): What the picture of an `Img` shows, in words, for someone who cannot see it.
- `design.body[].width` (string | number, optional): The width of an `Img` or a `Column`: a number of pixels, or a length such as `50%`.
- `design.body[].height` (string | number, optional): The height of an `Img`: a number of pixels, or a length.
- `design.body[].valign` (string, optional): Where the content of a `Column` sits: `top`, `middle` or `bottom`. One of: `top`, `middle`, `bottom`.
- `design.body[].as` (string, optional): The level of a `Heading`, from `h1` to `h6`. Without it, `h1`. One of: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`.
- `design.body[].language` (string, optional): The language of a `CodeBlock`, such as `typescript` or `bash`. One it does not know is shown as plain text.
- `design.body[].theme` (string, optional): The colours of a `CodeBlock`: `oneDark`, `oneLight`, `dracula`, `nord`, `vscDarkPlus`, `vs`, `ghcolors` or `materialLight`. Without it, `oneDark`.
- `design.body[].lineNumbers` (boolean, optional): Whether a `CodeBlock` numbers its lines.
- `design.body[].stack` (boolean, optional): `true` puts the columns of a `Row` under each other on a phone. Only a `Row` takes it.
- `defaults` (Record<string, string>): The default of every variable that has one, by name. A template made from the starter gets them.
- `html` (string): The HTML the design makes, with the defaults filled in. A variable with no default stays as `{{name}}`.
- `text` (string): The same message as plain text.

## Example

MCP:

```json
{
  "name": "templates_starter",
  "arguments": {
    "id": "verify-code",
    "style": "modern"
  }
}
```

Answer, under structuredContent:

```json
{
  "object": "template_starter",
  "id": "verify-code",
  "name": "Verification code",
  "description": "A one-time code, set large enough to read off a second screen.",
  "category": "account",
  "subject": "Your {{productName}} verification code",
  "styles": [
    "minimal",
    "modern",
    "bold",
    "classic",
    "dark",
    "soft"
  ],
  "defaultStyle": "minimal",
  "variables": [
    {
      "name": "productName",
      "label": "Product name",
      "kind": "text",
      "default": null
    },
    {
      "name": "code",
      "label": "The code",
      "kind": "text",
      "default": null
    },
    {
      "name": "expiryMinutes",
      "label": "Expires in (minutes)",
      "kind": "text",
      "default": "10"
    },
    {
      "name": "footerNote",
      "label": "Footer note",
      "kind": "text",
      "default": "You are receiving this because somebody asked to sign in."
    }
  ],
  "style": "modern",
  "design": {
    "preview": "Your {{productName}} verification code",
    "style": {
      "backgroundColor": "#F2F1ED",
      "padding": "40px 12px 48px",
      "color": "#3F434A",
      "fontFamily": "Inter, Helvetica, Arial, sans-serif",
      "fontSize": "15px",
      "lineHeight": "24px"
    },
    "body": [
      {
        "kind": "Container",
        "id": "card",
        "style": {
          "width": "100%",
          "maxWidth": "600px",
          "backgroundColor": "#FFFFFF",
          "borderCollapse": "separate",
          "border": "1px solid #E4E2DC",
          "borderRadius": "14px"
        },
        "children": [
          {
            "kind": "Row",
            "id": "headline-row",
            "children": [
              {
                "kind": "Column",
                "style": {
                  "padding": "20px 32px 0px",
                  "textAlign": "left"
                },
                "align": "left",
                "id": "headline-col",
                "children": [
                  {
                    "kind": "Heading",
                    "style": {
                      "color": "#16181D",
                      "fontFamily": "Inter, Helvetica, Arial, sans-serif",
                      "fontSize": "26px",
                      "fontWeight": "600",
                      "letterSpacing": "-0.02em",
                      "lineHeight": "32px",
                      "textAlign": "left",
                      "margin": "0"
                    },
                    "text": "Confirm your email",
                    "as": "h1",
                    "id": "headline"
                  }
                ]
              }
            ]
          },
          {
            "kind": "Row",
            "id": "content",
            "children": [
              {
                "kind": "Column",
                "style": {
                  "padding": "12px 32px 12px",
                  "textAlign": "left"
                },
                "align": "left",
                "id": "content-col",
                "children": [
                  {
                    "kind": "Text",
                    "style": {
                      "color": "#16181D",
                      "fontFamily": "Inter, Helvetica, Arial, sans-serif",
                      "fontSize": "17px",
                      "lineHeight": "27px",
                      "textAlign": "left",
                      "margin": "0 0 20px"
                    },
                    "text": "Enter this code to finish signing in to {{productName}}. It expires in {{expiryMinutes}} minutes.",
                    "id": "lede"
                  },
                  {
                    "kind": "Row",
                    "style": {
                      "marginTop": "8px",
                      "marginBottom": "24px"
                    },
                    "id": "code",
                    "children": [
                      {
                        "kind": "Column",
                        "style": {
                          "backgroundColor": "#F6F5F1",
                          "borderRadius": "10px",
                          "padding": "22px 18px",
                          "textAlign": "center"
                        },
                        "align": "center",
                        "id": "code-cell",
                        "children": [
                          {
                            "kind": "Text",
                            "style": {
                              "color": "#16181D",
                              "fontFamily": "'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace",
                              "fontSize": "32px",
                              "fontWeight": "600",
                              "letterSpacing": "0.32em",
                              "lineHeight": "40px",
                              "textAlign": "center",
                              "margin": "0"
                            },
                            "text": "{{code}}",
                            "id": "code-value"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "kind": "Text",
                    "style": {
                      "color": "#62656C",
                      "fontFamily": "Inter, Helvetica, Arial, sans-serif",
                      "fontSize": "13px",
                      "lineHeight": "20px",
                      "textAlign": "left",
                      "margin": "0 0 16px"
                    },
                    "text": "If you did not ask for this, nothing has happened yet and you can ignore this message, because the code is useless on its own.",
                    "id": "ignore"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "kind": "Container",
        "id": "footer",
        "style": {
          "width": "100%",
          "maxWidth": "600px"
        },
        "children": [
          {
            "kind": "Row",
            "id": "footer-row",
            "children": [
              {
                "kind": "Column",
                "style": {
                  "padding": "24px 32px 0",
                  "textAlign": "left"
                },
                "align": "left",
                "id": "footer-col",
                "children": [
                  {
                    "kind": "Text",
                    "style": {
                      "color": "#62656C",
                      "fontFamily": "Inter, Helvetica, Arial, sans-serif",
                      "fontSize": "12px",
                      "lineHeight": "18px",
                      "textAlign": "left",
                      "margin": "0"
                    },
                    "text": "{{footerNote}}",
                    "id": "footer-note"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "defaults": {
    "expiryMinutes": "10",
    "footerNote": "You are receiving this because somebody asked to sign in."
  },
  "html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html dir=\"ltr\" lang=\"en\"><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"/><meta name=\"x-apple-disable-message-reformatting\"/></head><body style=\"background-color:#F2F1ED\"><div style=\"display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0\" data-skip-in-text=\"true\">Your {{productName}} verification code<div> ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿ ‌​‍‎‏﻿</div></div><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"background-color:#F2F1ED;padding:40px 12px 48px;color:#3F434A;font-family:Inter, Helvetica, Arial, sans-serif;font-size:15px;line-height:24px\"><tbody><tr><td><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"max-width:600px;width:100%;background-color:#FFFFFF;border-collapse:separate;border:1px solid #E4E2DC;border-radius:14px\"><tbody><tr style=\"width:100%\"><td><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\"><tbody style=\"width:100%\"><tr style=\"width:100%\"><td align=\"left\" data-id=\"__react-email-column\" style=\"padding:20px 32px 0px;text-align:left\"><h1 style=\"font-family:Inter, Helvetica, Arial, sans-serif;color:#16181D;font-size:26px;font-weight:600;letter-spacing:-0.02em;line-height:32px;text-align:left;margin:0\">Confirm your email</h1></td></tr></tbody></table><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\"><tbody style=\"width:100%\"><tr style=\"width:100%\"><td align=\"left\" data-id=\"__react-email-column\" style=\"padding:12px 32px 12px;text-align:left\"><p style=\"font-size:17px;line-height:27px;font-family:Inter, Helvetica, Arial, sans-serif;color:#16181D;text-align:left;margin:0 0 20px;margin-top:0;margin-right:0;margin-bottom:20px;margin-left:0\">Enter this code to finish signing in to {{productName}}. It expires in 10 minutes.</p><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"margin-top:8px;margin-bottom:24px\"><tbody style=\"width:100%\"><tr style=\"width:100%\"><td align=\"center\" data-id=\"__react-email-column\" style=\"background-color:#F6F5F1;border-radius:10px;padding:22px 18px;text-align:center\"><p style=\"font-size:32px;line-height:40px;font-family:&#x27;SFMono-Regular&#x27;, Menlo, Consolas, &#x27;Liberation Mono&#x27;, monospace;color:#16181D;font-weight:600;letter-spacing:0.32em;text-align:center;margin:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0\">{{code}}</p></td></tr></tbody></table><p style=\"font-size:13px;line-height:20px;font-family:Inter, Helvetica, Arial, sans-serif;color:#62656C;text-align:left;margin:0 0 16px;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0\">If you did not ask for this, nothing has happened yet and you can ignore this message, because the code is useless on its own.</p></td></tr></tbody></table></td></tr></tbody></table><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"max-width:600px;width:100%\"><tbody><tr style=\"width:100%\"><td><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\"><tbody style=\"width:100%\"><tr style=\"width:100%\"><td align=\"left\" data-id=\"__react-email-column\" style=\"padding:24px 32px 0;text-align:left\"><p style=\"font-size:12px;line-height:18px;font-family:Inter, Helvetica, Arial, sans-serif;color:#62656C;text-align:left;margin:0;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0\">You are receiving this because somebody asked to sign in.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></body></html>",
  "text": "Confirm your email\n\nEnter this code to finish signing in to {{productName}}. It expires in 10 minutes.\n\n{{code}}\n\nIf you did not ask for this, nothing has happened yet and you can ignore this message, because the code is useless on its own.\n\nYou are receiving this because somebody asked to sign in."
}
```
