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

# Newsletter API Integration

> Configure referee marketing opt-in to automatically send subscriber data to your ESP or API endpoint

## Overview

As part of the referral journey, customers being referred provide their email address before claiming their introductory reward. During this registration, they can opt in to receive marketing emails from you.

Mention Me can send opted-in referees' data directly to:

* **Your API endpoint** — via a configurable HTTP call
* **Supported ESPs** — Ometria or Dotdigital natively; other ESPs via [webhook](/api-reference/webhooks/overview) or the API option

<Note>
  To enable this feature, contact your Client Success Manager.
</Note>

## API Configuration

If you opt for Mention Me to send data directly to your API, a compatible HTTPS endpoint must be available. The following options are configurable:

<ResponseField name="URL" type="string" required>
  HTTPS only.
</ResponseField>

<ResponseField name="Method" type="string" required>
  `POST` or `GET`.
</ResponseField>

<ResponseField name="Payload type" type="string" required>
  `json`, `form_param`, or `multipart`.
</ResponseField>

<ResponseField name="Authentication" type="string">
  Basic auth, no auth, or header-based authentication.
</ResponseField>

<ResponseField name="Parameters" type="string">
  `email`, `locale` (supported in both body and headers).
</ResponseField>

Static parameters and headers can also be added.

## Supported Parameters

The following data is available for each opted-in referee:

<ResponseField name="email" type="string">
  Referee's email address.
</ResponseField>

<ResponseField name="locale" type="string">
  Locale code. Example: `en_GB`
</ResponseField>

<ResponseField name="reward_expiry_date" type="string">
  When the referee's reward expires.
</ResponseField>

<ResponseField name="coupon_code" type="string">
  The coupon code issued to the referee.
</ResponseField>

<ResponseField name="reward" type="string">
  Reward description.
</ResponseField>

<ResponseField name="referrer_firstname" type="string">
  First name of the person who referred them.
</ResponseField>

<ResponseField name="reward_currency" type="string">
  Currency of the reward.
</ResponseField>

<ResponseField name="segment" type="string">
  Customer segment.
</ResponseField>

<ResponseField name="datetime_subscribed" type="string">
  When the referee opted in.
</ResponseField>

<ResponseField name="type" type="string">
  Event type identifier.
</ResponseField>

## Examples

### POST JSON with header authentication

**URL:** `https://example.com`

**Body:**

```json theme={null}
{
    "email": "referee-email@example.com",
    "locale": "en_GB",
    "source": "MentionMe"
}
```

**Headers:**

```
X-auth-token: 123abc-secret-token
```

### GET with basic authentication

**URL:**

```
https://username:password@example.com?email=referee-email%40example.com&locale=en_GB&other-param=example
```
