---
updatedAt: 2026-04-27T16:09:54.000Z
agentTools:
  projectIndex: https://developer.deputy.com/llms.txt
---

# Create a new Template

Create a new Template.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Deputy V2 API",
    "version": "1.0",
    "description": "\n\nFiltered to publicly-authenticated routes only (APIAuthenticator). Scoped-OAuth routes and internal JWT routes are excluded — see the separate \"Deputy V2 Scoped API\" spec for scoped endpoints."
  },
  "servers": [
    {
      "url": "https://{subdomain}.{region}.deputy.com/api",
      "description": "Deputy tenant",
      "variables": {
        "subdomain": {
          "default": "your-subdomain",
          "description": "Your Deputy tenant subdomain"
        },
        "region": {
          "default": "deputy",
          "enum": [
            "au",
            "eu",
            "na",
            "deputy"
          ],
          "description": "Deputy region: au, eu, na, or deputy (AU default)"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "PayrollExportTemplatesCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/v2modelPayrollExportTemplates"
          }
        },
        "title": "Create Template response"
      },
      "modelTemplateType": {
        "type": "string",
        "enum": [
          "TYPE_UNKNOWN",
          "DEPUTY_TEMPLATE",
          "CUSTOMER_TEMPLATE"
        ],
        "default": "TYPE_UNKNOWN"
      },
      "v2modelPayrollExportTemplates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "title": "Template ID"
          },
          "label": {
            "type": "string",
            "title": "Template label (name)"
          },
          "data": {
            "type": "string",
            "title": "Template data"
          },
          "type": {
            "$ref": "#/components/schemas/modelTemplateType",
            "title": "Template type"
          },
          "scriptId": {
            "type": "integer",
            "format": "int32",
            "title": "Template associated script ID"
          },
          "createdById": {
            "type": "integer",
            "format": "int32",
            "title": "Template creator ID"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp when the Template was created"
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp when the Template was modified"
          }
        },
        "title": "Payroll Export Templates"
      }
    },
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "OAuth"
      }
    }
  },
  "paths": {
    "/management/v2/payroll-export-templates": {
      "post": {
        "summary": "Create a new Template",
        "operationId": "PayrollExportTemplatesV2Controller_create",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayrollExportTemplatesCreateResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Payroll Export Template"
        ],
        "description": "Create a new Template.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v2modelPayrollExportTemplates"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ]
}
```