# Validate Emails in Strapi: Setup Guide

URL: https://email-validation.org/docs/guides/strapi/
Updated: 2026-12-04

> Documentation index: https://email-validation.org/llms.txt

Check the email addresses saved into your Strapi content before Strapi writes them. A plugin you copy into your Strapi
project checks the attributes you pick on every create and update, from the admin panel, the REST and GraphQL Content
API and your own code, and refuses the addresses whose status you refuse with one neutral message under the field. It
runs on your server only: the key never reaches a browser. Download it:
[email-validation-strapi.zip](https://email-validation.org/downloads/strapi/email-validation-strapi.zip) holds the plugin folder
`email-validation-org/` and the MIT licence.

## What you need

- **Strapi 5**, or **Strapi 4** from 4.26.2 (the first Strapi 4 that runs on Node 22), on **Node 22** or later, in a
  project you can change and restart (Strapi is free to self-host). The plugin has no dependencies of its own.
- An API key of ours from the [API keys page](https://email-validation.org/app/api-keys/) with **Validate addresses** (on by default). The free
  key check below also uses **Read balance and usage** (on by default). It never needs Bulk lists.

## Install

1. Unzip the download and copy the folder `email-validation-org` into your project as
   `src/plugins/email-validation-org/`.
2. Enable it in `config/plugins.js` (or `config/plugins.ts`) and name the attributes it checks, as
   `<content type uid>.<attribute>`:

   ```js
   module.exports = ({ env }) => ({
     'email-validation-org': {
       enabled: true,
       resolve: './src/plugins/email-validation-org',
       config: {
         fields: ['api::lead.lead.email'],
       },
     },
   });
   ```

3. Put the key in the server's environment, for example in the project's `.env`:
   `EMAIL_VALIDATION_ORG_API_KEY=ev_live_…`
4. Restart Strapi. Its log says what the plugin checks, for example
   `[email-validation-org] checking 1 attribute(s) through documents.` on Strapi 5 or `… through lifecycles.` on
   Strapi 4. Without a key the log says that nothing is checked.

With pnpm, also add `@strapi/utils` (your Strapi version) to the app's dependencies: the plugin loads the app's own
copy, so Strapi turns a refusal into its own 400 with the message under the field.

Check the key without spending a credit, in `npm run strapi console`:

```js
await strapi.plugin('email-validation-org').service('account').credits()
```

## Choose the attributes

Only Email, Text and Long text attributes are checked, and only those you pick, in either of two ways:

- In the plugin config, `fields` (above). It also reaches content types you do not edit, for example
  `plugin::users-permissions.user.email` for Users & Permissions sign-ups (on Strapi 4, and on Strapi 5 from 5.49;
  earlier Strapi 5 versions write those users outside the Document Service, so they are not checked).
- In the content type's `schema.json`, on the attribute:

  ```json
  "email": {
    "type": "email",
    "pluginOptions": {
      "email-validation-org": { "check": true, "refuse": "invalid,disposable,catch_all" }
    }
  }
  ```

  The attribute may set its own `refuse` and `"failClosed": true`; without them it uses the plugin's settings.

Strapi refuses to start on a value that cannot be meant (an unknown setting, a status typo, a malformed
`pluginOptions`), and its log warns about a `fields` entry that names no Email, Text or Long text attribute, so a typo
never silently checks nothing.

## Try it free first

Sandbox addresses cost nothing and return the result their name says. In the admin panel, create an entry of a
checked content type with the address `no_mailbox@sandbox.email-validation.org`: the save is refused with the message
under the field. Change it to `accepted@sandbox.email-validation.org` and it saves. That domain receives no mail, so
never use it where Strapi or your site sends mail (a Users & Permissions sign-up with email confirmation, a form that
mails the visitor): test those with an address that receives mail.

## Settings

All under `config` in `config/plugins.js`:

| Setting | Default | |
| --- | --- | --- |
| `apiKey` | none | Better: the environment variable `EMAIL_VALIDATION_ORG_API_KEY`, which wins. |
| `region` | `'us'` | `'eu'`: checked in the EU, with the same key and credits. |
| `refuse` | `['invalid', 'disposable']` | The statuses refused where an attribute does not say otherwise: any of `invalid`, `disposable`, `catch_all`, `unknown`. `valid` is never refused. Empty refuses nothing and spends nothing. |
| `failClosed` | `false` | Refuse the address when the check cannot be made (no key, no credits, our API slow or out of reach). |
| `fields` | `[]` | Attributes checked without `pluginOptions`. |
| `visitorLimit` | `20` | Paid checks one Content API visitor may cause in an hour; `0` turns the limit off. |
| `message` | "This email address cannot be accepted. Please check it or use another one." | The one message every refused address gets. |

See [what each status means](https://email-validation.org/docs/statuses/). An `unknown` whose reason is `timeout` or `internal_error` is our side
failing, so it counts as a check that could not be made, not as an answer.

## What it costs and how it works

- Only a value that looks like an address is sent, and an update is checked only for the checked attributes it
  carries. Each check costs one credit (an `unknown` result is free); the plugin waits at most 8 seconds for it. When
  it cannot be made, the write goes through unless `failClosed` is on.
- An answer (other than `unknown`) is kept for an hour in the Strapi process's memory, under a keyed hash, never the
  address: a save, a second save and a clone of the same address cost one credit. The admin panel sends every
  attribute on each save, so editing another field of an entry later checks its address again (free within the hour).
- **Visitors.** A write through the Content API by a visitor (public, or signed in with Users & Permissions) causes at
  most `visitorLimit` paid checks an hour per visitor (an IPv4 address, or an IPv6 /64); beyond it nothing is sent and
  the write goes through, even with `failClosed`. Admin panel users, API tokens and code without a request (scripts,
  cron jobs, seeds) are not limited. Never put an API token in browser code. Behind a reverse proxy, turn on
  Strapi's `proxy` setting in `config/server` so each visitor's own IP address is seen: on Strapi 4, `proxy: true`;
  on Strapi 5, `proxy: { koa: true }`, and from Strapi 5.52.0 also `maxIpsCount` in that object, set to the number of
  proxies in front of Strapi.
- Strapi's log gets the API's error code and request id only, never an address, an IP address or the key.

Not covered: attributes inside components and dynamic zones; on Strapi 5, writes that bypass the Document Service
(`strapi.db.query(...)`, which some plugins use); on Strapi 4, bulk `createMany` and `updateMany`.

## Remove it

Set `enabled: false` in `config/plugins.js` (or delete its entry and the folder) and restart Strapi, then delete the
key on the [API keys page](https://email-validation.org/app/api-keys/). The plugin stores nothing in your database.

## More on Strapi

- [Strapi email validation integration](https://email-validation.org/integrations/strapi/)
