List templates
Reply templates from Settings, Smart Tools, Templates, with text and usage.
GET https://cotlet.dev/api/v1/edesk/templates
read
Lists the templates your account has, from Settings > Smart Tools > Templates. body is the template text with snippets left as written, for example #order_number# and #tracking_code#, so the agent fills them from get_order. Inactive templates are not returned. Templates are read only here: Cotlet does not create or change them.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Only templates whose name contains this text. |
Request
curl https://cotlet.dev/api/v1/edesk/templates \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("edesk", "list_templates") const result = await cotlet.call('edesk', 'list_templates'); cotlet call edesk list_templates Example response
{
"templates": [
{
"template_id": 512,
"name": "Delivery update",
"subject": null,
"body": "Hi #consumer_firstname#, your order #order_number# was dispatched on #dispatched_on#. Tracking code: #tracking_code#.",
"type": "Consumer"
}
]
}