> 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: programs

# Webhook link: https://dev.wix.com/docs/api-reference/business-management/online-programs/programs/program-archived.md

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

## Introduction

Triggered when a program is archived.

---

## REST API

### Schema

```
Webhook: Program Archived
Description: Triggered when a program is archived.
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: ProgramArchived | description: The event body.
        - name: program | type: Program | description: Snapshot of the program after it was archived.
           - name: id | type: string | description: Program GUID.
           - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current revision must be specified when updating a program.
           - name: createdDate | type: string | description: Date and time the program was created.
           - name: updatedDate | type: string | description: Date and time the program was last updated.
           - name: status | type: Status | description: Current program lifecycle status.
               - enum:
               -     DRAFT: The program is editable and visible only in management contexts.
               -     PUBLISHED: The program is available according to its access restrictions.
               -     ENDED: The program is no longer available for new participation.
               -     ARCHIVED: The program is closed and removed from normal public discovery.
           - name: statusUpdatedDate | type: string | description: Date and time when `status` last changed.
           - name: categoryIds | type: array<string> | description: Category GUIDs assigned to the program. This field is read-only; use the Program Categories API to assign categories.
           - name: description | type: Description | description: Public-facing program title, details, and media.
              - ONE-OF:
                 - name: image | type: Image | description: Program image.
                    - name: id | type: string | description: WixMedia image GUID.
                    - name: url | type: string | description: Image URL.
                    - name: height | type: integer | description: Original image height.
                    - name: width | type: integer | description: Original image width.
                    - name: altText | type: string | description: Image alt text.
                    - name: filename | type: string | description: Image filename.
                 - name: video | type: VideoV2 | description: Program video.
                    - name: id | type: string | description: WixMedia GUID.
                    - name: resolutions | type: array<VideoResolution> | description: Available resolutions for the video, starting with the optimal resolution.
                       - name: url | type: string | description: Video URL.
                       - name: height | type: integer | description: Video height.
                       - name: width | type: integer | description: Video width.
                       - name: format | type: string | description: Video format for example, mp4, hls.
                    - name: filename | type: string | description: Video filename.
              - name: title | type: string | description: Program title.
              - name: details | type: string | description: Detailed program description.
           - name: timeline | type: Timeline | description: Program timeline settings. Use this to configure self-paced or scheduled programs.
              - name: selfPaced | type: boolean | description: Whether participants can progress at their own pace.
              - name: startDate | type: string | description: Local date when the scheduled program starts.
              - name: durationInDays | type: integer | description: Scheduled program duration in days.
           - name: restrictions | type: Restrictions | description: Program access, participation, and progression rules.
              - name: maxParticipants | type: integer | description: Maximum number of active participants allowed in the program.
              - name: hideFutureSteps | type: boolean | description: Whether future steps are hidden from participants until they become available.
              - name: resolveStepsInOrder | type: boolean | description: Whether participants must complete steps in order.
              - name: shareProgress | type: boolean | description: Whether participants can share progress in the connected group.
              - name: accessType | type: AccessType | description: Program discovery and join access. When creating a program, explicitly set this field to `PUBLIC`, `PRIVATE`, or `SECRET` to avoid unintended visibility. If omitted, the access type defaults to `PUBLIC`.
                   - enum:
                   -     PUBLIC: Anyone who can access the site can discover the program and start the join flow.
                   -     PRIVATE: The program can be discovered, but joining requires owner approval.
                   -     SECRET: The program is hidden from public discovery and visible only to participants, owners, and trusted apps.
           - name: price | type: Money | description: Optional one-time payment price for joining the program. When creating or updating a program, provide `price.value` only. `price.currency` is read-only and is populated from the site's payment currency in Site Properties.
              - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99).
              - name: currency | type: string | description: Site payment currency code in ISO 4217 format (for example, `USD`). This field is read-only and is populated from Site Properties. Don't provide it when creating or updating a program.
           - name: seo | type: Seo | description: SEO settings used for the program page.
              - name: slug | type: string | description: Unique URL slug for the program page.
              - name: seoData | type: SeoSchema | description: Advanced SEO schema data.
                 - name: tags | type: array<Tag> | description: SEO tag information.
                    - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  Which of these an API actually accepts depends on where the tag is being set: this list is not a blanket guarantee across every API that reuses this message. Site SEO Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation error even though they appear here — check the field description of the specific `tags`-typed field you're writing to for the types it actually supports and the error it returns.  Limitation: `title` and `script` (e.g. a `script` tag with `props.type` `"application/ld+json"` carrying structured data) are supported only when `custom` is unset or `false`. Setting `custom: true` on a `title` or `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the write through the site's Advanced/Custom Tags list. To write structured data, omit `custom` (or set it to `false`).
                    - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.
                    - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.
                    - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.
                    - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  Setting this to `true` on a write restricts which `type` values are accepted — the same restriction the Advanced/Custom Tags UI enforces. `title` and `script` tags (including JSON-LD structured data) must be sent with `custom` omitted or `false`; sending them with `custom: true` is rejected with `TAG_TYPE_NOT_ALLOWED`.  Note this is a separate restriction from Site SEO Tags' own type restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g. for site-wide structured data) unconditionally. There is currently no way to set site-wide, every-page structured data through any of these APIs — write a per-page `script` tag through the Item SEO Tags API instead.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.
                    - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.
                 - name: settings | type: Settings | description: SEO general settings.
                    - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.   Default: `false` (automatical redirect is enabled).
                    - name: keywords | type: array<Keyword> | description: User-selected keyword terms for a specific page.
                       - name: term | type: string | description: Keyword value.
                       - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword.
                       - name: origin | type: string | description: The source that added the keyword terms to the SEO settings.
              - name: url | type: PageUrl | description: Program page URL.
                 - name: base | type: string | description: The base URL. For premium sites, this is the domain. For free sites, this is the site URL. For example, `mysite.wixsite.com/mysite`.
                 - name: path | type: string | description: The relative path for the page within the site. For example, `/product-page/a-product`.
              - name: imageUrl | type: string | description: Image URL derived from the program description media.
              - name: imageAlt | type: string | description: Alternative text for the SEO image.
              - name: courseWorkload | type: string | description: Approximate SEO program duration in ISO 8601 duration format.
           - name: rewards | type: array<Reward> | description: Rewards assigned to participants when they reach configured milestones.
              - name: trigger | type: Trigger | description: Program milestone that grants the reward. If omitted, the trigger defaults to `JOINED_TO_PROGRAM` for compatibility with existing rewards.
                   - enum:
                   -     JOINED_TO_PROGRAM: Default trigger for existing rewards. The reward is granted when a member joins the program.
                   -     STEP_COMPLETED: The reward is granted when at least one step is completed.
                   -     ALL_STEPS_COMPLETED: The reward is granted when all required steps are completed.
              - name: badgeIds | type: array<string> | description: Badge GUIDs to assign when the reward is granted.
              - name: certificate | type: Certificate | description: Certificate assigned when the reward is granted.
                 - name: id | type: string | description: Certificate GUID. Currently this is the program GUID.
                 - name: connectedDate | type: string | description: Date and time the certificate was connected to the program.
           - name: socialGroupId | type: string | description: GUID of the social group connected to the program, if one exists.
           - name: extendedFields | type: ExtendedFields | description: Custom fields for apps that extend the Program entity.
              - 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: shouldSendInvoice | type: boolean | description: Whether to send an invoice after a single-payment purchase. When false, the buyer receives a payment confirmation email instead.
           - name: videoStepsSettings | type: VideoStepsSettings | description: Settings that control how video steps behave in this program.
              - name: autoNavigate | type: boolean | description: Whether the participant is automatically moved to the next video step after finishing the current one.
              - name: requiredCompletionPercentage | type: number | description: Percentage of a video that must be watched to complete a video step.
           - name: contentSummary | type: ContentSummary | description: Read-only counts of content entities in the program.
              - name: stepCount | type: integer | description: Number of steps in the program.
              - name: sectionCount | type: integer | description: Number of sections in the program.
           - name: ownerUserId | type: string | description: GUID of the site user who created the program.

```

---

## JavaScript SDK

### Schema

```
Webhook: onProgramArchived
Description: Triggered when a program is archived.
Payload: ProgramArchivedEnvelope
  - name: data | type: ProgramArchived | description: none
     - name: program | type: Program | description: Snapshot of the program after it was archived.
        - name: _id | type: string | description: Program GUID.
        - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current revision must be specified when updating a program.
        - name: _createdDate | type: Date | description: Date and time the program was created.
        - name: _updatedDate | type: Date | description: Date and time the program was last updated.
        - name: status | type: Status | description: Current program lifecycle status.
             - enum:
             -     DRAFT: The program is editable and visible only in management contexts.
             -     PUBLISHED: The program is available according to its access restrictions.
             -     ENDED: The program is no longer available for new participation.
             -     ARCHIVED: The program is closed and removed from normal public discovery.
        - name: statusUpdatedDate | type: Date | description: Date and time when `status` last changed.
        - name: categoryIds | type: array<string> | description: Category GUIDs assigned to the program. This field is read-only; use the Program Categories API to assign categories.
        - name: description | type: Description | description: Public-facing program title, details, and media.
           - ONE-OF:
              - name: image | type: string | description: Program image.
              - name: video | type: string | description: Program video.
           - name: title | type: string | description: Program title.
           - name: details | type: string | description: Detailed program description.
        - name: timeline | type: Timeline | description: Program timeline settings. Use this to configure self-paced or scheduled programs.
           - name: selfPaced | type: boolean | description: Whether participants can progress at their own pace.
           - name: startDate | type: string | description: Local date when the scheduled program starts.
           - name: durationInDays | type: integer | description: Scheduled program duration in days.
        - name: restrictions | type: Restrictions | description: Program access, participation, and progression rules.
           - name: maxParticipants | type: integer | description: Maximum number of active participants allowed in the program.
           - name: hideFutureSteps | type: boolean | description: Whether future steps are hidden from participants until they become available.
           - name: resolveStepsInOrder | type: boolean | description: Whether participants must complete steps in order.
           - name: shareProgress | type: boolean | description: Whether participants can share progress in the connected group.
           - name: accessType | type: AccessType | description: Program discovery and join access. When creating a program, explicitly set this field to `PUBLIC`, `PRIVATE`, or `SECRET` to avoid unintended visibility. If omitted, the access type defaults to `PUBLIC`.
                 - enum:
                 -     PUBLIC: Anyone who can access the site can discover the program and start the join flow.
                 -     PRIVATE: The program can be discovered, but joining requires owner approval.
                 -     SECRET: The program is hidden from public discovery and visible only to participants, owners, and trusted apps.
        - name: price | type: Money | description: Optional one-time payment price for joining the program. When creating or updating a program, provide `price.value` only. `price.currency` is read-only and is populated from the site's payment currency in Site Properties.
           - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99).
           - name: currency | type: string | description: Site payment currency code in ISO 4217 format (for example, `USD`). This field is read-only and is populated from Site Properties. Don't provide it when creating or updating a program.
        - name: seo | type: Seo | description: SEO settings used for the program page.
           - name: slug | type: string | description: Unique URL slug for the program page.
           - name: seoData | type: SeoSchema | description: Advanced SEO schema data.
              - name: tags | type: array<Tag> | description: SEO tag information.
                 - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  Which of these an API actually accepts depends on where the tag is being set: this list is not a blanket guarantee across every API that reuses this message. Site SEO Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation error even though they appear here — check the field description of the specific `tags`-typed field you're writing to for the types it actually supports and the error it returns.  Limitation: `title` and `script` (e.g. a `script` tag with `props.type` `"application/ld+json"` carrying structured data) are supported only when `custom` is unset or `false`. Setting `custom: true` on a `title` or `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the write through the site's Advanced/Custom Tags list. To write structured data, omit `custom` (or set it to `false`).
                 - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.
                 - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.
                 - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.
                 - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  Setting this to `true` on a write restricts which `type` values are accepted — the same restriction the Advanced/Custom Tags UI enforces. `title` and `script` tags (including JSON-LD structured data) must be sent with `custom` omitted or `false`; sending them with `custom: true` is rejected with `TAG_TYPE_NOT_ALLOWED`.  Note this is a separate restriction from Site SEO Tags' own type restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g. for site-wide structured data) unconditionally. There is currently no way to set site-wide, every-page structured data through any of these APIs — write a per-page `script` tag through the Item SEO Tags API instead.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.
                 - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.
              - name: settings | type: Settings | description: SEO general settings.
                 - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.   Default: `false` (automatical redirect is enabled).
                 - name: keywords | type: array<Keyword> | description: User-selected keyword terms for a specific page.
                    - name: term | type: string | description: Keyword value.
                    - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword.
                    - name: origin | type: string | description: The source that added the keyword terms to the SEO settings.
           - name: url | type: string | description: Program page URL.
           - name: imageUrl | type: string | description: Image URL derived from the program description media.
           - name: imageAlt | type: string | description: Alternative text for the SEO image.
           - name: courseWorkload | type: string | description: Approximate SEO program duration in ISO 8601 duration format.
        - name: rewards | type: array<Reward> | description: Rewards assigned to participants when they reach configured milestones.
           - name: trigger | type: Trigger | description: Program milestone that grants the reward. If omitted, the trigger defaults to `JOINED_TO_PROGRAM` for compatibility with existing rewards.
                 - enum:
                 -     JOINED_TO_PROGRAM: Default trigger for existing rewards. The reward is granted when a member joins the program.
                 -     STEP_COMPLETED: The reward is granted when at least one step is completed.
                 -     ALL_STEPS_COMPLETED: The reward is granted when all required steps are completed.
           - name: badgeIds | type: array<string> | description: Badge GUIDs to assign when the reward is granted.
           - name: certificate | type: Certificate | description: Certificate assigned when the reward is granted.
              - name: _id | type: string | description: Certificate GUID. Currently this is the program GUID.
              - name: connectedDate | type: Date | description: Date and time the certificate was connected to the program.
        - name: socialGroupId | type: string | description: GUID of the social group connected to the program, if one exists.
        - name: extendedFields | type: ExtendedFields | description: Custom fields for apps that extend the Program entity.
           - 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: shouldSendInvoice | type: boolean | description: Whether to send an invoice after a single-payment purchase. When false, the buyer receives a payment confirmation email instead.
        - name: videoStepsSettings | type: VideoStepsSettings | description: Settings that control how video steps behave in this program.
           - name: autoNavigate | type: boolean | description: Whether the participant is automatically moved to the next video step after finishing the current one.
           - name: requiredCompletionPercentage | type: number | description: Percentage of a video that must be watched to complete a video step.
        - name: contentSummary | type: ContentSummary | description: Read-only counts of content entities in the program.
           - name: stepCount | type: integer | description: Number of steps in the program.
           - name: sectionCount | type: integer | description: Number of sections in the program.
        - name: ownerUserId | type: string | description: GUID of the site user who created the program.
  - 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 { programs } from '@wix/online-programs';

programs.onProgramArchived((event) => {
    // handle your event here
});
```


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

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

wixClient.programs.onProgramArchived((event) => {
    // handle your event here
});
```

---