---
updatedAt: 2026-10-20T09:46:20.000Z
agentTools:
  projectIndex: https://developer.optimove.com/llms.txt
---

# Add Template

Creates a new Optimail template.

### Rate Limit

> ***For Optimove's general API rate limit, see the [Understanding API Rate Limits](https://developer.optimove.com/reference/understanding-api-rate-limits) reference.***

**Sample Request**

```json
{
  "TemplateName":"GIF Lovers",
  "Subject":"Hello GIF Lovers",
  "Html":"&lt!DOCTYPE html&gt<html xmlns="http://www.w3.org/1999/xhtml">
  	<head>
  		<title>GIF with a hard G</title>
    </head>
  	<body style=\"min-height:325px;\">
  		<img src=\"https://d31v04zd2.cloudfront.net/blog/wp-content/uploads/2014/03/loft-unwrap-animation-repeat.gif\" 
  		width=\"100\" height=\"100\" alt=\"GIF with a hard G\" border=\"0\" class=\"fr-dii fr-draggable\" style=\"float:none;\">
  	</body>
  </html>",
  "PlainText":"GIF with a hard G",
  "FromName":"GIF World",
  "ReplyToAddressID":2,
  "FromEmailAddressID":3,
  "FolderID":104176,
  "PreferenceGroupID":128009
}
```

**Sample Response**

```json
{
	"TemplateID":9481
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Optimove API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api4.optimove.net",
      "description": "US Environment"
    },
    {
      "url": "https://api5.optimove.net",
      "description": "EU Environment"
    }
  ],
  "paths": {
    "/Optimail/AddTemplate": {
      "post": {
        "tags": [
          "Optimail"
        ],
        "summary": "Add Template",
        "description": "Creates a new Optimail template.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Optimove.API.Models.OptimailContent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Optimove.API.Models.OptimailContent": {
        "type": "object",
        "properties": {
          "TemplateId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "TemplateName": {
            "type": "string",
            "nullable": true
          },
          "Subject": {
            "type": "string",
            "nullable": true
          },
          "Html": {
            "type": "string",
            "nullable": true
          },
          "PlainText": {
            "type": "string",
            "nullable": true
          },
          "FromName": {
            "type": "string",
            "nullable": true
          },
          "ReplyToAddressId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "FromEmailAddressId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "BrandId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "FolderId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "PreferenceGroupId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "PersonalizationStrategy": {
            "type": "string",
            "nullable": true
          },
          "FixHtml": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "API KEY",
        "name": "X-API-KEY",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}
```