# Notification Templates API

The Notification Templates API provides programmatic access to manage email templates for Access Reviews, Lifecycle Management, and Access Security notifications. Use the API for automation, bulk template management, or integration with existing workflows.

{% hint style="info" %}
**For template customization guidance**: See [Notification Templates](/4yItIzMvkpAvMVFAamTf/administration/administration/notifications/email-templates.md) in the Administration section for concepts, placeholders, and how-to guides.
{% endhint %}

## Overview

The API enables you to:

* Create custom email templates with HTML content and images
* List and retrieve existing templates
* Update template content and attachments
* Test templates before deployment
* Delete templates to revert to defaults

## API endpoints

| Operation       | Method | Endpoint                                                   |
| --------------- | ------ | ---------------------------------------------------------- |
| List templates  | GET    | `/api/preview/notifications/email_templates`               |
| Create template | POST   | `/api/preview/notifications/email_templates`               |
| Get template    | GET    | `/api/preview/notifications/email_templates/{id}`          |
| Update template | PUT    | `/api/preview/notifications/email_templates/{value.id}`    |
| Delete template | DELETE | `/api/preview/notifications/email_templates/{id}`          |
| Test template   | POST   | `/api/preview/notifications/email_templates:test_template` |

See [Notification Templates API Reference](/4yItIzMvkpAvMVFAamTf/developers/api/notification-templates/email-templates-api.md) for complete endpoint documentation, request examples, and response schemas.

## Authentication

These endpoints require an API key with appropriate permissions. See [API Authentication](/4yItIzMvkpAvMVFAamTf/developers/api/authentication.md) for details.

## Template usage types

Each template is associated with a notification event type (`usage`). One custom template can exist per usage type.

### Access Reviews

| Usage Value                                  | Notification Event   |
| -------------------------------------------- | -------------------- |
| `ACCESS_WORKFLOW_STARTED`                    | Review started       |
| `ACCESS_WORKFLOW_COMPLETED`                  | Review completed     |
| `ACCESS_WORKFLOW_REVIEWER_CHANGED`           | Reviewer reassigned  |
| `ACCESS_WORKFLOW_OWNER_CHANGED`              | Owner changed        |
| `ACCESS_WORKFLOW_REMINDER_NO_ACTIVITY`       | No activity reminder |
| `ACCESS_WORKFLOW_REMINDER_DUE`               | Due date reminder    |
| `ACCESS_WORKFLOW_DIGEST_NOTIFICATION`        | Digest summary       |
| `ACCESS_WORKFLOW_REVIEW_ALERT`               | Review alert         |
| `ACCESS_WORKFLOW_ROW_ACCEPTED_AND_SIGNEDOFF` | Row approved         |
| `ACCESS_WORKFLOW_ROW_REJECTED_AND_SIGNEDOFF` | Row rejected         |

### Lifecycle Management

See [LCM Notification Templates](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/policies-workflows/lifecycle-management-notification-templates.md) for usage types.

### Access Security

| Usage Value       | Notification Event   |
| ----------------- | -------------------- |
| `ASSESSMENT_RULE` | Rule-triggered alert |
| `ASSESSMENT_RISK` | Risk notification    |

## Quick start

Create a custom template:

```bash
curl "https://{{VEZA_URL}}/api/preview/notifications/email_templates" \
  -H "Authorization: Bearer $VEZA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "value": {
      "name": "Custom Reminder",
      "subject_template": "Review {{WORKFLOW_NAME}} needs attention",
      "body_template_base64": "<base64-encoded HTML>",
      "usage": "ACCESS_WORKFLOW_REMINDER_DUE"
    }
  }'
```

See [Notification Templates API Reference](/4yItIzMvkpAvMVFAamTf/developers/api/notification-templates/email-templates-api.md) for complete examples.

## Related documentation

* [Notification Templates](/4yItIzMvkpAvMVFAamTf/administration/administration/notifications/email-templates.md) - Template concepts, placeholders, and customization guides
* [Placeholders Reference](/4yItIzMvkpAvMVFAamTf/administration/administration/notifications/email-templates/placeholders-reference.md) - Complete placeholder documentation
* [Customizing Templates](/4yItIzMvkpAvMVFAamTf/administration/administration/notifications/email-templates/customizing-templates.md) - Step-by-step customization guide


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/notification-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
