> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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: siteProperties

# Namespace: properties

# Webhook link: https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/site-properties-updated.md

# Webhook Permissions Scopes IDs:
Manage Your App: SCOPE.DC.MANAGE-YOUR-APP

## Introduction

Triggered when site properties are updated.

---

## REST API

### Schema

```
Webhook: Site Properties Updated
Description: Triggered when site properties are updated.
Payload: SitePropertiesUpdated
  - name: metasiteId | type: string | description: GUID of the Wix site that has been updated.
  - name: event | type: SitePropertiesEvent | description: Update details.
     - name: version | type: number | description: Version of the site's properties represented by this update.
     - name: fields | type:  | description: Set of properties that were updated - corresponds to the fields in "properties".
     - name: properties | type: Properties | description: Updated properties.
        - name: categories | type: Categories | description: Site categories.
           - name: primary | type: string | description: Primary site category.
           - name: secondary | type: array<string> | description: Secondary site category.
           - name: businessTermId | type: string | description: Business Term Id
        - name: locale | type: Locale | description: Site locale.
           - name: languageCode | type: string | description: Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
           - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
        - name: language | type: string | description: Site language.  Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
        - name: paymentCurrency | type: string | description: Site currency used to bill customers.  Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
        - name: timeZone | type: string | description: Site time zone in IANA time zone database format. For example, `America/New_York`.
        - name: email | type: string | description: Email address.
        - name: phone | type: string | description: Phone number.
        - name: fax | type: string | description: Fax number.
        - name: address | type: Address | description: Address.
           - name: street | type: string | description: Street name.
           - name: city | type: string | description: City name.
           - name: country | type: string | description: Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
           - name: state | type: string | description: State.
           - name: zip | type: string | description: Zip or postal code.
           - name: hint | type: AddressHint | description: Extra information to be displayed in the address.
              - name: text | type: string | description: Extra text displayed next to, or instead of, the actual address.
              - name: placement | type: PlacementType | description: Where the extra text should be displayed.
                     - enum: BEFORE, AFTER, REPLACE
           - name: isPhysical | type: boolean | description: Whether this address represents a physical location.
           - name: googleFormattedAddress | type: string | description: Google-formatted version of this address.
           - name: streetNumber | type: string | description: Street number.
           - name: apartmentNumber | type: string | description: Apartment number.
           - name: coordinates | type: GeoCoordinates | description: Geographic coordinates of location.
              - name: latitude | type: number | description: Latitude of the location. Must be between -90 and 90.
              - name: longitude | type: number | description: Longitude of the location. Must be between -180 and 180.
        - name: siteDisplayName | type: string | description: Site display name.
        - name: businessName | type: string | description: Business name.
        - name: logo | type: string | description: Path to the site's logo in Wix Media (without Wix Media base URL).
        - name: description | type: string | description: Site description.
        - name: businessSchedule | type: BusinessSchedule | description: Business schedule. Regular and exceptional time periods when the business is open or the service is available.  __Note:__ Not supported by Wix Bookings.
           - name: periods | type: array<TimePeriod> | description: Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.
              - name: openDay | type: DayOfWeek | description: Day of the week the period starts on.
                     - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
              - name: openTime | type: string | description: Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents midnight at the end of the specified day.
              - name: closeDay | type: DayOfWeek | description: Day of the week the period ends on.
                     - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
              - name: closeTime | type: string | description: Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents midnight at the end of the specified day.  __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
           - name: specialHourPeriod | type: array<SpecialHourPeriod> | description: Exceptions to the business's regular hours. The business can be open or closed during the exception.
              - name: startDate | type: string | description: Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
              - name: endDate | type: string | description: End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
              - name: isClosed | type: boolean | description: Whether the business is closed (or the service is not available) during the exception.  Default: `true`.
              - name: comment | type: string | description: Additional info about the exception. For example, "We close earlier on New Year's Eve."
        - name: multilingual | type: Multilingual | description: Supported languages of a site and the primary language.
           - name: supportedLanguages | type: array<SupportedLanguage> | description: Supported languages list.
              - name: languageCode | type: string | description: Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
              - name: locale | type: Locale | description: Locale.
              - name: isPrimary | type: boolean | description: Whether the supported language is the primary language for the site.
              - name: countryCode | type: string | description: Language icon.
              - name: resolutionMethod | type: ResolutionMethod | description: How the language will be resolved. For internal use.
                     - enum: QUERY_PARAM, SUBDOMAIN, SUBDIRECTORY
              - name: isVisitorPrimary | type: boolean | description: Whether the supported language is the primary language for site visitors.
           - name: autoRedirect | type: boolean | description: Whether to redirect to user language.
        - name: consentPolicy | type: ConsentPolicy | description: Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it).
           - name: essential | type: boolean | description: Whether the site uses cookies that are essential to site operation. Always `true`.
           - name: functional | type: boolean | description: Whether the site uses cookies that affect site performance and other functional measurements.
           - name: analytics | type: boolean | description: Whether the site uses cookies that collect analytics about how the site is used (in order to improve it).
           - name: advertising | type: boolean | description: Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor.
           - name: dataToThirdParty | type: boolean | description: CCPA compliance flag.
        - name: businessConfig | type: string | description: Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.  Site business type.
        - name: externalSiteUrl | type: string | description: External site URL that uses Wix as its headless business solution.
        - name: trackClicksAnalytics | type: boolean | description: Track clicks analytics.
        - name: companyId | type: string | description: Company GUID issued to the business by local authorities. Appears on invoices and price quotes.

```

### Examples


```curl
{
  "metasiteId": "884aa31e-c73e-40c7-94b2-c67db9f0ee5c",
  "event": {
    "version": "12",
    "fields": {
      "paths": ["locale", "language", "paymentCurrency", "timeZone"]
    },
    "properties": {
      "locale": {
        "languageCode": "en",
        "country": "US"
      },
      "language": "en",
      "paymentCurrency": "USD",
      "timeZone": "America/New_York"
    }
  }
}
```

---

## JavaScript SDK

### Schema

```
Webhook: onPropertiesSitePropertiesUpdated
Description: Triggered when site properties are updated.
Payload: PropertiesSitePropertiesUpdatedEnvelope
  - name: data | type: SitePropertiesUpdated | description: none
     - name: metasiteId | type: string | description: GUID of the Wix site that has been updated.
     - name: event | type: SitePropertiesEvent | description: Update details.
        - name: version | type: number | description: Version of the site's properties represented by this update.
        - name: fields | type: array<string> | description: Set of properties that were updated - corresponds to the fields in "properties".
        - name: properties | type: Properties | description: Updated properties.
           - name: categories | type: Categories | description: Site categories.
              - name: primary | type: string | description: Primary site category.
              - name: secondary | type: array<string> | description: Secondary site category.
              - name: businessTermId | type: string | description: Business Term Id
           - name: locale | type: Locale | description: Site locale.
              - name: languageCode | type: string | description: Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
              - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
           - name: language | type: string | description: Site language.  Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
           - name: paymentCurrency | type: string | description: Site currency used to bill customers.  Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
           - name: timeZone | type: string | description: Site time zone in IANA time zone database format. For example, `America/New_York`.
           - name: email | type: string | description: Email address.
           - name: phone | type: string | description: Phone number.
           - name: fax | type: string | description: Fax number.
           - name: address | type: Address | description: Address.
              - name: street | type: string | description: Street name.
              - name: city | type: string | description: City name.
              - name: country | type: string | description: Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
              - name: state | type: string | description: State.
              - name: zip | type: string | description: Zip or postal code.
              - name: hint | type: AddressHint | description: Extra information to be displayed in the address.
                 - name: text | type: string | description: Extra text displayed next to, or instead of, the actual address.
                 - name: placement | type: PlacementType | description: Where the extra text should be displayed.
                         - enum: BEFORE, AFTER, REPLACE
              - name: isPhysical | type: boolean | description: Whether this address represents a physical location.
              - name: googleFormattedAddress | type: string | description: Google-formatted version of this address.
              - name: streetNumber | type: string | description: Street number.
              - name: apartmentNumber | type: string | description: Apartment number.
              - name: coordinates | type: GeoCoordinates | description: Geographic coordinates of location.
                 - name: latitude | type: number | description: Latitude of the location. Must be between -90 and 90.
                 - name: longitude | type: number | description: Longitude of the location. Must be between -180 and 180.
           - name: siteDisplayName | type: string | description: Site display name.
           - name: businessName | type: string | description: Business name.
           - name: logo | type: string | description: Path to the site's logo in Wix Media (without Wix Media base URL).
           - name: description | type: string | description: Site description.
           - name: businessSchedule | type: BusinessSchedule | description: Business schedule. Regular and exceptional time periods when the business is open or the service is available.  __Note:__ Not supported by Wix Bookings.
              - name: periods | type: array<TimePeriod> | description: Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.
                 - name: openDay | type: DayOfWeek | description: Day of the week the period starts on.
                         - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
                 - name: openTime | type: string | description: Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents midnight at the end of the specified day.
                 - name: closeDay | type: DayOfWeek | description: Day of the week the period ends on.
                         - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
                 - name: closeTime | type: string | description: Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents midnight at the end of the specified day.  __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
              - name: specialHourPeriod | type: array<SpecialHourPeriod> | description: Exceptions to the business's regular hours. The business can be open or closed during the exception.
                 - name: startDate | type: string | description: Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
                 - name: endDate | type: string | description: End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
                 - name: isClosed | type: boolean | description: Whether the business is closed (or the service is not available) during the exception.  Default: `true`.
                 - name: comment | type: string | description: Additional info about the exception. For example, "We close earlier on New Year's Eve."
           - name: multilingual | type: Multilingual | description: Supported languages of a site and the primary language.
              - name: supportedLanguages | type: array<SupportedLanguage> | description: Supported languages list.
                 - name: languageCode | type: string | description: Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
                 - name: locale | type: Locale | description: Locale.
                 - name: isPrimary | type: boolean | description: Whether the supported language is the primary language for the site.
                 - name: countryCode | type: string | description: Language icon.
                 - name: resolutionMethod | type: ResolutionMethod | description: How the language will be resolved. For internal use.
                         - enum: QUERY_PARAM, SUBDOMAIN, SUBDIRECTORY
                 - name: isVisitorPrimary | type: boolean | description: Whether the supported language is the primary language for site visitors.
              - name: autoRedirect | type: boolean | description: Whether to redirect to user language.
           - name: consentPolicy | type: ConsentPolicy | description: Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it).
              - name: essential | type: boolean | description: Whether the site uses cookies that are essential to site operation. Always `true`.
              - name: functional | type: boolean | description: Whether the site uses cookies that affect site performance and other functional measurements.
              - name: analytics | type: boolean | description: Whether the site uses cookies that collect analytics about how the site is used (in order to improve it).
              - name: advertising | type: boolean | description: Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor.
              - name: dataToThirdParty | type: boolean | description: CCPA compliance flag.
           - name: businessConfig | type: string | description: Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.  Site business type.
           - name: externalSiteUrl | type: string | description: External site URL that uses Wix as its headless business solution.
           - name: trackClicksAnalytics | type: boolean | description: Track clicks analytics.
           - name: companyId | type: string | description: Company GUID issued to the business by local authorities. Appears on invoices and price quotes.
  - name: metadata | type: BaseEventMetadata | 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.

```

### Examples


```javascript
import { siteProperties } from '@wix/business-tools';

siteProperties.onPropertiesSitePropertiesUpdated((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { siteProperties } from '@wix/business-tools';

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

wixClient.siteProperties.onPropertiesSitePropertiesUpdated((event) => {
    // handle your event here
});
```

---