API reference
Request templates
Request templates.
Find request templates
GET
List company and system DSR request templates, merged.
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
source |
string | No | Restrict to one source; omit to merge both. |
search |
string | No | Substring match on name; not a content search. |
is_active |
boolean | No | Filter company templates by active state. |
is_deleted |
boolean | No | Return soft-deleted company templates instead of active; system templates are always returned regardless. |
lang |
string | No | Filter by language code. |
system_request_group_id |
integer | No | Templates with empty or matching group IDs. |
page |
integer | No | Page number. |
limit |
integer | No | Number of results per page. |
200List of request templates.application/json
Pagination metadata for list responses.
Show properties
Present only when more pages exist.
Present only when not the first page.
Show properties
Owning company ID; null for system templates.
Group IDs this template applies to.
get/admin/company/request-templates
GET /api/admin/company/request-templates HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200List of request templates.
{
"meta": {
"current_page": 1,
"next_page": 2,
"prev_page": 1
},
"result": [{
"id": 0,
"name": "string",
"description": "string",
"is_active": false,
"lang": "string",
"content": "string",
"company_id": "string",
"system_request_group_ids": [0]
}]
}Create request template
POST
Create a company request template.
Request bodyapplication/json
Template name; unique within the company.
Template body (HTML) with `{{param}}` placeholders.
Template language code.
Group IDs this applies to; empty means all.
200The created request template.application/json
Show properties
Owning company ID; null for system templates.
Group IDs this template applies to.
post/admin/company/request-templates
POST /api/admin/company/request-templates HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "name": "string", "description": "string", "is_active": false, "content": "string", "lang": "string", "system_request_group_ids": [ 0 ] }
200The created request template.
{
"result": {
"id": 0,
"name": "string",
"description": "string",
"is_active": false,
"lang": "string",
"content": "string",
"company_id": "string",
"system_request_group_ids": [0]
}
}Process request template content
POST
Render {{param}} placeholders using the property's params.
Request bodyapplication/json
Raw template content with `{{param}}` placeholders.
Property whose params drive substitution.
Optional request ID for request-scoped params.
200Processed content and params.application/json
Show properties
Rendered content as HTML.
Rendered content before markdown-to-HTML.
Property param set used for substitution.
post/admin/company/request-templates/process-content
POST /api/admin/company/request-templates/process-content HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "content": "string", "property_id": "string", "request_id": "string" }
200Processed content and params.
{
"result": {
"content": "string",
"content_markdown": "string",
"params": {}
}
}Read system request template
GET
Get a read-only system request template by ID.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The system request template ID. |
200The system request template.application/json
Show properties
Owning company ID; null for system templates.
Group IDs this template applies to.
get/admin/company/request-templates/system/{id}
GET /api/admin/company/request-templates/system/{id} HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200The system request template.
{
"result": {
"id": 0,
"name": "string",
"description": "string",
"is_active": false,
"lang": "string",
"content": "string",
"company_id": "string",
"system_request_group_ids": [0]
}
}Read request template
GET
Get a company request template by ID.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The company request template ID. |
200The request template.application/json
Show properties
Owning company ID; null for system templates.
Group IDs this template applies to.
get/admin/company/request-templates/{id}
GET /api/admin/company/request-templates/{id} HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200The request template.
{
"result": {
"id": 0,
"name": "string",
"description": "string",
"is_active": false,
"lang": "string",
"content": "string",
"company_id": "string",
"system_request_group_ids": [0]
}
}Update request template
PUT
Update a company request template. System templates cannot be updated.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The request template ID. |
Request bodyapplication/json
Template name; unique within the company.
Template body (HTML); ignored if empty.
Group IDs this applies to; empty means all.
200Whether anything changed.application/json
Show properties
put/admin/company/request-templates/{id}
PUT /api/admin/company/request-templates/{id} HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "name": "string", "description": "string", "is_active": false, "content": "string", "lang": "string", "system_request_group_ids": [ 0 ] }
200Whether anything changed.
{
"result": {
"changed": false
}
}Delete request template
DELETE
Delete a company template, or block a system template for the company.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The request template ID. |
200Whether a deletion occurred.application/json
Show properties
delete/admin/company/request-templates/{id}
DELETE /api/admin/company/request-templates/{id} HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200Whether a deletion occurred.
{
"result": {
"deleted": false
}
}