> 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 # CreateParticipation # Package: calendar # Namespace: ParticipationsService # Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/participations-v3/create-participation.md ## Permission Scopes: Manage Calendars: SCOPE.DC-CALENDAR.MANAGE ## Introduction Creates a `participation` object for a schedule or event. --- ## REST API ### Schema ``` Method: createParticipation Description: Creates a `participation` object for a schedule or event. URL: https://www.wixapis.com/calendar/v3/participations Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: participation, participation.participant, participation.participant.name, participation.partySize Method parameters: param name: idempotencyKey | type: idempotencyKey | description: Idempotency key guaranteeing that you don't create the same `participation` object more than once. param name: participation | type: Participation | description: The `participation` object represents the relationship between a participant and an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md). It includes details about the participant, whether the participation status is confirmed or pending, which app owns the relevant event or schedule, and allows for custom data extensions. | required: true - ONE-OF: - required: true - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. | required: true - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters | required: true - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` | required: true - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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). Return type: CreateParticipationResponse - name: participation | type: Participation | description: Created `participation` object. - ONE-OF: - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: id | type: string | description: Participation GUID. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: appId | type: string | description: GUID of the app that owns the participation `object`. Identical to `appId` of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) that the related [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belongs to. - name: revision | type: string | description: Revision number, which increments by 1 each time the participation is updated. To prevent conflicting changes, the current revision must be passed when updating the participation. Ignored when creating a participation. - name: createdDate | type: string | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: updatedDate | type: string | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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). ``` ### Examples ### Create Participation Creates an event participation. ```curl curl -X POST \ 'https://www.wixapis.com/calendar/v3/participations' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "participation": { "eventId": "130o4ncdcmm8csGKUihodsF8Lnx5vQuUmP9uqeurIYireDpysq5nOxSIMvXKf80QrOXzc09i1GXRepTUj2L01bzmifAqWHwp2pTmmtR3TmHJx7Tv6ODrmgS", "externalId": "c7e4cd82-1d17-49b0-b1df-6e1eaed60a20", "participant": { "contactId": "5f4a86c5-fadf-427e-96e7-d57c14a4f49d", "email": "jane.doe@example.com", "name": "Jane Doe", "phone": "55-555-5555" }, "partySize": 1, "status": "CONFIRMED" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.calendar.ParticipationsService.createParticipation(participation, options) Description: Creates a `participation` object for a schedule or event. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: participation, participation.participant, participation.participant.name, participation.partySize Method parameters: param name: options | type: CreateParticipationOptions none - name: idempotencyKey | type: string | description: Idempotency key guaranteeing that you don't create the same `participation` object more than once. param name: participation | type: Participation | description: The `participation` object represents the relationship between a participant and an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md). It includes details about the participant, whether the participation status is confirmed or pending, which app owns the relevant event or schedule, and allows for custom data extensions. | required: true - ONE-OF: - required: true - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. | required: true - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters | required: true - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` | required: true - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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). Return type: PROMISE - ONE-OF: - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: _id | type: string | description: Participation GUID. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: appId | type: string | description: GUID of the app that owns the participation `object`. Identical to `appId` of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) that the related [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belongs to. - name: revision | type: string | description: Revision number, which increments by 1 each time the participation is updated. To prevent conflicting changes, the current revision must be passed when updating the participation. Ignored when creating a participation. - name: _createdDate | type: Date | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: _updatedDate | type: Date | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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). ``` ### Examples ### createParticipation ```javascript import { participations } from '@wix/calendar'; async function createParticipation(participation,options) { const response = await participations.createParticipation(participation,options); }; ``` ### createParticipation (with elevated permissions) ```javascript import { participations } from '@wix/calendar'; import { auth } from '@wix/essentials'; async function myCreateParticipationMethod(participation,options) { const elevatedCreateParticipation = auth.elevate(participations.createParticipation); const response = await elevatedCreateParticipation(participation,options); } ``` ### createParticipation (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { participations } from '@wix/calendar'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { participations }, // Include the auth strategy and host as relevant }); async function createParticipation(participation,options) { const response = await myWixClient.participations.createParticipation(participation,options); }; ``` ---