---
title: Create
url: https://www.tines.com/docs/api/admin/templates/create/
updated: 2026-05-18T15:12:48+00:00
description: Create a private template.
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Tines API](https://www.tines.com/llms.txt) › [Admin](https://www.tines.com/llm/docs/api/admin.md) › [Templates](https://www.tines.com/llm/docs/api/admin/templates.md)*

# Create

*[View on tines.com](https://www.tines.com/docs/api/admin/templates/create/)*

## 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: <br />`Agents::EmailAgent`<br />`Agents::EventTransformationAgent`<br />`Agents::HTTPRequestAgent`<br />`Agents::IMAPAgent`<br />`Agents::LLMAgent`<br />`Agents::TriggerAgent`<br />`Agents::WebhookAgent`<br />`Agents::SendToStoryAgent`<br /> |
| agent_options     | JSON object with action options.                                                                                                                                                                                                                                            |
| team_id           | **Optional** ID of team to which the template belongs.                                                                                                                                                                                                                      |
| folder_id         | **Optional** ID of the folder to place the template in. The folder must be a template folder belonging to the same team as the template.                                                                                                                                    |
| read_access       | **Optional** Control where this template can be used (`TEAM`, `GLOBAL`, `SPECIFIC_TEAMS`). Default: `TEAM` when `team_id` passed, `GLOBAL` otherwise. (`SPECIFIC_TEAMS` is a premium feature. [Reach out to find out more](https://tines.com/contact-support).)             |
| shared_team_slugs | **Optional** List of teams' slugs where this template can be used. Required to set `read_access` to `SPECIFIC_TEAMS`. Default: `[]` (empty array).                                                                                                                          |
| action_inputs     | **Optional** Array of input parameters for the template. See [action_inputs structure](#action-inputs-structure) below.                                                                                                                                                     |

```bash
curl -X POST \
  https://<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.                                                                                                 |
| team_id           | ID of team to which the template belongs.                                                                     |
| folder_id         | ID of the folder containing the template, or `null` if the template is not in a folder.                       |
| read_access       | Control where this template can be used (`TEAM`, `GLOBAL`, `SPECIFIC_TEAMS`).                                 |
| shared_team_slugs | List of teams' slugs where this template can be used when `read_access` is `SPECIFIC_TEAMS`, otherwise empty. |
| 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** `CREDENTIAL` input is allowed per template.
- Input **names must be unique** across all action inputs.
- `CREDENTIAL` inputs must have `required` set to `true`.

### Sample response

```json
{
  "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",
  "team_id": 1,
  "folder_id": 42,
  "read_access": "TEAM",
  "shared_team_slugs": [],
  "action_inputs": [
    {
      "name": "input_text",
      "type": "TEXT",
      "description": "The text to extract from",
      "required": true
    }
  ]
}
```
