Description
Create a private template.
Request
HTTP Method: POST
| Query Parameter | Description |
|---|---|
| name | Name of template. |
| description | Template description. |
| vendor | Vendor name. |
| product | Product name. |
| agent_type | Type of action to create: Agents::EmailAgentAgents::EventTransformationAgentAgents::HTTPRequestAgentAgents::IMAPAgentAgents::LLMAgentAgents::TriggerAgentAgents::WebhookAgentAgents::SendToStoryAgent |
| agent_options | JSON object with action options. |
| action_inputs | Optional Array of input parameters for the template. See action_inputs structure below. |
curl -X POST \
https://<<META.tenant.domain>>/api/v1/admin/templates \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
-d '{
"name": "Test API Name",
"description": "test",
"agent_type": "Agents::EventTransformationAgent",
"vendor": "API",
"product": "API",
"agent_options": {
"mode": "extract",
"matchers": [
{
"path": "{{.text}}",
"regexp": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b",
"to": "email_addresses"
},
{
"path": "{{.text}}",
"regexp": "https?:\\/\\/[\\S]+",
"to": "urls"
}
],
"message": "This is an optional message"
},
"action_inputs": [
{
"name": "input_text",
"type": "TEXT",
"description": "The text to extract from",
"required": true
}
]
}'
Response
A successful request will return the created private template.
Field description
| Parameter | Description |
|---|---|
| id | Template ID. |
| name | Template name. |
| description | Template description. |
| agent_type | Type of action associated with the template. |
| agent_options | Action options. |
| vendor | Vendor name. |
| product | Product name. |
| action_inputs | Optional Array of input parameters for the template. See details below. |
action_inputs structure
Each object in the action_inputs array can have the following fields:
| Field | Description |
|---|---|
| name | Required Input parameter name. |
| type | Required Input type. One of: TEXT, NUMBER, BOOLEAN, DATE, OBJECT, OPTION, CODE, CREDENTIAL. |
| required | Whether the input is required. Defaults to false. Must be true for CREDENTIAL type. |
| description | Optional Description of the input parameter. |
| default_value | Optional Default value for the input. |
| data | Optional Type-specific configuration object. See below. |
The data object varies by type:
Note: The data field is only applicable to OBJECT, OPTION and CODE types. Other types do not use this field.
| Type | data fields |
|---|---|
| OBJECT | json_schema: JSON schema for validation. |
| OPTION | options: Array of option values. multi_select_enabled: Boolean. |
| CODE | code_language: Language for syntax highlighting (e.g., HTML, JSON). |
Type-specific default_value types
| Type | Expected default_value type |
|---|---|
| TEXT | String |
| NUMBER | Integer (or formula string) |
| BOOLEAN | Boolean (or formula string) |
| DATE | String |
| OBJECT | Any valid JSON value |
| OPTION | Array (or formula string) |
| CODE | String |
| CREDENTIAL | Not supported (field must be omitted) |
Formula strings start with = (e.g., =INPUT.name) or \\= for escaped formulas.
CREDENTIAL type restrictions
CREDENTIAL inputs only accept name, type, and required fields. The description, default_value, and data fields are not permitted and will cause a validation error if included.
Validation constraints
The following constraints are enforced when creating a template with action_inputs:
- Maximum of 300 action inputs per template.
- Only one
CREDENTIALinput is allowed per template. - Input names must be unique across all action inputs.
CREDENTIALinputs must haverequiredset totrue.
Sample response
{
"id": 472463921472463921,
"name": "Test API Name",
"description": "test",
"agent_type": "Agents::EventTransformationAgent",
"agent_options": {
"mode": "extract",
"matchers": [
{
"path": "",
"regexp": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b",
"to": "email_addresses"
},
{
"path": "",
"regexp": "https?:\\/\\/[\\S]+",
"to": "urls"
}
],
"message": "This is an optional message"
},
"vendor": "API",
"product": "API",
"action_inputs": [
{
"name": "input_text",
"type": "TEXT",
"description": "The text to extract from",
"required": true
}
]
}