# List template starters

`opensend.templates.starters(input?)`

The ready-made templates a new template can start from, by kind and search. Each has a name, what it is for, the subject it starts with and the looks it can be drawn in. Its variables and its message come with `templates.starter`.

Needs the scope: `templates:read`

## Input

- `limit` (integer): How many items to return, from 1 to 100. Without it you get 25.
- `offset` (integer): How many items to skip. Use it with `limit` to read the next page. Default: `0`.
- `q` (string): Text to search for. Only starters that have it in their name or their description are returned. Up to 40 characters.
- `category` (string): Only starters of this kind: `account`, `commerce`, `notify`, `marketing`, `events`, `hospitality`, `health`, `education`, `real-estate`, `nonprofit`, `travel`, `recruiting` or `community`. One of: `account`, `commerce`, `notify`, `marketing`, `events`, `hospitality`, `health`, `education`, `real-estate`, `nonprofit`, `travel`, `recruiting`, `community`.

## Returns

The call resolves to the answer, already parsed. A call the API refuses throws `OpenSendError` with the code and the message of the answer. [SDK](https://opensend.sh/docs/sdk) lists the errors of the client itself.

- `object` ("list"): Always `list`.
- `data` (object[]): The items on this page.
- `data[].object` ("template_starter"): Always `template_starter`.
- `data[].id` (string): The id of the starter. Pass it as `starter` to `templates.create`.
- `data[].name` (string): The name of the starter.
- `data[].description` (string): What the message is for and what it holds.
- `data[].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`.
- `data[].subject` (string): The subject line a template made from it starts with. `{{name}}` marks a variable.
- `data[].styles` (string[]): The looks it can be drawn in. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.
- `data[].defaultStyle` (string): The look it is drawn in when you name none. One of: `minimal`, `modern`, `bold`, `classic`, `dark`, `soft`.
- `total` (integer): How many items match in all, on every page together.
- `hasMore` (boolean): Whether more items follow this page.

## Example

TypeScript:

```ts
await opensend.templates.starters({
  category: 'marketing',
})
```

CLI:

```bash
opensend templates starters --category marketing
```

Answer:

```json
{
  "object": "list",
  "data": [
    {
      "object": "template_starter",
      "id": "product-announcement",
      "name": "Product announcement",
      "description": "A changelog release note: cover image, headline and lead, three numbered changes, and a link to the full entry.",
      "category": "marketing",
      "subject": "{{releaseLabel}}: {{headline}}",
      "styles": [
        "minimal",
        "modern",
        "bold",
        "classic",
        "dark",
        "soft"
      ],
      "defaultStyle": "minimal"
    },
    {
      "object": "template_starter",
      "id": "announcement",
      "name": "Announcement",
      "description": "A note from the founder: your logo up top, a personal hello, one message and one call to action.",
      "category": "marketing",
      "subject": "{{headline}}",
      "styles": [
        "minimal",
        "modern",
        "bold",
        "classic",
        "dark",
        "soft"
      ],
      "defaultStyle": "minimal"
    },
    {
      "object": "template_starter",
      "id": "waitlist-invite",
      "name": "Waitlist invitation",
      "description": "A place has opened up, and it expires on a stated date.",
      "category": "marketing",
      "subject": "Your {{productName}} invitation is ready",
      "styles": [
        "minimal",
        "modern",
        "bold",
        "classic",
        "dark",
        "soft"
      ],
      "defaultStyle": "minimal"
    }
  ],
  "total": 3,
  "hasMore": false
}
```
