---
agentTools:
  projectIndex: https://octopush-api.readme.io/llms.txt
---

# Create an email template

## Encoding : UTF-8
## Authentication
Your "api-key" and "api-login" identifiers must be added in the headers.
## Definition
This web service allows you to create a reusable email template populated with your landing page content.
## Parameters
| Name | Type | Description |
| -- | --| -- |
| name | string | Template label displayed in your dashboard. |
| page_title | string | Title injected inside the generated HTML `<title>` tag. |
| page_description | string | Text inserted inside the meta description tag. |
| html_content | string | Raw HTML body of your template. |
| css_content | string | Optional CSS styles applied to the HTML content. |
| json_design | string | Optional design payload produced by the landing page builder. |
| unsubscription_mention_language | string | Optional language code for the unsubscribe mention. |
Note: The slug is automatically generated by the system and returned in follow-up landing page queries.
## Server Response Example in JSON
### Success
```
{
  "id": "9f8c6d28-5f4f-4eca-9b82-0d2a6f9a0d02",
  "name" : "landing_page_name_1",
}
```

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Octopush Email API",
    "description": "Octopush Email API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://email-api.octopush.com"
    }
  ],
  "paths": {
    "/v1/public/email-templates": {
      "post": {
        "tags": [
          "Email API"
        ],
        "summary": "Create an email template",
        "description": "\n## Encoding : UTF-8\n## Authentication\nYour \"api-key\" and \"api-login\" identifiers must be added in the headers.\n## Definition\nThis web service allows you to create a reusable email template populated with your landing page content.\n## Parameters\n| Name | Type | Description |\n| -- | --| -- |\n| name | string | Template label displayed in your dashboard. |\n| page_title | string | Title injected inside the generated HTML `<title>` tag. |\n| page_description | string | Text inserted inside the meta description tag. |\n| html_content | string | Raw HTML body of your template. |\n| css_content | string | Optional CSS styles applied to the HTML content. |\n| json_design | string | Optional design payload produced by the landing page builder. |\n| unsubscription_mention_language | string | Optional language code for the unsubscribe mention. |\nNote: The slug is automatically generated by the system and returned in follow-up landing page queries.\n## Server Response Example in JSON\n### Success\n```\n{\n  \"id\": \"9f8c6d28-5f4f-4eca-9b82-0d2a6f9a0d02\",\n  \"name\" : \"landing_page_name_1\",\n}\n```",
        "operationId": "post_email_template_create",
        "parameters": [
          {
            "name": "api-login",
            "in": "header",
            "description": "Your api login from your account",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-key",
            "in": "header",
            "description": "Your api key from your account",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmailTemplateData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email template created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateEmailTemplateResponseData"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateEmailTemplateData": {
        "required": [
          "name",
          "page_title",
          "page_description",
          "html_content"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3
          },
          "page_title": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "page_description": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "html_content": {
            "type": "string"
          },
          "json_design": {
            "type": "string"
          },
          "css_content": {
            "type": "string"
          },
          "unsubscription_mention_language": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateEmailTemplateResponseData": {
        "title": "CreateEmailTemplateResponseData",
        "properties": {
          "id": {
            "type": "string",
            "example": "9f8c6d28-5f4f-4eca-9b82-0d2a6f9a0d02"
          },
          "name": {
            "type": "string",
            "example": "landing_page_name_1"
          }
        },
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 43,
      "2": 14,
      "3": 26,
      "4": 141,
      "5": 164,
      "6": 78,
      "7": 0,
      "8": 61,
      "9": 188,
      "10": 230,
      "11": 145
    }
  }
}
````