> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Wording API overview

> Set the wording of the emails sent for you, for your whole account or for one organisation, then preview it and send yourself a test.

The Email Wording API sets what the emails sent for you say: the subject, heading, opening paragraph, closing paragraph and button label of each one. Set it once for your account, or for one organisation. Each field falls back on its own: an organisation's wording to your account's, and your account's to the standard wording. Your brand, the statutory content and the links in each email always stay.

All endpoints sit under the `/v1/notification` base path, relative to the environment base URLs documented on the [API reference introduction](/api-reference/introduction). Like the [Administration API](/api-reference/administration/overview), the account comes from your credentials and an organisation from the path; `X-Org-Id` is not used.

## The emails

The `eventType` path parameter names the email:

| `eventType` | The email |
| - | - |
| `PayslipGeneratedEvent` | A payslip is ready |
| `P45GeneratedEvent` | A P45 is ready |
| `P60GeneratedEvent` | A P60 is ready |
| `EmployeePensionEnrolmentEvent` | A pension enrolment letter |
| `ReportReadyEvent` | A report is ready to download |
| `WebhookEndpointFailingEvent` | A webhook endpoint keeps failing |
| `WebhookEndpointDisabledEvent` | A webhook endpoint was switched off |
| `UserInvitedEvent` | An invitation to sign in |
| `EmailVerificationEvent` | A code to verify an email address |
| `PasswordResetEvent` | A password reset |
| `SecurityAlertEvent` | A security alert on their account |

The last four are the sign-in emails people who use the app receive. Their wording is set for the whole account only.

## API structure

* `GET /customer/email-settings` lists every email with your account's wording; `GET /customer/email-settings/{eventType}` returns one, with the standard wording it inherits. Both need account-wide access.
* `PATCH /customer/email-settings/{eventType}` changes your account's wording with a JSON Merge Patch: leave a field out to keep it, send `null` to go back to the inherited wording, send text to change it. Text is plain, with the placeholders the email lists, written `{{like.this}}`.
* `POST /customer/email-settings/{eventType}/previews` returns the wording that would be sent, filled with sample values: send unsaved changes to check them first, or no body to see what is saved. Nothing is saved or sent. `POST /customer/email-settings/{eventType}/test-sends` sends the saved email, with sample values, to your own address only, its subject starting "Test: ". You can send one test a minute.
* Each email says who receives it (`audience`: `Employees`, `AppUsers` or `Administrators`), its `standard` wording, the `placeholders` it may use with a sample value for each, and what it always includes (`locked`).
* `POST /customer/email-settings/{eventType}/rendered-previews` returns the email exactly as it would be sent: the subject, the whole HTML page and the plain-text version, filled with sample values. Send `wording` to preview unsaved changes. Nothing is saved or sent, and you can ask for 30 previews a minute.
* `enabled: false` on a change switches an email off, and `true` switches it back on. Only the emails to administrators can be switched off (`canBeSwitchedOff`): a report is ready, and a webhook endpoint keeps failing or was switched off.
* Every save is kept as a version. `GET /customer/email-settings/{eventType}/revisions` lists them, newest first, with who saved each one. `POST /customer/email-settings/{eventType}/revisions/{revisionId}/restorations` puts one back as a new version.
* The same operations exist for one organisation under `/organisations/{organisationId}/email-settings`, except for the sign-in emails.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.