---
title: "Service: /members/{member}/groups/{group}/mail/preview [POST]"
source: https://dev.pageseeder.com/api/services/preview-mail_post.html
description: "POST endpoint for previewing email output by transforming XML content with XSLT templates. Requires administrator permission and returns formatted email with headers and HTML/text outputs."
last_updated: 2026-09-08T13:59:30+10:00
document_type: api_endpoint
operation_id: mail-POST
resource_id: mail
path_template: /members/{member}/groups/{group}/mail/preview
http_method: POST
api_category: mail
implementation_version: 6.3000
api_since: 5.5003
deprecated_since: null
obsolete_since: null
api_support: experimental
cache_control: N/A
generated_at: 2026-09-02
tokens: ~328
---

# /members/\{member\}/groups/\{group\}/mail/preview \[POST\]

## Description

Preview an Email output.

Transform the XML content provided using the XSLT from the template specified.

> **Note:** XSLT templates are cached internally, specifying `clear-cache=true` clears the cache.

## Parameters

| Name | Description | Required | Type | Default |
| --- | --- | --- | --- | --- |
| content | The XML content to transform | yes | xml |  |
| name | The name of the email template to use | yes | string |  |
| clear-cache | If `true`, the XSLT templates cache is cleared | no | boolean | `false` |
| default | If the template should be loaded from the current group’s style or the default style | no | boolean | `false` |
| subject | The subject of the email if not specified in the XSLT template | no | string | PageSeeder Email |

## Permission

This server requires administrator.

## Response

The XML output has the following format:

```xml
<email-preview>
  <headers>
    <header name="Auto-Submitted" value="auto-generated" />
    <header name="Subject" value="[project-group] New comment created!" />
    ...
  </headers>
  <output format="html">[XHTML output]</output>
  <output format="text">[text output]</output>
</email-preview>
```

## Error Handling

No specific errors expected for this service.

