> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Package: onlinePrograms

# Namespace: participants

# Webhook link: https://dev.wix.com/docs/api-reference/business-management/online-programs/participants/participant-removed.md

# Webhook Permissions Scopes IDs:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Triggered when an administrator removes a participant from a program.

---

## REST API

### Schema

```
Webhook: Participant Removed
Description: Triggered when an administrator removes a participant from a program.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: actionEvent | type: object | description: Custom action event details.
    - name: body | type: ParticipantRemoved | description: The event body.
        - name: participantId | type: string | description: GUID of the participant who was removed.
        - name: programId | type: string | description: GUID of the program from which the participant was removed.
        - name: memberId | type: string | description: Member GUID of the participant who was removed.
        - name: participant | type: Participant | description: Snapshot of the participant after being removed from the program.
           - name: id | type: string | description: Participant GUID.
           - name: revision | type: string | description: Revision number, which increments by 1 each time the participant is updated. To prevent conflicting changes, the current revision must be specified when updating the participant.  Ignored when creating a participant.
           - name: createdDate | type: string | description: Date and time the participant was created.
           - name: updatedDate | type: string | description: Date and time the participant was updated.
           - name: memberId | type: string | description: Member GUID of the participant on the site.
           - name: programId | type: string | description: GUID of the program the participant is enrolled in.
           - name: progress | type: Progress | description: Program completion progress. This field is conditional and must be explicitly requested using the `fields` parameter.
              - name: totalStepsCompleted | type: integer | description: Number of program steps completed by member.
              - name: totalStepsAvailable | type: integer | description: Total number of program steps available to resolve.
              - name: completionPercentage | type: number | description: Participant's completion percentage. For participants who completed the program, this is `100.0`. Otherwise, it's calculated as (`totalStepsCompleted` / `totalStepsAvailable`) * 100, capped at `100`, and rounded to 1 decimal place.
           - name: certificateInfo | type: CertificateInfo | description: Information about the participant's certificate.  Returned only when a certificate has been issued to the participant.
              - name: issueDate | type: string | description: Date when the certificate was issued (UTC).
           - name: member | type: Member | description: Snapshot of the site member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.
              - name: firstName | type: string | description: First name of the site member.  Returned only when the member has provided it in their profile.
              - name: lastName | type: string | description: Last name of the site member.  Returned only when the member has provided it in their profile.
              - name: email | type: string | description: Email of the site member.  Returned only when the member has provided it in their profile.
              - name: contactId | type: string | description: Contact GUID for accessing additional member information with the Contacts API, such as phone numbers, addresses, and custom fields.  Returned only when the member has provided this information in their profile.
              - name: nickname | type: string | description: Member nickname.  Returned only when the member has provided it in their profile.
              - name: profileImageUrl | type: string | description: Profile image URL of the site member.
           - name: lastActivityDate | type: string | description: Last activity date of the participant in the program (can either be status change or step resolution).
           - name: enrollmentStatus | type: EnrollmentStatus | description: Participant's enrollment status in the program.
               - enum:
               -     JOINED: Participant is actively enrolled in the program.
               -     SUSPENDED: Enrollment temporarily suspended due to payment issues.
               -     AUTO_REMOVED: Automatically removed via a Wix Automations workflow.
               -     REMOVED: Removed from the program by the site owner.
               -     LEFT: Participant voluntarily left the program.
           - name: progressStatus | type: ProgressStatus | description: Participant's progress status in the program.
               - enum:
               -     NOT_STARTED: Enrolled but no steps completed yet.
               -     IN_PROGRESS: At least one step completed but program not yet finished.
               -     COMPLETED: Participant successfully completed the program.
               -     FAILED: Participant failed to complete the program within the deadline.
               -     NOT_APPLICABLE: Progress tracking isn't applicable because the participant left, was removed, or was auto-removed.
           - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program.
              - ONE-OF:
                 - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.
                    - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.
                    - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.
                 - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.
                    - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.
                 - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.
                    - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.
              - name: timeZone | type: string | description: Time zone of the site when the participant was enrolled in the program, in IANA timezone format (e.g., "America/New_York").
              - name: startDate | type: string | description: Date when the participant's program timeline begins, in `YYYY-MM-DD` format. If the program's `timeline.startDate` is set, this is that date. Otherwise, it's the local calendar date when the participant is created, based on the site's time zone.
              - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program.
                   - enum:
                   -     FREE: Member joined a program that is configured as free to join, with no payment required.
                   -     ADDED_MANUALLY: Member was added to the program by site owner.
                   -     SINGLE_PAYMENT: Member paid once to join the program.
                   -     PAID_PLAN: Member joined using a Pricing Plan.
                   -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
              - name: deadline | type: string | description: Date by which the participant must complete the program, in `YYYY-MM-DD` format.  Returned only when the program has a fixed end date, or a duration-based deadline calculated from the participant's start date.
           - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.
              - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
           - name: tags | type: Tags | description: Tags for categorizing and organizing participants.
              - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.
                 - name: tagIds | type: array<string> | description: List of tag GUIDs.
              - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.

```

---

## JavaScript SDK

### Schema

```
Webhook: onParticipantRemoved
Description: Triggered when an administrator removes a participant from a program.
Payload: ParticipantRemovedEnvelope
  - name: data | type: ParticipantRemoved | description: none
     - name: participantId | type: string | description: GUID of the participant who was removed.
     - name: programId | type: string | description: GUID of the program from which the participant was removed.
     - name: memberId | type: string | description: Member GUID of the participant who was removed.
     - name: participant | type: Participant | description: Snapshot of the participant after being removed from the program.
        - name: _id | type: string | description: Participant GUID.
        - name: revision | type: string | description: Revision number, which increments by 1 each time the participant is updated. To prevent conflicting changes, the current revision must be specified when updating the participant.  Ignored when creating a participant.
        - name: _createdDate | type: Date | description: Date and time the participant was created.
        - name: _updatedDate | type: Date | description: Date and time the participant was updated.
        - name: memberId | type: string | description: Member GUID of the participant on the site.
        - name: programId | type: string | description: GUID of the program the participant is enrolled in.
        - name: progress | type: Progress | description: Program completion progress. This field is conditional and must be explicitly requested using the `fields` parameter.
           - name: totalStepsCompleted | type: integer | description: Number of program steps completed by member.
           - name: totalStepsAvailable | type: integer | description: Total number of program steps available to resolve.
           - name: completionPercentage | type: number | description: Participant's completion percentage. For participants who completed the program, this is `100.0`. Otherwise, it's calculated as (`totalStepsCompleted` / `totalStepsAvailable`) * 100, capped at `100`, and rounded to 1 decimal place.
        - name: certificateInfo | type: CertificateInfo | description: Information about the participant's certificate.  Returned only when a certificate has been issued to the participant.
           - name: issueDate | type: Date | description: Date when the certificate was issued (UTC).
        - name: member | type: Member | description: Snapshot of the site member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.
           - name: firstName | type: string | description: First name of the site member.  Returned only when the member has provided it in their profile.
           - name: lastName | type: string | description: Last name of the site member.  Returned only when the member has provided it in their profile.
           - name: email | type: string | description: Email of the site member.  Returned only when the member has provided it in their profile.
           - name: contactId | type: string | description: Contact GUID for accessing additional member information with the Contacts API, such as phone numbers, addresses, and custom fields.  Returned only when the member has provided this information in their profile.
           - name: nickname | type: string | description: Member nickname.  Returned only when the member has provided it in their profile.
           - name: profileImageUrl | type: string | description: Profile image URL of the site member.
        - name: lastActivityDate | type: Date | description: Last activity date of the participant in the program (can either be status change or step resolution).
        - name: enrollmentStatus | type: EnrollmentStatus | description: Participant's enrollment status in the program.
             - enum:
             -     JOINED: Participant is actively enrolled in the program.
             -     SUSPENDED: Enrollment temporarily suspended due to payment issues.
             -     AUTO_REMOVED: Automatically removed via a Wix Automations workflow.
             -     REMOVED: Removed from the program by the site owner.
             -     LEFT: Participant voluntarily left the program.
        - name: progressStatus | type: ProgressStatus | description: Participant's progress status in the program.
             - enum:
             -     NOT_STARTED: Enrolled but no steps completed yet.
             -     IN_PROGRESS: At least one step completed but program not yet finished.
             -     COMPLETED: Participant successfully completed the program.
             -     FAILED: Participant failed to complete the program within the deadline.
             -     NOT_APPLICABLE: Progress tracking isn't applicable because the participant left, was removed, or was auto-removed.
        - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program.
           - ONE-OF:
              - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.
                 - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.
                 - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.
              - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.
                 - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.
              - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.
                 - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.
           - name: timeZone | type: string | description: Time zone of the site when the participant was enrolled in the program, in IANA timezone format (e.g., "America/New_York").
           - name: startDate | type: string | description: Date when the participant's program timeline begins, in `YYYY-MM-DD` format. If the program's `timeline.startDate` is set, this is that date. Otherwise, it's the local calendar date when the participant is created, based on the site's time zone.
           - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program.
                 - enum:
                 -     FREE: Member joined a program that is configured as free to join, with no payment required.
                 -     ADDED_MANUALLY: Member was added to the program by site owner.
                 -     SINGLE_PAYMENT: Member paid once to join the program.
                 -     PAID_PLAN: Member joined using a Pricing Plan.
                 -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
           - name: deadline | type: string | description: Date by which the participant must complete the program, in `YYYY-MM-DD` format.  Returned only when the program has a fixed end date, or a duration-based deadline calculated from the participant's start date.
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
        - name: tags | type: Tags | description: Tags for categorizing and organizing participants.
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.
              - name: tagIds | type: array<string> | description: List of tag GUIDs.
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { participants } from '@wix/online-programs';

participants.onParticipantRemoved((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { participants } from '@wix/online-programs';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      participants,
    },
});

wixClient.participants.onParticipantRemoved((event) => {
    // handle your event here
});
```

---