---
updatedAt: 2026-06-16T08:29:57.000Z
agentTools:
  projectIndex: https://loyaltyapi.yotpo.com/llms.txt
---

# Referral Link Share

This event is triggered when a customer shares their referral link to their friends. This is great for telling new customers that someone they know likes your store.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Important Attributes
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        `email`
      </td>

      <td style={{ textAlign: "left" }}>
        The email address of the recipient of the referral link (the friend).
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `customer.first_name`
      </td>

      <td style={{ textAlign: "left" }}>
        The name of the customer who shared their referral link.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `referral_link`
      </td>

      <td style={{ textAlign: "left" }}>
        The URL of the customer’s referral link being shared.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `from`
      </td>

      <td style={{ textAlign: "left" }}>
        The email address of the customer who shared their referral link.
      </td>
    </tr>
  </tbody>
</Table>

```json
{
    "topic": "swell/referral/share",
    "name": "Swell Referral Share",
    "email": "sally.jane@gmail.com",
    "from": "john.smith@gmail.com",
    "customer": {
        "total_spend_cents": 0,
        "total_purchases": 0,
        "perks_redeemed": 4,
        "last_purchase_at": null,
        "email": "john.smith@gmail.com",
        "referred_by": "jane.smith@gmail.com",
        "points_earned": 675,
        "points_balance": 675,
        "points_expire_at": "2027-01-31T23:59:59.000Z",
        "first_name": null,
        "last_name": null,
        "last_seen_at": "2016-10-15T18:43:24.000Z",
        "third_party_id": "4302977345",
        "referral_code": {
            "code": "x09u052",
            "shares": 0,
            "facebook_shares": 0,
            "twitter_shares": 0,
            "email_shares": 0,
            "emails_sent": 0,
            "emails_viewed": 0,
            "links_clicked_from_email": 0,
            "links_clicked_from_twitter": 0,
            "links_clicked_from_facebook": 0,
            "orders": 1,
            "amount_cents": 3000,
            "average_amount_cents": 3000,
            "expires_at": null,
            "expired": false,
            "completed_referral_customers": [{
                "email": "hillary.clinton@gmail.com",
                "first_name": "Hillary",
                "last_name": "Clinton",
                "referral_points_contributed": 0,
                "last_seen_at": "2016-10-15T16:38:20.000Z"
            }],
            "email": "john.smith@gmail.com",
            "unique_clicks": 1,
            "total_clicks": 1
        }
    },
    "referral_link": "http://rwrd.io/x09u052"
}
```

#### `customer.points_expire_at`

Sample payloads above use `"2027-01-31T23:59:59.000Z"` when an expiration date applies (**Last Activity** or **Date Earned** policies); the field is `null` when your policy is **Never expire**.

The date when the customer's points are set to expire. The value depends on your store's **Points expiration policy**:

* **Last Activity** — Returns the calculated expiration date based on the customer's last activity.
* **Date Earned** — Returns the next upcoming expiration date across all point batches.
* **Never expire** — Returns `null`.

For **Date Earned** policies, customers may have multiple point batches with different expiration dates; this field reflects only the closest upcoming expiration.

The same semantics apply to `GET /v1/customers`, `GET /v2/customers`, and `GET /api/v2/customers` (Fetch Customer Details and Fetch All Recently Updated Customers).