> 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: eventManagement # Namespace: eventsV3 # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/event-published.md ## Introduction Triggered when an event is published. --- ## REST API ### Schema ``` Webhook: Event Published Description: Triggered when an event is published. 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: EventPublished | description: The event body. - name: timestamp | type: string | description: Event publishing timestamp in ISO UTC format. - name: eventId | type: string | description: Event GUID. - name: status | type: Status | description: Event status. - enum: - UPCOMING: Event is published and scheduled to start. - STARTED: Event has started. - ENDED: Event has ended. - CANCELED: Event is canceled. - DRAFT: Event is not public. - name: derivedFromEventId | type: string | description: Event GUID. Indicates the original event from which the current event was derived from. Can be used to track the original event and add missing information. - name: title | type: string | description: Event title. - name: shortDescription | type: string | description: Short description that appears under the event title. - name: location | type: Location | description: Event location. - name: name | type: string | description: Location name. This value is displayed instead of the address when the location is defined as TBD by setting the `locationTbd` property to `true`. - name: type | type: LocationType | description: Location type. - enum: - VENUE: Event is on-site at a specific physical location. - ONLINE: Event is online, such as a virtual video conference. - name: address | type: Address | description: Exact location address. - ONE-OF: - name: streetAddress | type: StreetAddress | description: Street address. - name: number | type: string | description: Street number. - name: name | type: string | description: Street name. - name: addressLine | type: string | description: Primary address information (street and building number). - name: country | type: string | description: 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). - name: city | type: string | description: City name. - name: postalCode | type: string | description: Zip or postal code. - name: addressLine2 | type: string | description: Secondary address information (suite or apartment number and room number). - name: locationTbd | type: boolean | description: Whether the event location is TBD. - name: dateAndTimeSettings | type: DateAndTimeSettings | description: Event date and time settings. - name: dateAndTimeTbd | type: boolean | description: Whether the event date and time are TBD. - name: dateAndTimeTbdMessage | type: string | description: Message that is displayed when time and date is TBD. **Note:** This field is only used when the `dateAndTimeTbd` field value is `true`. - name: startDate | type: string | description: Event start date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: endDate | type: string | description: Event end date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: hideEndDate | type: boolean | description: Whether the end date is hidden in the formatted date and time. - name: showTimeZone | type: boolean | description: Whether the time zone is displayed in the formatted schedule. - name: recurrenceStatus | type: Status | description: Repeating event status. - enum: - ONE_TIME: Event happens only once and can last multiple days. - RECURRING: A series of events that repeat. - RECURRING_UPCOMING: Next event in a schedule of recurring events. - RECURRING_RECENTLY_ENDED: Latest event that ended in a schedule of recurring events. - RECURRING_RECENTLY_CANCELED: Latest canceled event in a schedule of recurring events - name: recurringEvents | type: Recurrences | description: Event repetitions. - name: individualEventDates | type: array | description: Individual event dates for recurring events. *Note:** Each date must be manually calculated and provided. There is no support for automatic generation using recurrence rules or patterns (for example, "Weekly"). When you create a recurring event: - Each occurrence is created as an independent event with its own unique GUID. - All occurrences in the series share the same `categoryId`, which allows you to identify all events in the recurring series. - To retrieve all events in a recurring series, query events by `recurringEvents.categoryId`. - Each event in the series can be independently updated or deleted using its individual event GUID. - name: startDate | type: string | description: Event start date. - name: endDate | type: string | description: Event end date. - name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. - name: showTimeZone | type: boolean | description: Whether the time zone is displayed in a formatted schedule. - name: categoryId | type: string | description: Recurring event category GUID. This read-only field is automatically generated and shared by all events in a recurring series. Use this GUID to query and retrieve all occurrences of a recurring event. - name: formatted | type: Formatted | description: Formatted date and time settings. - name: dateAndTime | type: string | description: Formatted date and time representation.
Example of formatting when an event lasts multiple days and is in the UTC time zone: `September 1, 2015 at 10:20 AM – September 5, 2015 at 12:14 PM`.
Example of formatting when an event lasts 1 day and is in the GMT+2 time zone: `February 1, 2018, 12:10 – 2:50 PM GMT+2`. - name: startDate | type: string | description: Formatted start date of the event. Empty for TBD schedules. - name: startTime | type: string | description: Formatted start time of the event. Empty for TBD schedules. - name: endDate | type: string | description: Formatted end date of the event. Empty for TBD schedules or when the end date is hidden. - name: endTime | type: string | description: Formatted end time of the event. Empty for TBD schedules or when the end date is hidden. - name: eventPageUrl | type: PageUrl | description: Event page URL components. - name: base | type: string | description: The base URL. For premium sites, the base is the domain. For free sites, the base is the Wix site URL (for example, `https://mysite.wixsite.com/mysite`). - name: path | type: string | description: The path to the page. For example, `/product-page/a-product`. - name: registration | type: Registration | description: RSVP or ticketing registration details. - name: type | type: Type | description: Reflects the current state of the registration. - enum: - RSVP: Guests register by RSVPing to the event. - TICKETING: Guests register by buying tickets. - EXTERNAL: Guests register externally using some other site or platform. - NONE: No registration is required, all guests can attend. This registration type is for only displaying the event details on a site. The property value can be changed from `RSVP` or `TICKETING `to `EXTERNAL` or `NONE` after the event is created, depending on any additional configurations applied to the event. - name: status | type: Status | description: Registration status. - enum: - UNKNOWN_REGISTRATION_STATUS: Registration status isn't applicable. - CLOSED_AUTOMATICALLY: Registration is closed after tickets are sold out. - CLOSED_MANUALLY: Registration is closed when the `registration.registrationDisabled` property is set to `true`. - OPEN_RSVP: Guests can start RSVPing to the event. - OPEN_RSVP_WAITLIST_ONLY: Guest list has reached the maximum, new guests are added to a waitlist. - OPEN_TICKETS: Guests can buy tickets to the event. - OPEN_EXTERNAL: Guests register on a different page or web address. - SCHEDULED_RSVP: Registration via RSVP is scheduled for the future. - name: rsvp | type: RsvpRegistration | description: RSVP registration details. - name: responseType | type: ResponseType | description: Available answers for registration to an event. - enum: - YES_ONLY: Only a **Yes** answer is available to select when RSVP'ing to an event. - YES_AND_NO: *Yes** and **No** answers are available to select when RSVP'ing to an event. - name: limit | type: integer | description: How many guests can RSVP to an event. - name: waitlistEnabled | type: boolean | description: Whether a waitlist is opened when the total guest limit is reached. If `true`, guests can RSVP to an event and are automatically added to the waitlist with the `IN_WAITLIST` status. - name: startDate | type: string | description: Registration start date. - name: endDate | type: string | description: Registration end date. - name: tickets | type: TicketsRegistration | description: Ticket registration details. - name: guestsAssignedSeparately | type: boolean | description: Whether the registration form must be filled out separately for each ticket. - name: ticketLimitPerOrder | type: integer | description: Ticket limit per order.
Default: 20 tickets. - name: currency | type: string | description: Ticket price currency. - name: lowestPrice | type: Money | description: Lowest ticket price. - name: value | type: string | description: Amount of money in decimal form. A period is used as a decimal separator (for example, `3.99`). - name: currency | type: string | description: Currency code in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. - name: formattedValue | type: string | description: Amount of money in decimal form. A period or comma are used as a decimal separator (for example, `1 000,30`). - name: highestPrice | type: Money | description: Highest ticket price. - name: soldOut | type: boolean | description: Whether all tickets are sold for the event. - name: taxSettings | type: TaxSettings | description: How tax is applied. - name: type | type: TaxType | description: Tax application settings. - enum: - INCLUDED_IN_PRICE: Deduct the fee from the ticket price for a seller. For example, if you're selling tickets for $10, a ticket service fee of $0.25 is deducted from the price and you'll get $9.75. - ADDED_AT_CHECKOUT: Show the fee in addition to the ticket price at checkout and a guest pays the fee. For example, if you sell tickets for $10, a customer sees a ticket service fee of $0.25 and pays $10.25 in total. - name: name | type: string | description: Tax name. - name: rate | type: string | description: Tax rate. For example, `21.55`. - name: appliedToDonations | type: boolean | description: Apply tax to donations. - name: reservationDurationInMinutes | type: integer | description: Reservation duration in minutes. - name: external | type: ExternalRegistration | description: External registration details. - name: url | type: string | description: External event registration URL. - name: allowedGuestTypes | type: Type | description: Types of guests allowed to register. - enum: - VISITOR_OR_MEMBER: All site visitors can RSVP to the event. - MEMBER: Only people who have signed up as members of your site are able to RSVP to the event. - name: initialType | type: Type | description: Initial registration type which is set when creating an event. Once set, this value is immutable. To change the type of registration, use the `registration.type` field: - Events with `initialType` of `RSVP` or `TICKETING` can be changed to `EXTERNAL` or `NONE`. - `RSVP` events can't become `TICKETING` events, and vice versa. - enum: - RSVP: Guests register by RSVPing to the event. - TICKETING: Guests register by buying tickets. This property value never changes. - name: registrationPaused | type: boolean | description: Whether the registration is paused. - name: registrationDisabled | type: boolean | description: Whether the registration is disabled. ``` ### Examples ```curl { "id": "0a1d9a4f-0586-49eb-84c2-dfecc82eabf2", "entityFqdn": "wix.events.events.v3.event", "slug": "event_published", "entityId": "178ef33c-d1db-4ed7-916e-e11455067755", "actionEvent": { "bodyAsJson": { "timestamp": "2023-07-13T09:40:00Z", "eventId ": "178ef33c-d1db-4ed7-916e-e11455067755", "status": "STARTED", "derivedFromEventId": "178ef33c-d1db-4ed7-916e-e11455067755" } }, "eventTime": "2023-07-13T09:40:02.043090Z", "triggeredByAnonymizeRequest": false } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onEventPublished Description: Triggered when an event is published. Payload: EventPublishedEnvelope - name: data | type: EventPublished | description: none - name: timestamp | type: Date | description: Event publishing timestamp in ISO UTC format. - name: eventId | type: string | description: Event GUID. - name: status | type: Status | description: Event status. - enum: - UPCOMING: Event is published and scheduled to start. - STARTED: Event has started. - ENDED: Event has ended. - CANCELED: Event is canceled. - DRAFT: Event is not public. - name: derivedFromEventId | type: string | description: Event GUID. Indicates the original event from which the current event was derived from. Can be used to track the original event and add missing information. - name: title | type: string | description: Event title. - name: shortDescription | type: string | description: Short description that appears under the event title. - name: location | type: Location | description: Event location. - name: name | type: string | description: Location name. This value is displayed instead of the address when the location is defined as TBD by setting the `locationTbd` property to `true`. - name: type | type: LocationType | description: Location type. - enum: - VENUE: Event is on-site at a specific physical location. - ONLINE: Event is online, such as a virtual video conference. - name: address | type: Address | description: Exact location address. - name: city | type: string | description: none - name: subdivision | type: string | description: none - name: country | type: string | description: none - name: postalCode | type: string | description: none - name: addressLine1 | type: string | description: none - name: addressLine2 | type: string | description: none - name: locationTbd | type: boolean | description: Whether the event location is TBD. - name: dateAndTimeSettings | type: DateAndTimeSettings | description: Event date and time settings. - name: dateAndTimeTbd | type: boolean | description: Whether the event date and time are TBD. - name: dateAndTimeTbdMessage | type: string | description: Message that is displayed when time and date is TBD. **Note:** This field is only used when the `dateAndTimeTbd` field value is `true`. - name: startDate | type: Date | description: Event start date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: endDate | type: Date | description: Event end date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`. - name: hideEndDate | type: boolean | description: Whether the end date is hidden in the formatted date and time. - name: showTimeZone | type: boolean | description: Whether the time zone is displayed in the formatted schedule. - name: recurrenceStatus | type: Status | description: Repeating event status. - enum: - ONE_TIME: Event happens only once and can last multiple days. - RECURRING: A series of events that repeat. - RECURRING_UPCOMING: Next event in a schedule of recurring events. - RECURRING_RECENTLY_ENDED: Latest event that ended in a schedule of recurring events. - RECURRING_RECENTLY_CANCELED: Latest canceled event in a schedule of recurring events - name: recurringEvents | type: Recurrences | description: Event repetitions. - name: individualEventDates | type: array | description: Individual event dates for recurring events. *Note:** Each date must be manually calculated and provided. There is no support for automatic generation using recurrence rules or patterns (for example, "Weekly"). When you create a recurring event: - Each occurrence is created as an independent event with its own unique GUID. - All occurrences in the series share the same `categoryId`, which allows you to identify all events in the recurring series. - To retrieve all events in a recurring series, query events by `recurringEvents.categoryId`. - Each event in the series can be independently updated or deleted using its individual event GUID. - name: startDate | type: Date | description: Event start date. - name: endDate | type: Date | description: Event end date. - name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. - name: showTimeZone | type: boolean | description: Whether the time zone is displayed in a formatted schedule. - name: categoryId | type: string | description: Recurring event category GUID. This read-only field is automatically generated and shared by all events in a recurring series. Use this GUID to query and retrieve all occurrences of a recurring event. - name: formatted | type: Formatted | description: Formatted date and time settings. - name: dateAndTime | type: string | description: Formatted date and time representation.
Example of formatting when an event lasts multiple days and is in the UTC time zone: `September 1, 2015 at 10:20 AM – September 5, 2015 at 12:14 PM`.
Example of formatting when an event lasts 1 day and is in the GMT+2 time zone: `February 1, 2018, 12:10 – 2:50 PM GMT+2`. - name: startDate | type: string | description: Formatted start date of the event. Empty for TBD schedules. - name: startTime | type: string | description: Formatted start time of the event. Empty for TBD schedules. - name: endDate | type: string | description: Formatted end date of the event. Empty for TBD schedules or when the end date is hidden. - name: endTime | type: string | description: Formatted end time of the event. Empty for TBD schedules or when the end date is hidden. - name: eventPageUrl | type: string | description: Event page URL components. - name: registration | type: Registration | description: RSVP or ticketing registration details. - name: type | type: Type | description: Reflects the current state of the registration. - enum: - RSVP: Guests register by RSVPing to the event. - TICKETING: Guests register by buying tickets. - EXTERNAL: Guests register externally using some other site or platform. - NONE: No registration is required, all guests can attend. This registration type is for only displaying the event details on a site. The property value can be changed from `RSVP` or `TICKETING `to `EXTERNAL` or `NONE` after the event is created, depending on any additional configurations applied to the event. - name: status | type: Status | description: Registration status. - enum: - UNKNOWN_REGISTRATION_STATUS: Registration status isn't applicable. - CLOSED_AUTOMATICALLY: Registration is closed after tickets are sold out. - CLOSED_MANUALLY: Registration is closed when the `registration.registrationDisabled` property is set to `true`. - OPEN_RSVP: Guests can start RSVPing to the event. - OPEN_RSVP_WAITLIST_ONLY: Guest list has reached the maximum, new guests are added to a waitlist. - OPEN_TICKETS: Guests can buy tickets to the event. - OPEN_EXTERNAL: Guests register on a different page or web address. - SCHEDULED_RSVP: Registration via RSVP is scheduled for the future. - name: rsvp | type: RsvpRegistration | description: RSVP registration details. - name: responseType | type: ResponseType | description: Available answers for registration to an event. - enum: - YES_ONLY: Only a **Yes** answer is available to select when RSVP'ing to an event. - YES_AND_NO: *Yes** and **No** answers are available to select when RSVP'ing to an event. - name: limit | type: integer | description: How many guests can RSVP to an event. - name: waitlistEnabled | type: boolean | description: Whether a waitlist is opened when the total guest limit is reached. If `true`, guests can RSVP to an event and are automatically added to the waitlist with the `IN_WAITLIST` status. - name: startDate | type: Date | description: Registration start date. - name: endDate | type: Date | description: Registration end date. - name: tickets | type: TicketsRegistration | description: Ticket registration details. - name: guestsAssignedSeparately | type: boolean | description: Whether the registration form must be filled out separately for each ticket. - name: ticketLimitPerOrder | type: integer | description: Ticket limit per order.
Default: 20 tickets. - name: currency | type: string | description: Ticket price currency. - name: lowestPrice | type: Money | description: Lowest ticket price. - name: value | type: string | description: Amount of money in decimal form. A period is used as a decimal separator (for example, `3.99`). - name: currency | type: string | description: Currency code in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. - name: formattedValue | type: string | description: Amount of money in decimal form. A period or comma are used as a decimal separator (for example, `1 000,30`). - name: highestPrice | type: Money | description: Highest ticket price. - name: soldOut | type: boolean | description: Whether all tickets are sold for the event. - name: taxSettings | type: TaxSettings | description: How tax is applied. - name: type | type: TaxType | description: Tax application settings. - enum: - INCLUDED_IN_PRICE: Deduct the fee from the ticket price for a seller. For example, if you're selling tickets for $10, a ticket service fee of $0.25 is deducted from the price and you'll get $9.75. - ADDED_AT_CHECKOUT: Show the fee in addition to the ticket price at checkout and a guest pays the fee. For example, if you sell tickets for $10, a customer sees a ticket service fee of $0.25 and pays $10.25 in total. - name: name | type: string | description: Tax name. - name: rate | type: string | description: Tax rate. For example, `21.55`. - name: appliedToDonations | type: boolean | description: Apply tax to donations. - name: reservationDurationInMinutes | type: integer | description: Reservation duration in minutes. - name: external | type: ExternalRegistration | description: External registration details. - name: url | type: string | description: External event registration URL. - name: allowedGuestTypes | type: Type | description: Types of guests allowed to register. - enum: - VISITOR_OR_MEMBER: All site visitors can RSVP to the event. - MEMBER: Only people who have signed up as members of your site are able to RSVP to the event. - name: initialType | type: Type | description: Initial registration type which is set when creating an event. Once set, this value is immutable. To change the type of registration, use the `registration.type` field: - Events with `initialType` of `RSVP` or `TICKETING` can be changed to `EXTERNAL` or `NONE`. - `RSVP` events can't become `TICKETING` events, and vice versa. - enum: - RSVP: Guests register by RSVPing to the event. - TICKETING: Guests register by buying tickets. This property value never changes. - name: registrationPaused | type: boolean | description: Whether the registration is paused. - name: registrationDisabled | type: boolean | description: Whether the registration is disabled. - 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 { wixEventsV2 } from '@wix/events'; wixEventsV2.onEventPublished((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { wixEventsV2 } from '@wix/events'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { wixEventsV2, }, }); wixClient.wixEventsV2.onEventPublished((event) => { // handle your event here }); ``` ---