---
updatedAt: 2026-10-29T15:41:23.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Loyalty Opt Out

Sent when a customer opts out of the loyalty program. Opted-out customers can't take part in any loyalty activity.

To receive it, add `loyalty/opt_out` to `events` when you [create a filter](ref:create-filter), then [subscribe](ref:create-subscription) the filter to your target. Yotpo sends the event to your target URL as a `POST` with this JSON body.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Yotpo Webhooks",
    "description": "Events Yotpo sends to your webhook URL. Each event is an HTTP POST with a JSON body. To receive them, create a webhook target, a filter and a subscription.",
    "version": "3.0"
  },
  "webhooks": {
    "loyalty/opt_out": {
      "post": {
        "operationId": "loyalty-opt-out",
        "summary": "Loyalty Opt Out",
        "description": "Sent when a customer opts out of the loyalty program. Opted-out customers can't take part in any loyalty activity.\n\nTo receive it, add `loyalty/opt_out` to `events` when you [create a filter](ref:create-filter), then [subscribe](ref:create-subscription) the filter to your target. Yotpo sends the event to your target URL as a `POST` with this JSON body.",
        "security": [],
        "parameters": [
          {
            "name": "X-Yotpo-Webhooks-Event-Type",
            "in": "header",
            "required": true,
            "description": "The event name. Matches `topic` in the body.",
            "schema": {
              "type": "string"
            },
            "example": "loyalty/opt_out"
          },
          {
            "$ref": "#/components/parameters/WebhookTenantType"
          },
          {
            "$ref": "#/components/parameters/WebhookTenantId"
          },
          {
            "$ref": "#/components/parameters/WebhookMessageId"
          },
          {
            "$ref": "#/components/parameters/WebhookMessageIdPerTarget"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "description": "The event name, `loyalty/opt_out`.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The display name of the event.",
                    "type": "string"
                  },
                  "website_url": {
                    "description": "Your store's website URL.",
                    "type": "string"
                  },
                  "store_name": {
                    "description": "Your store's name.",
                    "type": "string"
                  },
                  "customer": {
                    "type": "object",
                    "properties": {
                      "total_spend_cents": {
                        "description": "Total spend recorded for the customer, in cents.",
                        "type": "integer"
                      },
                      "total_purchases": {
                        "description": "Number of purchases recorded for the customer.",
                        "type": "integer"
                      },
                      "perks_redeemed": {
                        "description": "Number of rewards the customer has redeemed.",
                        "type": "integer"
                      },
                      "last_purchase_at": {
                        "description": "When the customer's last recorded purchase was made, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "first_name": {
                        "description": "The customer's first name.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "last_name": {
                        "description": "The customer's last name.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "is_member": {
                        "description": "Whether the customer is a loyalty program member.",
                        "type": "boolean"
                      },
                      "accepts_marketing": {
                        "description": "Whether the customer accepts marketing, or `null` when unknown.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "email": {
                        "description": "The customer's email address.",
                        "type": "string"
                      },
                      "points_balance": {
                        "description": "The points the customer can spend now, after this event.",
                        "type": "integer"
                      },
                      "points_earned": {
                        "description": "Total points the customer has earned over their lifetime.",
                        "type": "integer"
                      },
                      "last_seen_at": {
                        "description": "When Yotpo Loyalty last recorded activity for the customer, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "thirty_party_id": {
                        "description": "Legacy misspelled duplicate of `third_party_id`. Use `third_party_id`.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "third_party_id": {
                        "description": "The customer's ID in your e-commerce platform.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "referral_link": {
                        "description": "The customer's personal referral link.",
                        "type": "string"
                      },
                      "referral_discount_code": {
                        "description": "The discount code the customer received for being referred, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "is_opt_in": {
                        "description": "Whether the customer is opted in to the loyalty program following this event trigger. Should be `false`",
                        "type": "boolean"
                      },
                      "loyalty_opt_in_date": {
                        "description": "Date when the customer was opted in to the loyalty program.",
                        "type": "string"
                      },
                      "has_store_account": {
                        "description": "Whether the customer has an account with the ecommerce platform.",
                        "type": "boolean"
                      },
                      "credit_balance": {
                        "description": "Store-credit value of the points balance, formatted in your store currency, for example `$0`.",
                        "type": "string"
                      },
                      "credit_balance_in_customer_currency": {
                        "description": "Store-credit value of the points balance, formatted in the customer's currency.",
                        "type": "string"
                      },
                      "is_affiliate": {
                        "description": "Whether the customer is an affiliate.",
                        "type": "boolean"
                      },
                      "points_expire_at": {
                        "description": "When the customer's points expire, or `null` when they never expire. Follows your **Points expiration policy**: **Last Activity** (counted from the customer's last activity), **Date Earned** (the next upcoming expiration across the customer's point batches) or **Never expire** (`null`).",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "referred_by_customer": {
                        "description": "The email address of the customer who referred this customer, or `null` when there is no referrer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "anniversary_month": {
                        "description": "The customer's anniversary month (1 to 12), or `null` when not set.",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "anniversary_day": {
                        "description": "The day of the month of the customer's anniversary, or `null` when not set.",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "anniversary_year": {
                        "description": "The year of the customer's anniversary, or `null` when not set.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "referral_code": {
                        "$ref": "#/components/schemas/LoyaltyReferralCode",
                        "description": "The customer's referral code and its sharing stats."
                      }
                    },
                    "description": "The customer."
                  },
                  "email": {
                    "description": "The email address of the customer who's opted out.",
                    "type": "string"
                  },
                  "published_at": {
                    "description": "When Yotpo sent the event.",
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "example": {
                "topic": "loyalty/opt_out",
                "name": "Loyalty Opt Out",
                "website_url": "https://example-store.myshopify.com",
                "store_name": "example-store",
                "customer": {
                  "total_spend_cents": 0,
                  "total_purchases": 0,
                  "perks_redeemed": 3,
                  "last_purchase_at": null,
                  "first_name": "Jane",
                  "last_name": "Doe",
                  "is_member": false,
                  "accepts_marketing": false,
                  "email": "jane.doe@example.com",
                  "points_balance": 0,
                  "points_earned": 900,
                  "last_seen_at": "2026-10-25T06:31:56.000Z",
                  "thirty_party_id": null,
                  "third_party_id": null,
                  "referral_link": "http://rwrd.io/EXAMPLE1",
                  "referral_discount_code": "LOYALTYEXAMPLE",
                  "is_opt_in": false,
                  "loyalty_opt_in_date": "0001-01-01T00:00:00.000+00:00",
                  "has_store_account": false,
                  "credit_balance": "$0",
                  "credit_balance_in_customer_currency": "$0",
                  "is_affiliate": false,
                  "points_expire_at": null,
                  "referred_by_customer": null,
                  "anniversary_month": 3,
                  "anniversary_day": 15,
                  "anniversary_year": "",
                  "referral_code": {
                    "code": "EXAMPLE1",
                    "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": 0,
                    "amount_cents": 0,
                    "average_amount_cents": 0,
                    "expires_at": null,
                    "expired": false,
                    "completed_referral_customers": [],
                    "email": "jane.doe@example.com",
                    "unique_clicks": 0,
                    "total_clicks": 0
                  }
                },
                "email": "jane.doe@example.com",
                "published_at": "2026-10-25T06:31:59.452+00:00"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status quickly to acknowledge the event. Without one, Yotpo retries at least 10 times with exponential backoff."
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "WebhookMessageId": {
        "name": "WebhookMessageId",
        "in": "header",
        "required": true,
        "description": "A unique ID for the event.",
        "schema": {
          "type": "string"
        },
        "example": "2f1c7a8e-5b1d-4c39-9a0e-3d7f2b6c1e44"
      },
      "WebhookMessageIdPerTarget": {
        "name": "WebhookMessageIdPerTarget",
        "in": "header",
        "required": true,
        "description": "A unique ID for this delivery to this target. Use it to ignore duplicates.",
        "schema": {
          "type": "string"
        },
        "example": "066c9f28-3e87-45d5-a67e-879d6090d989"
      },
      "WebhookTenantId": {
        "name": "X-Yotpo-Webhooks-Tenant-Id",
        "in": "header",
        "required": true,
        "description": "Your store ID.",
        "schema": {
          "type": "string"
        },
        "example": "YOUR_STORE_ID"
      },
      "WebhookTenantType": {
        "name": "X-Yotpo-Webhooks-Tenant-Type",
        "in": "header",
        "required": true,
        "description": "The kind of account the event belongs to.",
        "schema": {
          "type": "string"
        },
        "example": "store"
      }
    },
    "schemas": {
      "LoyaltyReferralCode": {
        "type": "object",
        "properties": {
          "code": {
            "description": "The referral code.",
            "type": "string"
          },
          "shares": {
            "description": "Total shares.",
            "type": "integer"
          },
          "facebook_shares": {
            "description": "Shares on Facebook.",
            "type": "integer"
          },
          "twitter_shares": {
            "description": "Shares on Twitter.",
            "type": "integer"
          },
          "email_shares": {
            "description": "Shares by email.",
            "type": "integer"
          },
          "emails_sent": {
            "description": "Referral emails sent.",
            "type": "integer"
          },
          "emails_viewed": {
            "description": "Referral emails opened.",
            "type": "integer"
          },
          "links_clicked_from_email": {
            "description": "Link clicks from email.",
            "type": "integer"
          },
          "links_clicked_from_twitter": {
            "description": "Link clicks from Twitter.",
            "type": "integer"
          },
          "links_clicked_from_facebook": {
            "description": "Link clicks from Facebook.",
            "type": "integer"
          },
          "orders": {
            "description": "Orders placed through the referral link.",
            "type": "integer"
          },
          "amount_cents": {
            "description": "Total value of referred orders, in cents.",
            "type": "integer"
          },
          "average_amount_cents": {
            "description": "Average value of referred orders, in cents.",
            "type": "integer"
          },
          "expires_at": {
            "description": "When the code expires, or `null` when it never expires.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expired": {
            "description": "Whether the code has expired.",
            "type": "boolean"
          },
          "completed_referral_customers": {
            "type": "array",
            "description": "The friends who completed a referral with this code.",
            "items": {
              "type": "object"
            }
          },
          "email": {
            "description": "The referring customer's email address.",
            "type": "string"
          },
          "unique_clicks": {
            "description": "Unique link clicks.",
            "type": "integer"
          },
          "total_clicks": {
            "description": "Total link clicks.",
            "type": "integer"
          }
        },
        "description": "A customer's referral code and its sharing stats."
      }
    }
  }
}
```

# Sibling pages

* [Coupon Earned](https://docs.yotpo.com/reference/swell-redemption-created.md)
* [Custom Reward Redeemed](https://docs.yotpo.com/reference/loyalty-custom-reward-created.md)
* [Customer Birthday](https://docs.yotpo.com/reference/swell-customer-birthday.md)
* [Customer Birthday Captured](https://docs.yotpo.com/reference/swell-birthday-captured.md)
* [Customer Anniversary](https://docs.yotpo.com/reference/swell-customer-anniversary.md)
* [Customer Anniversary Captured](https://docs.yotpo.com/reference/swell-anniversary-captured.md)
* [Donation Created](https://docs.yotpo.com/reference/loyalty-donation-created.md)
* [Account Created](https://docs.yotpo.com/reference/swell-account-created.md)
* [Loyalty Opt In](https://docs.yotpo.com/reference/loyalty-opt-in.md)
* [Points Changed](https://docs.yotpo.com/reference/swell-points-changed.md)
* [Points Earned](https://docs.yotpo.com/reference/swell-points-earned.md)
* [Points Reminder](https://docs.yotpo.com/reference/swell-points-reminder.md)
* [Points Expiration Reminder](https://docs.yotpo.com/reference/loyalty-expiration-reminder.md)
* [Redemption Below Threshold](https://docs.yotpo.com/reference/swell-redemption-code-below-threshold.md)
* [Redemption Cancellation Request](https://docs.yotpo.com/reference/swell-point-redemption-cancellation-request.md)
* [Redemption Reminder](https://docs.yotpo.com/reference/swell-redemption-reminder.md)
* [Referral Link Share](https://docs.yotpo.com/reference/swell-referral-share.md)
* [Referral Link Share (2.0)](https://docs.yotpo.com/reference/yotpo-referral-shared.md)
* [Referral Share Reminder](https://docs.yotpo.com/reference/swell-referral-share-reminder.md)
* [Referral Product Share Link](https://docs.yotpo.com/reference/loyalty-referral-product-share.md)
* [Referral Product Share Reminder](https://docs.yotpo.com/reference/loyalty-referral-product-share-reminder.md)
* [Referral Completed](https://docs.yotpo.com/reference/swell-referral-completed.md)
* [Referral Completed (2.0)](https://docs.yotpo.com/reference/yotpo-referral-completed.md)
* [Tier Earned](https://docs.yotpo.com/reference/swell-tier-earned.md)
* [Tier Lost](https://docs.yotpo.com/reference/swell-tier-lost.md)
* [Tier Status Changed](https://docs.yotpo.com/reference/swell-tier-status-changed.md)
* [Tier Expiration Reminder](https://docs.yotpo.com/reference/yotpo-tier-expiration-reminder.md)
* [CommerceCloud Integration Disabled](https://docs.yotpo.com/reference/loyalty-integrations-integration-disabled.md)