Skill
---
name: create-quote-from-template
description: Create a Hyperline quote from a quote template through the public API. Use when an agent needs to draft or execute a POST /v1/quotes payload with template_id, optionally setting subscription custom properties on the subscription created from the template.
---
# 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 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
Minimal quote from template:
```json
{
"customer_id": "cus_xxx",
"template_id": "quot_xxx"
}
```
Quote from template 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>'
```
## Behavior
- `template_id` makes Hyperline create the quote from the quote template.
- The quote template supplies the subscription configuration from its linked subscription template or plan.
- `subscription.custom_properties` applies values to the draft subscription created from the template.
- 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.
## Do not accidentally replace the template subscription
Keep `subscription` limited to `custom_properties` and, if needed, `trial`.
Do not send `subscription.products` or `subscription.phases` unless the user explicitly wants a custom subscription configuration. Those fields switch the request into custom subscription mode instead of taking the subscription configuration from the template.
Other subscription fields are not reliable overrides in pure template mode. If the user needs purchase order, contract dates, products, phases, or coupons changed, confirm whether they want a custom subscription payload instead.
## 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
After creation:
1. Read `subscription_id` from the quote response.
2. If custom properties were provided, fetch `GET /v2/subscriptions/{subscription_id}`.
3. Confirm `custom_properties` contains the provided slug/value pairs.
Related documentation
Create quote API
See the public API endpoint for creating quotes.
Quote templates
Learn how quote templates work in Hyperline.

