---
agentTools:
  projectIndex: https://docs.agilite.io/llms.txt
---

# /data

Creates a new Template profile in Agilit-e

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Agilit-e Templates Refactored Test",
    "version": "7"
  },
  "servers": [
    {
      "url": "https://api.agilite.io/templates"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    },
    "schemas": {
      "BadRequest": {
        "properties": {
          "additionalMessages": {
            "description": "List of additional messages that could be returned related to the failed response",
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-ms-summary": "Additional Messages"
          },
          "errorMessage": {
            "description": "Description of error that occurred",
            "type": "string",
            "x-ms-summary": "Error Message"
          },
          "statusCode": {
            "description": "Response code of HTTP request",
            "type": "number",
            "x-ms-summary": "Status Code"
          }
        },
        "type": "object"
      },
      "CRUDResponse": {
        "properties": {
          "data": {
            "properties": {
              "key": {
                "description": "A unique key to identify the Template Profile",
                "type": "string",
                "x-ms-summary": "Template Profile Key"
              },
              "description": {
                "description": "A short description explaining the Template Profile",
                "type": "string",
                "x-ms-summary": "Template Profile Description"
              },
              "groupName": {
                "description": "A short groupName for the Template Profile (used to group profiles together in modules).",
                "type": "string",
                "x-ms-summary": "Template Profile Group Name."
              },
              "isActive": {
                "description": "Marks the profile to be an Active/Inactive Template Profile.",
                "type": "boolean",
                "x-ms-summary": "Is the Template Profile marked as active."
              },
              "templateType": {
                "description": "Sets the type of template for the Template Profile (Email/Standard).",
                "type": "string",
                "x-ms-summary": "The Type of the given Template Profile."
              },
              "mode": {
                "description": "Sets the mode of the Ace editor used to edit a Template Profile's content.",
                "type": "string",
                "x-ms-summary": "Is the mode that the Admin Portal Ace editor uses"
              },
              "data": {
                "description": "Sets the Template Data that is used for the execution API.",
                "type": "string",
                "x-ms-summary": "Is the Template Data that is returned for the execution API"
              },
              "theme": {
                "description": "Sets the theme of the Ace editor used to edit a Template Profile's content.",
                "type": "string",
                "x-ms-summary": "Is the theme that the Admin Portal Ace editor uses"
              },
              "solutions": {
                "description": "Solutions that are applicable to this Template Profile (used to group profiles together across modules).",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "_id": {
            "description": "The MongoDB ID in the database.",
            "type": "string",
            "x-ms-summary": "Template Profile ID."
          },
          "createdBy": {
            "description": "The name of the user that created the Template Profile.",
            "type": "string",
            "x-ms-summary": "User whom Created Template Profile."
          },
          "modifiedBy": {
            "description": "The name of the user that last modified the Template Profile.",
            "type": "string",
            "x-ms-summary": "User whom Modified Template Profile."
          },
          "createdAt": {
            "description": "A timestamp that shows when the Template Profile was created.",
            "type": "string",
            "x-ms-summary": "Template Profile created timestamp."
          },
          "updatedAt": {
            "description": "A timestamp that shows when the Template Profile was last modified.",
            "type": "string",
            "x-ms-summary": "Template Profile last updated timestamp."
          }
        },
        "type": "object"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/data": {
      "post": {
        "tags": [
          "Template CRUD APIs"
        ],
        "summary": "/data",
        "description": "Creates a new Template profile in Agilit-e",
        "operationId": "templates-create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "description": "data.description",
                    "properties": {
                      "isActive": {
                        "type": "boolean",
                        "description": "Set to \"true\" if profile is active and should be retrievable via API"
                      },
                      "key": {
                        "type": "string",
                        "description": "A unique key for your Profile"
                      },
                      "description": {
                        "type": "string",
                        "description": "A detailed description explaining the profile"
                      },
                      "groupName": {
                        "type": "string",
                        "description": "Group together profiles using a Group Name"
                      },
                      "templateType": {
                        "type": "string",
                        "description": "The type of Template (Standard: \"std\" - Email Notification: \"memo\")"
                      },
                      "editorType": {
                        "type": "string",
                        "description": "The Editor Type for the Email Notification Body (Design: \"design\" - Source: \"src\")"
                      },
                      "data": {
                        "type": "string",
                        "description": "The Template data to be stored"
                      },
                      "mode": {
                        "type": "string",
                        "description": "The type of template being created (css/html/javascript/json/plain_text/xml/sql)"
                      },
                      "theme": {
                        "type": "string",
                        "description": "The theme to be used for the Template editor (github/kuroir/monokai/solarized_dark/solarized_light/xcode)"
                      },
                      "sendTo": {
                        "type": "string",
                        "description": "The list of contacts to send the Email Notification to (Separate Using Commas)"
                      },
                      "copyTo": {
                        "type": "string",
                        "description": "The list of contacts to copy the Email Notification to (Separate Using Commas)"
                      },
                      "blindCopyTo": {
                        "type": "string",
                        "description": "The list of contacts to blind copy the Email Notification to (Separate Using Commas)"
                      },
                      "subject": {
                        "type": "string",
                        "description": "The Subject of the Email Notification"
                      }
                    },
                    "required": [
                      "key",
                      "templateType",
                      "data"
                    ],
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CRUDResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-headers": [],
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-enabled": true,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python"
  ],
  "_id": {
    "buffer": {
      "0": 96,
      "1": 91,
      "2": 35,
      "3": 77,
      "4": 132,
      "5": 50,
      "6": 50,
      "7": 0,
      "8": 29,
      "9": 247,
      "10": 248,
      "11": 158
    }
  }
}
```