---
title: "Update an email template"
method: PUT
path: "/marketing/templates/{id}"
tags: ["Admin Marketing: Communications"]
---

# Update an email template

`PUT /marketing/templates/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/templates/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/templates/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update an email template

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `status` 'active' | 'inactive' | 'draft'
  - `content` string

## Response `200`

Template updated; returns the updated detail.

## Other responses

- `400`: Invalid input
- `404`: Template not found.
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
