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

# Create Sequence from Template

> Create a draft sequence from a ready-made template

Creates a draft sequence from a template returned by [List Sequence Templates](https://docs.sequenzy.com/api-reference/sequences/templates.md), exactly as **New sequence** does in the dashboard. Requires the `sequences:write` scope. Every successful call creates another sequence, so do not retry after a success.

What you get:

* **Push-first branch.** Templates with `channelStrategy: "push_first_email_fallback"` start with a branch on whether the contact is reachable by push, meaning an active device on a platform you have set up (APNs, FCM or web push). Those contacts get the push and in-app steps; everyone else gets the email steps. In-app messages reach both, the next time the app opens.
* **Quiet hours.** Every wait ends inside the template's daytime window (09:00 to 21:00) in each contact's own timezone, falling back to UTC.
* **Stop conditions.** The template's continue condition becomes the sequence stop condition, so a contact leaves once they convert.
* **Frequency cap.** Email steps respect your company frequency cap when the template enables it. Push and in-app steps are not counted against it.
* **Goal.** The template's attribution goal is created on the sequence, so conversions show in its results.

Emails are written by AI from your brand in the background, usually within 30 to 60 seconds; poll [Get Sequence](https://docs.sequenzy.com/api-reference/sequences/get.md). Push and in-app copy comes from the template: review it before you [enable the sequence](https://docs.sequenzy.com/api-reference/sequences/enable.md). Calendar templates that count down to key dates (Black Friday) return `400`; create those in the dashboard or with [Create Sequence](https://docs.sequenzy.com/api-reference/sequences/create.md) and `keyDates`.

## Request

**templateId** `string` *required*

Template id, such as `mobile-trial-conversion`.

**name** `string`

Sequence name, up to 255 characters. Defaults to the template name.

## Response

**sequence** `object`

**sequence**

**id** `string`

Sequence id.

**status** `string`

Always `draft`.

**templateId** `string`

The template used.

**channels** `string[]`

`push`, `in_app` and/or `email`.

**channelStrategy** `string | null`

`push_first_email_fallback` or `null`.

**frequencyCapEnabled** `boolean`

Whether email steps respect the frequency cap.

**goalId** `string | null`

The attribution goal created with the sequence.

**emailCount** `integer`

Email steps across both branches.

**pushCount** `integer`

Push steps.

**inAppCount** `integer`

In-app steps.

**enrichmentStatus** `string`

`processing` while AI writes the emails, `not_needed` when there are none.

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/sequences/from-template" \
  -H "Authorization: Bearer $SEQUENZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "templateId": "mobile-trial-conversion" }'
```

```json theme={null}
{
  "success": true,
  "sequence": {
    "id": "seq_abc123",
    "name": "Trial to Paid",
    "status": "draft",
    "templateId": "mobile-trial-conversion",
    "channels": ["push", "in_app", "email"],
    "channelStrategy": "push_first_email_fallback",
    "frequencyCapEnabled": true,
    "goalId": "goal_abc123",
    "emailCount": 2,
    "pushCount": 2,
    "inAppCount": 4,
    "enrichmentStatus": "processing"
  },
  "message": "Created \"Trial to Paid\" as a draft from the Trial to Paid template. AI is writing its emails from your brand; this typically takes 30-60 seconds. Review the push and in-app copy before enabling it. Requires: Connect RevenueCat, Superwall or Adapty so trial starts and conversions arrive automatically."
}
```

## Errors

| Status | When |
| - | - |
| `400` | The template counts down to key dates. |
| `401` | Missing or invalid API key. |
| `404` | No template has this id. |
| `422` | `templateId` is missing or empty. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.