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

# Use templates

> Start a new flow from a pre-built template instead of a blank page

Templates are pre-built flow blueprints. They have the same shape as a [flow definition](/concepts/flow-definitions) — `inputs`, `variables`, `steps`, `webhooks` — plus a `category` and `tags` for browsing. The template endpoints are public: no authentication required.

## Browse templates

```bash theme={null}
curl "$BASE_URL/templates"
```

Filter by status or category:

```bash theme={null}
curl "$BASE_URL/templates?status=active&category=contact-center"
```

| Query parameter  | Description                                    |
| ---------------- | ---------------------------------------------- |
| `status`         | `active`, `draft`, or `archived`               |
| `category`       | Category label, e.g. `contact-center`, `utils` |
| `limit` / `skip` | Pagination (default 50 / 0)                    |

Fetch one template in full:

```bash theme={null}
curl "$BASE_URL/templates/tmpl_echo_demo"
```

The response carries everything a definition needs: `name`, `description`, `category`, `tags`, `version`, `status`, `inputs`, `variables`, `steps`, and `webhooks`.

## Instantiate a definition from a template

Templates are read-only — to use one, copy its shape into a new definition of your own via `POST /definitions`. Take the template's `inputs`, `variables`, `steps`, and `webhooks`, then supply your own `name` and `status`:

```bash theme={null}
TEMPLATE=$(curl -s "$BASE_URL/templates/tmpl_echo_demo")

echo "$TEMPLATE" | jq '{
    name: "My flow from template",
    status: "active",
    inputs: .inputs,
    variables: .variables,
    steps: .steps,
    webhooks: .webhooks
  }' | curl -X POST "$BASE_URL/definitions" \
    -H "X-API-Key: $GETDIALED_API_KEY" \
    -H "Content-Type: application/json" \
    -d @-
```

The new definition is yours to edit freely — swap in your own `connection_id` on each task, adjust parameters, and re-`PUT` as needed. Changes to the definition never affect the template.

<Note>
  Most templates that call external platforms leave `connection_id` unset on their tasks. Create a [connection](/concepts/connections) first and set it on each task before activating.
</Note>

<Tip>
  Set `"status": "draft"` (or omit `status`) if you want to review and edit before the flow becomes triggerable — only `active` definitions can be triggered.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Build your first flow" icon="hammer" href="/guides/build-your-first-flow">
    Author a definition from scratch instead.
  </Card>

  <Card title="Flow definitions" icon="file-code" href="/concepts/flow-definitions">
    Every field of the definition shape, explained.
  </Card>
</CardGroup>
