---
title: "Create a new absence email template"
method: POST
path: "/absence-email-templates"
tags: ["Absence Email Management"]
---

# Create a new absence email template

`POST /absence-email-templates`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/absence-email-templates`
- Auth: HTTP bearer

Creates a new absence email template with name, subject, body, escalation tier, and active status

## Request body

- object
  - `name` string, required: Template name
  - `subject_template` string, required: Email subject with variable placeholders
  - `body_template` string, required: Email body with variable placeholders
  - `escalation_tier` 'first_warning' | 'first_warning_with_offer' | 'mid_escalation' | 'deferral_offer' | 'forced_deferral', required: Escalation tier this template belongs to
  - `is_active` boolean

## Response `201`

Template created successfully

## Other responses

- `401`: Unauthorized
- `409`: Template with this name already exists
- `422`: Validation failed

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
