post
https://api.duodeal.app/api/templates
Creates a new template.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Template title/name |
type | string | Yes | Template type (see below) |
content | string | Yes | Template content (HTML supported) |
subject | string | No | Email subject line (for email templates) |
byDefaultSendDeal | boolean | No | Set as default for sending quotations |
Template Types
| Type | Description |
|---|---|
email | Email template for sending quotations |
notice | Legal notice template |
cgv | Terms and conditions (CGV) template |
Template Variables
Templates support dynamic variables that are replaced when used:
{{quotation.reference}}- Quotation reference number{{customer.firstName}}- Customer first name{{customer.lastName}}- Customer last name{{company.name}}- Your company name- And more depending on context...
Response Fields
| Field | Type | Description |
|---|---|---|
id | integer | Newly created template unique identifier |
title | string | Template title |
type | string | Template type |
content | string | Template content |
subject | string | Email subject |
byDefaultSendDeal | boolean | Default for sending quotations |
createdAt | datetime | Creation timestamp |
updatedAt | datetime | Last update timestamp |
Response
201 Created: Template successfully created400 Bad Request: Invalid request body or validation error401 Unauthorized: Invalid or missing API key
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
201Resource created
400Bad request
401Unauthorized
