Skill
---
name: create-quote-from-template
description: Create a Hyperline quote from a quote template through the public API while preserving template terms, attachments, and contract documents. Use when an agent needs to draft or execute a quote from template workflow, optionally updating subscription custom properties, dates, products, phases, coupons, discounts, prices, or seats on the draft subscription after creation.
---
# Create Quote From Template
Use the public API endpoint `POST /v1/quotes`.
## Inputs
Collect these values before calling the API:
- `customer_id`: Hyperline customer ID.
- `template_id`: quote template ID.
- Optional `custom_properties`: key/value map using custom property slugs as keys.
- Optional subscription overrides such as contract dates, products, phases, coupons, discounts, prices, or seats.
- Optional quote-level overrides such as `owner_email`, `expires_at`, `status`, display fields, or collection requirements.
If the user gives custom property names instead of slugs, resolve or ask for the slug first. Do not guess.
## Payload
Use one call when the quote should keep the template's subscription configurations. For a template that creates a single subscription, you can also provide subscription custom properties. Trial values apply to plan-based templates.
Minimal quote from template:
```json
{
"customer_id": "cus_xxx",
"template_id": "quot_xxx"
}
```
Quote from a template that creates one subscription, with subscription custom properties:
```json
{
"customer_id": "cus_xxx",
"template_id": "quot_xxx",
"subscription": {
"custom_properties": {
"sales_segment": "enterprise",
"requires_procurement": true,
"renewal_owner": "finance",
"tags": ["strategic"],
"legacy_ref": null
}
}
}
```
Call shape:
```bash
curl -X POST "https://api.hyperline.co/v1/quotes" \
-H "Authorization: Bearer <API key>" \
-H "Content-Type: application/json" \
-d '<payload>'
```
## Subscription overrides
If the user needs subscription overrides such as contract dates, products, phases, coupons, discounts, prices, or seats, create the quote first and inspect the result:
1. Create the quote from the template with `POST /v1/quotes`.
```json
{
"customer_id": "cus_xxx",
"template_id": "quot_xxx"
}
```
2. Read the quote `id`, `warnings`, and every entry in `configurations`. Only when the quote has exactly one configuration with `type: "subscription"` can you update its draft subscription with the `subscription` payload on `PATCH /v1/quotes/{id}`. The example below applies to that case.
For a quote with multiple configurations, this endpoint rejects a `subscription` or `invoice` payload. Edit the individual configurations in the Hyperline quote editor; do not select the first subscription or replace the quote's configurations to work around this restriction. Draft quote subscriptions must not be edited through `PUT /v2/subscriptions/{subscription_id}`.
```json
{
"subscription": {
"custom_properties": {
"sales_segment": "enterprise"
},
"contract_start": "2026-07-08T00:00:00Z",
"phases": [
{
"activation_strategy": "start_date",
"starts_at": "2026-07-08T00:00:00Z",
"end_strategy": "duration",
"duration": {
"period": "months",
"count": 6
},
"billing_date_setting": "phase_start",
"products": [],
"coupons": []
}
]
}
}
```
Do not send `terms`, `comments`, or `contract_clause_ids` in the update unless the user explicitly wants to override template content.
## Behavior
- `template_id` makes Hyperline create the quote from the quote template.
- The quote template creates a separate draft subscription for each linked subscription template with a configuration matching the customer's country and currency, preserving the template's order. A plan-based template creates one draft subscription.
- A subscription template with no matching configuration is skipped. The response includes a `subscription_template_configuration_not_found` warning; other matching configurations are still created.
- On creation, `subscription.custom_properties` applies only to the first created subscription, not every configuration. Use this shortcut only when the template is intended to create a single subscription.
- Provided custom property slugs are updated. Omitted custom properties are left as-is. `null` clears that specific custom property.
- Custom property values belong to the subscription, not the quote.
- For a quote with exactly one subscription configuration, updating the draft quote with a subscription payload replaces that configuration while keeping the quote-level template content created in the first call.
## Do not accidentally replace the template subscription
Keep `subscription` limited to `custom_properties` and, if needed, `trial`.
Never send `subscription.products` or `subscription.phases` together with `template_id` in the initial `POST /v1/quotes` call. Those fields switch the request into custom subscription mode instead of taking the subscription configuration from the template, which can skip template terms, contract clauses, or contract documents.
Other subscription fields are not reliable overrides in pure template mode. If the user needs purchase order, contract dates, products, phases, coupons, discounts, prices, or seats changed, create from the template first, then follow the single-configuration or multiple-configuration path above.
## Quote custom property collection
Do not confuse these fields:
- `subscription.custom_properties`: values to set on the created subscription.
- `collect_custom_property_ids`: quote signature flow asks the customer to fill customer custom properties by ID.
Use `collect_custom_property_ids` only when the user wants the signer to provide customer custom properties during signature.
## Verify
Read subscription IDs from `configurations`; the top-level `subscription_id` is deprecated.
The quote template response's `subscription_template_id` is populated only when exactly one subscription template is linked. A null value does not mean the template will create no subscriptions.
After creation:
1. Read `id`, `warnings`, `configurations`, `terms`, and `attachments` from the quote response. Resolve missing-configuration warnings before finalizing or sending.
2. Inspect every configuration with `type: "subscription"`. Use each non-null `subscription_id` to fetch `GET /v2/subscriptions/{subscription_id}` when checking its subscription values.
3. Confirm the number and order of configurations match the intended proposal, and that any custom properties were applied to the intended subscription.
4. Confirm the quote still has the expected template terms and attachments before finalizing or sending.
Related documentation
Create quote API
See the public API endpoint for creating quotes.
Quote templates
Learn how quote templates work in Hyperline.

