> 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

# 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.  | validation: format GUID
   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.  | validation: format GUID, immutable
     - 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.  | validation: minLength 36, maxLength 250, immutable
        - name: externalId | type: string | description: External GUID.  | validation: format GUID, immutable
        - 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 | validation: minLength 1, maxLength 200
           - name: phone | type: string | description: Participant's phone number.  | validation: format PHONE
           - name: email | type: string | description: Participant's email address.  | validation: format EMAIL
           - 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.  | validation: format GUID
        - name: partySize | type: integer | description: Party size of the group or `1` for individuals.  Min: `1` Max: `1000` | required: true | validation: minimum 1, maximum 1000, format int32
        - 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).  | validation: format map
 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.  | validation: format GUID, immutable
        - 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.  | validation: minLength 36, maxLength 250, immutable
     - name: id | type: string | description: Participation GUID.  | read-only: true | validation: format GUID
     - name: externalId | type: string | description: External GUID.  | validation: format GUID, immutable
     - name: participant | type: Participant | description: Information about the participant.  
        - name: name | type: string | description: Participant name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
        - name: phone | type: string | description: Participant's phone number.  | validation: format PHONE
        - name: email | type: string | description: Participant's email address.  | validation: format EMAIL
        - 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.  | validation: format GUID
     - name: partySize | type: integer | description: Party size of the group or `1` for individuals.  Min: `1` Max: `1000`  | validation: minimum 1, maximum 1000, format int32
     - 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.  | read-only: true | validation: format GUID
     - 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.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
     - 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).  | validation: format map


```

### 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: <AUTH>' \
-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.participations.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: 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.  | validation: format GUID, immutable
     - 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.  | validation: minLength 36, maxLength 250, immutable
        - name: externalId | type: string | description: External GUID.  | validation: format GUID, immutable
        - 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 | validation: minLength 1, maxLength 200
           - name: phone | type: string | description: Participant's phone number.  | validation: format PHONE
           - name: email | type: string | description: Participant's email address.  | validation: format EMAIL
           - 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.  | validation: format GUID
        - name: partySize | type: integer | description: Party size of the group or `1` for individuals.  Min: `1` Max: `1000` | required: true | validation: minimum 1, maximum 1000, format int32
        - 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).  | validation: format map
   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.  | validation: format GUID
 Return type: PROMISE<Participation>
  - 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.  | validation: format GUID, immutable
     - 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.  | validation: minLength 36, maxLength 250, immutable
  - name: _id | type: string | description: Participation GUID.  | read-only: true | validation: format GUID
  - name: externalId | type: string | description: External GUID.  | validation: format GUID, immutable
  - name: participant | type: Participant | description: Information about the participant.  
     - name: name | type: string | description: Participant name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
     - name: phone | type: string | description: Participant's phone number.  | validation: format PHONE
     - name: email | type: string | description: Participant's email address.  | validation: format EMAIL
     - 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.  | validation: format GUID
  - name: partySize | type: integer | description: Party size of the group or `1` for individuals.  Min: `1` Max: `1000`  | validation: minimum 1, maximum 1000, format int32
  - 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.  | read-only: true | validation: format GUID
  - 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.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
  - 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).  | validation: format map


```

### 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-managed)
Self-managed 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);
};
```

---