# Email Unsubscribe Page

Every email campaign needs an unsubscribe option.

Netmera supports two setups. You can also support category-based opt-out.

### Choose your model

#### Global unsubscribe (one-click opt-out)

Use this when any unsubscribe should stop all campaign emails.

#### Category-based unsubscribe (preference management)

Use this when you want per-topic opt-out. This requires [Message Categories](https://user.netmera.com/netmera-user-guide/panel-settings/netmera-panel-settings/message-categories).

{% hint style="info" %}
If Message Categories are enabled, send `categoryIds`. Otherwise, the unsubscribe acts as a global opt-out.
{% endhint %}

### Option 1: Netmera-hosted unsubscribe page

This is the fastest setup. You only add a link to your email template.

#### Global unsubscribe link

```
https://cdn.netmera-web.com/unsubscribe/?appkey=@{appkey}&userid=@{email}&campaignId=@{campaignId}
```

#### Category-based unsubscribe link

```
https://cdn.netmera-web.com/unsubscribe/?appkey=@{appkey}&userid=@{email}&campaignId=@{campaignId}&categoryIds=@{ctgid}
```

Parameters:

* `appkey`: your Netmera application key.
* `userid`: your user identifier (commonly the email address).
* `campaignId`: the email campaign ID.
* `categoryIds`: one or more category IDs to unsubscribe from.

#### See who unsubscribed

1. Go to **Panel > Campaigns**.
2. Open a completed email campaign.
3. See [email-reports](https://user.netmera.com/netmera-user-guide/omnichannel-engagement/email/email-reports "mention"),
4. Or search the **Email Unsubscribe** event on Event Insight&#x20;

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FOZFZUbOzCQsRuZN1ZSYz%2FScreenshot%202025-09-18%20at%2014.54.48.png?alt=media&#x26;token=f80279b6-e3da-4422-9ac6-775c6e037289" alt="" width="563"><figcaption><p>Netmera-hosted Unsubscribe Page</p></figcaption></figure>

### Option 2: Custom unsubscribe page (you host)

Use this when you want full branding control. You still report the opt-out back to Netmera.

#### How it works

1. Put your own unsubscribe URL in the email template.
2. When the user confirms, call Netmera’s unsubscribe endpoint.
3. Optionally collect and send an unsubscribe reason.

#### Endpoint

Send a `POST` request when the user unsubscribes:

```
https://report.netmera.com/reporter/email-unsubscribe/{appKey}/{userId}/{campaignId}/{reason}
```

* `appKey`: required.
* `userId`: required. Usually the email address.
* `campaignId`: required.
* `reason`: optional. Free text or a short code.

{% hint style="info" %}
If you send a reason, it also appears in reporting under the email unsubscribe event. This helps you analyze opt-out drivers.
{% endhint %}

### Category-based unsubscribe (custom page)

Add `categoryIds` as a repeatable query parameter. Send multiple IDs by repeating the key.

```
POST https://report.netmera.com/reporter/email-unsubscribe/{appKey}/{userId}/{campaignId}/{reason}?categoryIds=1&categoryIds=2&categoryIds=
```

* `appKey`: required.
* `userId`: required. Usually the email address.
* `campaignId`: required.
* `reason`: optional. Free text or a short code.
* `categoryIds` is handled as a list of integers.
* Keep using your own page link in templates for this flow.
