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

# Customer Events

> JSON Schemas for the events published when a customer is created, signs up, changes their profile or is deleted.

<Warning>
  **Constraints**

  Member Updated is published once per change, not once per field. `ChangedFields` lists every field the change touched; the rest of the payload is the customer's full state after the change. It is not published when a customer is created or deleted, or when a call changes nothing.

  Member Deleted is published only when the customer is actually deleted. It is the only event a deletion publishes: no Member Updated, and no Loyalty Card Deleted for the customer's loyalty cards, which are removed in the same step. When the mobile app is set up to send deletion requests to your staff instead of deleting straight away, the request publishes nothing; Member Deleted follows once the customer is deleted.

  If a Member Updated payload would exceed the message size limit, `CustomProperties` is sent as `null`, while `ChangedFields` can still list it.

  The `EventId` of Member Updated contains a random part, so a redelivered event carries a new `EventId`. Don't use it alone for idempotent processing. Member Created, Member Signed Up and Member Deleted have a stable `EventId`.
</Warning>

Published when a customer is created, signs up, changes their profile, or is deleted. Customers are called *members* in the API, so payloads carry `MemberId`; every payload also carries `CustomerId`, equal to `MemberId`.

<Tip>
  To keep customer data in sync in your system, subscribe to Member Created, Member Updated and Member Deleted. Member Updated carries the customer's full profile after every change, including `SelectedStoreId`, with the changed fields listed in `ChangedFields`.
</Tip>

## Field reference

Field definitions match the member models used by the Members endpoints. See [Members](/api-reference/loyalty-and-membership/members) in the API Reference.

| Event | Triggering endpoint |
| - | - |
| Member Created | `POST /v1/members` — Creates a new member |
| Member Signed Up | Customer completes the sign-up form |
| Member Updated | `PATCH /v1/members/{memberId}` — Updates member properties |
| Member Deleted | `DELETE /v1/members/{memberId}` — Deletes a member and anonymizes their data |

`POST /v1/members/import` and `POST /v1/members/import/data-import` emit Member Created for new customers and Member Updated for existing ones. On imports, `CreatedAt` and `Timestamp` take the value from the request, and Member Created always has an empty `CustomProperties`.

Member Updated is also emitted by `PUT /v1/members/{memberId}/email`, `/phone`, `/activate` and `/deactivate`, by the mobile app's `PATCH /mobile-app/v1/members`, and by customer edits in the admin portal. The deprecated `PUT` member endpoints emit the same events.

The mobile app's `DELETE /mobile-app/v1/members` and deleting a customer in the admin portal emit the same Member Deleted.

Member Signed Up is emitted on every successful sign-up, including when the customer already existed. The consent events from the same sign-up are published separately and can arrive after it — see [Consent Events](/integration/external-integrations/events/consent-events).

## Schemas

<Tabs>
  <Tab title="Member Created">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "MemberId": { "type": "string" },
        "IsActive": { "type": "boolean" },
        "CreatedAt": { "type": "string", "format": "date-time" },
        "FirstName": { "type": ["string", "null"] },
        "LastName": { "type": ["string", "null"] },
        "Email": { "type": ["string", "null"] },
        "Phone": { "type": ["string", "null"] },
        "Gender": { "type": "string", "enum": ["NotSelected", "Male", "Female", "NotProvided"] },
        "Birthdate": { "type": ["string", "null"], "format": "date-time" },
        "SelectedStoreId": { "type": ["string", "null"] },
        "Address": { "$ref": "#/$defs/address" },
        "Metadata": { "type": ["object", "null"], "additionalProperties": { "type": "string" } },
        "LoyaltyProgram": { "type": ["string", "null"] },
        "IsEmployee": { "type": "boolean" },
        "Nationality": { "type": ["string", "null"] },
        "Deceased": { "type": ["boolean", "null"] },
        "HomeTelephone": { "type": ["string", "null"] },
        "IsMembershipFeePaid": { "type": ["boolean", "null"] },
        "CustomProperties": { "type": "array", "items": { "$ref": "#/$defs/customProperty" } },
        "PersonalId": { "type": ["string", "null"] },
        "Timestamp": { "type": "string", "format": "date-time", "description": "Same value as CreatedAt." },
        "EventId": { "type": "string", "description": "Composed as MemberCreated-{MemberId}." },
        "CustomerId": { "type": "string" }
      },
      "$defs": {
        "address": {
          "type": "object",
          "properties": {
            "ZipCode": { "type": ["string", "null"] },
            "City": { "type": ["string", "null"] },
            "CountryCode": { "type": ["string", "null"] },
            "Region": { "type": ["string", "null"] },
            "AddressLine1": { "type": ["string", "null"] },
            "AddressLine2": { "type": ["string", "null"] }
          }
        },
        "customProperty": {
          "type": "object",
          "properties": {
            "MemberId": { "type": "string" },
            "PropertyId": { "type": "integer" },
            "PropertyName": { "type": ["string", "null"] },
            "DisplayName": { "type": ["string", "null"] },
            "PropertyValue": { "type": ["string", "null"] },
            "PropertyType": { "type": ["string", "null"] }
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Member Signed Up">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "MemberId": { "type": "string", "description": "Id of the customer's login account. For a customer who was imported before signing up, this can differ from the memberId in the Members API." },
        "UserId": { "type": "string" },
        "Timestamp": { "type": "string", "format": "date-time" },
        "OAuthClientId": { "type": "string", "description": "Client id of the app or website the customer signed up from." },
        "EventId": { "type": "string", "description": "Composed as MemberSignedUp-{MemberId}-{UserId}." },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Member Updated">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "MemberId": { "type": "string" },
        "IsActive": { "type": "boolean" },
        "CreatedAt": { "type": "string", "format": "date-time" },
        "UpdatedAt": { "type": "string", "format": "date-time" },
        "FirstName": { "type": ["string", "null"] },
        "LastName": { "type": ["string", "null"] },
        "Email": { "type": ["string", "null"] },
        "Phone": { "type": ["string", "null"] },
        "Gender": { "type": "string", "enum": ["NotSelected", "Male", "Female", "NotProvided"] },
        "Birthdate": { "type": ["string", "null"], "format": "date-time" },
        "SelectedStoreId": { "type": ["string", "null"] },
        "Address": { "$ref": "#/$defs/address" },
        "Metadata": { "type": ["object", "null"], "additionalProperties": { "type": "string" } },
        "LoyaltyProgram": { "type": ["string", "null"] },
        "IsEmployee": { "type": "boolean" },
        "Nationality": { "type": ["string", "null"] },
        "Deceased": { "type": ["boolean", "null"] },
        "HomeTelephone": { "type": ["string", "null"] },
        "IsMembershipFeePaid": { "type": ["boolean", "null"] },
        "LastTransactionTimestamp": { "type": ["string", "null"], "format": "date-time" },
        "CustomProperties": { "type": ["array", "null"], "items": { "$ref": "#/$defs/customProperty" } },
        "PersonalId": { "type": ["string", "null"] },
        "ChangedFields": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": ["FirstName", "LastName", "Email", "Phone", "Gender", "Birthdate", "SelectedStoreId", "Address", "Metadata", "LoyaltyProgram", "IsEmployee", "Nationality", "Deceased", "HomeTelephone", "IsMembershipFeePaid", "LastTransactionTimestamp", "PersonalId", "CreatedAt", "IsActive", "CustomProperties"]
          }
        },
        "Author": { "$ref": "#/$defs/author" },
        "Timestamp": { "type": "string", "format": "date-time", "description": "Same value as UpdatedAt." },
        "EventId": { "type": "string", "description": "Composed as MemberUpdated-{MemberId}-{Timestamp}-{random}." },
        "CustomerId": { "type": "string" }
      },
      "$defs": {
        "address": {
          "type": "object",
          "properties": {
            "ZipCode": { "type": ["string", "null"] },
            "City": { "type": ["string", "null"] },
            "CountryCode": { "type": ["string", "null"] },
            "Region": { "type": ["string", "null"] },
            "AddressLine1": { "type": ["string", "null"] },
            "AddressLine2": { "type": ["string", "null"] }
          }
        },
        "customProperty": {
          "type": "object",
          "properties": {
            "MemberId": { "type": "string" },
            "PropertyId": { "type": "integer" },
            "PropertyName": { "type": ["string", "null"] },
            "DisplayName": { "type": ["string", "null"] },
            "PropertyValue": { "type": ["string", "null"] },
            "PropertyType": { "type": ["string", "null"] }
          }
        },
        "author": {
          "type": "object",
          "description": "Who made the change. Id and FullName are both 'member' when the customer made it or it came from an import.",
          "properties": {
            "Id": { "type": "string" },
            "FullName": { "type": "string" }
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Member Deleted">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "MemberId": { "type": "string" },
        "Reason": { "type": ["string", "null"], "description": "Reason given for the deletion. Null when the customer deleted their own profile in the mobile app." },
        "Author": {
          "type": "object",
          "properties": {
            "Id": { "type": "string" },
            "FullName": { "type": "string" }
          }
        },
        "Timestamp": { "type": "string", "format": "date-time" },
        "EventId": { "type": "string", "description": "Composed as MemberDeleted-{MemberId}." },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.