> 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

# BulkCreateParticipants

# Package: onlinePrograms

# Namespace: ParticipantsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/participants/bulk-create-participants.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Creates participants in bulk.

All participants in a single bulk create request must belong to the same program.
Returns an error if the member is already a participant in the specified program.

When `pricingType` is `SINGLE_PAYMENT`, provide `singlePaymentDetails`.
When `pricingType` is `PAID_PLAN`, provide `paidPlanDetails`.
When `pricingType` is `FREE_COUPON`, provide `freeCouponDetails`.
Other pricing types (`FREE`, `ADDED_MANUALLY`) don't require details.

---

## REST API

### Schema

```
 Method: bulkCreateParticipants
 Description: Creates participants in bulk.  All participants in a single bulk create request must belong to the same program. Returns an error if the member is already a participant in the specified program.  When `pricingType` is `SINGLE_PAYMENT`, provide `singlePaymentDetails`. When `pricingType` is `PAID_PLAN`, provide `paidPlanDetails`. When `pricingType` is `FREE_COUPON`, provide `freeCouponDetails`. Other pricing types (`FREE`, `ADDED_MANUALLY`) don't require details.
 URL: https://www.wixapis.com/online-programs/v3/bulk/participants/create
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  participants, participants.memberId, participants.programId, participants.enrollmentInfo, participants.enrollmentInfo.pricingType
 Method parameters: 
   param name: fields | type: array<fields> | description: Array of conditional fields to include in the response. Use `RequestedFields.PROGRESS` to include the `progress` field, which isn't returned by default.  | validation: maxItems 1
                 - enum:
                 -     PROGRESS: Request the progress field to be calculated and included in the response.
   param name: participants | type: array<participants> | description: List of participants to create. | required: true | validation: minItems 1, maxItems 100
              - name: memberId | type: string | description: Member GUID of the participant on the site. | required: true | read-only: true | validation: format GUID
              - name: programId | type: string | description: GUID of the program the participant is enrolled in. | required: true | read-only: true | validation: format GUID
              - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program. | required: true 
                 - ONE-OF: 
                    - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.  
                       - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.  | validation: format GUID, immutable
                       - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.  | validation: format GUID, immutable
                    - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.  
                       - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.  | validation: format GUID, immutable
                    - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.  
                       - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.  | validation: format GUID, immutable
                 - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program. | required: true 
                         - enum:
                         -     FREE: Member joined a program that is configured as free to join, with no payment required.
                         -     ADDED_MANUALLY: Member was added to the program by site owner.
                         -     SINGLE_PAYMENT: Member paid once to join the program.
                         -     PAID_PLAN: Member joined using a Pricing Plan.
                         -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
              - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
                 - 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
              - name: tags | type: Tags | description: Tags for categorizing and organizing participants.  
                 - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
                    - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
                 - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
   param name: returnEntity | type: returnEntity | description: Whether to return the created participants in the response.  
 Return type: BulkCreateParticipantsResponse
  - name: results | type: array<BulkParticipantResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the item.  
        - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: Participant | description: The participant entity. Empty if `returnEntity` is `false`.  
        - name: id | type: string | description: Participant GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the participant is updated. To prevent conflicting changes, the current revision must be specified when updating the participant.  Ignored when creating a participant.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the participant was created.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the participant was updated.  | read-only: true | validation: format date-time
        - name: memberId | type: string | description: Member GUID of the participant on the site.  | read-only: true | validation: format GUID
        - name: programId | type: string | description: GUID of the program the participant is enrolled in.  | read-only: true | validation: format GUID
        - name: progress | type: Progress | description: Program completion progress. This field is conditional and must be explicitly requested using the `fields` parameter.  | read-only: true 
           - name: totalStepsCompleted | type: integer | description: Number of program steps completed by member.  | validation: minimum 0
           - name: totalStepsAvailable | type: integer | description: Total number of program steps available to resolve.  | validation: minimum 0
           - name: completionPercentage | type: number | description: Participant's completion percentage. For participants who completed the program, this is `100.0`. Otherwise, it's calculated as (`totalStepsCompleted` / `totalStepsAvailable`) * 100, capped at `100`, and rounded to 1 decimal place.  | validation: minimum 0, maximum 100
        - name: certificateInfo | type: CertificateInfo | description: Information about the participant's certificate.  Returned only when a certificate has been issued to the participant.  | read-only: true 
           - name: issueDate | type: string | description: Date when the certificate was issued (UTC).  | read-only: true | validation: format date-time
        - name: member | type: Member | description: Snapshot of the site member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.  | read-only: true 
           - name: firstName | type: string | description: First name of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: lastName | type: string | description: Last name of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: email | type: string | description: Email of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: format EMAIL
           - name: contactId | type: string | description: Contact GUID for accessing additional member information with the Contacts API, such as phone numbers, addresses, and custom fields.  Returned only when the member has provided this information in their profile.  | read-only: true | validation: format GUID
           - name: nickname | type: string | description: Member nickname.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: profileImageUrl | type: string | description: Profile image URL of the site member.  | read-only: true | validation: format WEB_URL
        - name: lastActivityDate | type: string | description: Last activity date of the participant in the program (can either be status change or step resolution).  | read-only: true | validation: format date-time
        - name: enrollmentStatus | type: EnrollmentStatus | description: Participant's enrollment status in the program.  | read-only: true 
             - enum:
             -     JOINED: Participant is actively enrolled in the program.
             -     SUSPENDED: Enrollment temporarily suspended due to payment issues.
             -     AUTO_REMOVED: Automatically removed via a Wix Automations workflow.
             -     REMOVED: Removed from the program by the site owner.
             -     LEFT: Participant voluntarily left the program.
        - name: progressStatus | type: ProgressStatus | description: Participant's progress status in the program.  | read-only: true 
             - enum:
             -     NOT_STARTED: Enrolled but no steps completed yet.
             -     IN_PROGRESS: At least one step completed but program not yet finished.
             -     COMPLETED: Participant successfully completed the program.
             -     FAILED: Participant failed to complete the program within the deadline.
             -     NOT_APPLICABLE: Progress tracking isn't applicable because the participant left, was removed, or was auto-removed.
        - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program.  
           - ONE-OF: 
              - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.  
                 - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.  | validation: format GUID, immutable
                 - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.  | validation: format GUID, immutable
              - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.  
                 - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.  | validation: format GUID, immutable
              - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.  
                 - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.  | validation: format GUID, immutable
           - name: timeZone | type: string | description: Time zone of the site when the participant was enrolled in the program, in IANA timezone format (e.g., "America/New_York").  | read-only: true | validation: maxLength 50
           - name: startDate | type: string | description: Date when the participant's program timeline begins, in `YYYY-MM-DD` format. If the program's `timeline.startDate` is set, this is that date. Otherwise, it's the local calendar date when the participant is created, based on the site's time zone.  | read-only: true | validation: format LOCAL_DATE
           - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program.  
                 - enum:
                 -     FREE: Member joined a program that is configured as free to join, with no payment required.
                 -     ADDED_MANUALLY: Member was added to the program by site owner.
                 -     SINGLE_PAYMENT: Member paid once to join the program.
                 -     PAID_PLAN: Member joined using a Pricing Plan.
                 -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
           - name: deadline | type: string | description: Date by which the participant must complete the program, in `YYYY-MM-DD` format.  Returned only when the program has a fixed end date, or a duration-based deadline calculated from the participant's start date.  | read-only: true | validation: format LOCAL_DATE
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - 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
        - name: tags | type: Tags | description: Tags for categorizing and organizing participants.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk action.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MULTIPLE_PROGRAM_IDS_IN_BULK_CREATE | Description: none
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: PARTICIPANTS_LIMIT_EXCEEDED | Description: Maximum participants limit exceeded for this program.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: PREMIUM_PLAN_REQUIRED | Description: Premium plan required to add more participants beyond the free limit.


```

### Examples

### Create participants in bulk
Creates participants for the same program in a single operation

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/participants/v3/bulk/participants/create' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "participants": [
    {
      "memberId": "2a01d8c7-54e5-4f42-9c9f-7a5d4d2ec4f1",
      "programId": "5f2d6b0e-8f8f-4e6e-a1b1-6f6a8427c3d7",
      "enrollmentInfo": {
        "pricingType": "ADDED_MANUALLY"
      }
    }
  ],
  "returnEntity": true,
  "fields": ["PROGRESS"]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.participants.bulkCreateParticipants(participants, options)
 Description: Creates participants in bulk.  All participants in a single bulk create request must belong to the same program. Returns an error if the member is already a participant in the specified program.  When `pricingType` is `SINGLE_PAYMENT`, provide `singlePaymentDetails`. When `pricingType` is `PAID_PLAN`, provide `paidPlanDetails`. When `pricingType` is `FREE_COUPON`, provide `freeCouponDetails`. Other pricing types (`FREE`, `ADDED_MANUALLY`) don't require details.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  participants, participants.memberId, participants.programId, participants.enrollmentInfo, participants.enrollmentInfo.pricingType
 Method parameters: 
   param name: options | type: BulkCreateParticipantsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the created participants in the response.  
        - name: fields | type: array<RequestedFields> | description: Array of conditional fields to include in the response. Use `RequestedFields.PROGRESS` to include the `progress` field, which isn't returned by default.  | validation: maxItems 1
             - enum:
             -     PROGRESS: Request the progress field to be calculated and included in the response.
   param name: participants | type: array<array> | description: List of participants to create. | required: true | validation: minItems 1, maxItems 100
              - name: memberId | type: string | description: Member GUID of the participant on the site. | required: true | read-only: true | validation: format GUID
              - name: programId | type: string | description: GUID of the program the participant is enrolled in. | required: true | read-only: true | validation: format GUID
              - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program. | required: true 
                 - ONE-OF: 
                    - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.  
                       - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.  | validation: format GUID, immutable
                       - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.  | validation: format GUID, immutable
                    - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.  
                       - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.  | validation: format GUID, immutable
                    - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.  
                       - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.  | validation: format GUID, immutable
                 - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program. | required: true 
                         - enum:
                         -     FREE: Member joined a program that is configured as free to join, with no payment required.
                         -     ADDED_MANUALLY: Member was added to the program by site owner.
                         -     SINGLE_PAYMENT: Member paid once to join the program.
                         -     PAID_PLAN: Member joined using a Pricing Plan.
                         -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
              - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
                 - 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
              - name: tags | type: Tags | description: Tags for categorizing and organizing participants.  
                 - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
                    - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
                 - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
 Return type: PROMISE<BulkCreateParticipantsResponse>
  - name: results | type: array<BulkParticipantResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the item.  
        - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: Participant | description: The participant entity. Empty if `returnEntity` is `false`.  
        - name: _id | type: string | description: Participant GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the participant is updated. To prevent conflicting changes, the current revision must be specified when updating the participant.  Ignored when creating a participant.  | read-only: true | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the participant was created.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the participant was updated.  | read-only: true 
        - name: memberId | type: string | description: Member GUID of the participant on the site.  | read-only: true | validation: format GUID
        - name: programId | type: string | description: GUID of the program the participant is enrolled in.  | read-only: true | validation: format GUID
        - name: progress | type: Progress | description: Program completion progress. This field is conditional and must be explicitly requested using the `fields` parameter.  | read-only: true 
           - name: totalStepsCompleted | type: integer | description: Number of program steps completed by member.  | validation: minimum 0
           - name: totalStepsAvailable | type: integer | description: Total number of program steps available to resolve.  | validation: minimum 0
           - name: completionPercentage | type: number | description: Participant's completion percentage. For participants who completed the program, this is `100.0`. Otherwise, it's calculated as (`totalStepsCompleted` / `totalStepsAvailable`) * 100, capped at `100`, and rounded to 1 decimal place.  | validation: minimum 0, maximum 100
        - name: certificateInfo | type: CertificateInfo | description: Information about the participant's certificate.  Returned only when a certificate has been issued to the participant.  | read-only: true 
           - name: issueDate | type: Date | description: Date when the certificate was issued (UTC).  | read-only: true 
        - name: member | type: Member | description: Snapshot of the site member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.  | read-only: true 
           - name: firstName | type: string | description: First name of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: lastName | type: string | description: Last name of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: email | type: string | description: Email of the site member.  Returned only when the member has provided it in their profile.  | read-only: true | validation: format EMAIL
           - name: contactId | type: string | description: Contact GUID for accessing additional member information with the Contacts API, such as phone numbers, addresses, and custom fields.  Returned only when the member has provided this information in their profile.  | read-only: true | validation: format GUID
           - name: nickname | type: string | description: Member nickname.  Returned only when the member has provided it in their profile.  | read-only: true | validation: maxLength 1000
           - name: profileImageUrl | type: string | description: Profile image URL of the site member.  | read-only: true | validation: format WEB_URL
        - name: lastActivityDate | type: Date | description: Last activity date of the participant in the program (can either be status change or step resolution).  | read-only: true 
        - name: enrollmentStatus | type: EnrollmentStatus | description: Participant's enrollment status in the program.  | read-only: true 
             - enum:
             -     JOINED: Participant is actively enrolled in the program.
             -     SUSPENDED: Enrollment temporarily suspended due to payment issues.
             -     AUTO_REMOVED: Automatically removed via a Wix Automations workflow.
             -     REMOVED: Removed from the program by the site owner.
             -     LEFT: Participant voluntarily left the program.
        - name: progressStatus | type: ProgressStatus | description: Participant's progress status in the program.  | read-only: true 
             - enum:
             -     NOT_STARTED: Enrolled but no steps completed yet.
             -     IN_PROGRESS: At least one step completed but program not yet finished.
             -     COMPLETED: Participant successfully completed the program.
             -     FAILED: Participant failed to complete the program within the deadline.
             -     NOT_APPLICABLE: Progress tracking isn't applicable because the participant left, was removed, or was auto-removed.
        - name: enrollmentInfo | type: EnrollmentInfo | description: Additional information about the participant's enrollment and completion timeframe in the program.  
           - ONE-OF: 
              - name: singlePaymentDetails | type: SinglePaymentDetails | description: Details about a Single Payment enrollment.  
                 - name: paymentOrderId | type: string | description: GUID of the cashier order which was used to pay for joining the program.  | validation: format GUID, immutable
                 - name: offlineTransactionId | type: string | description: GUID of the offline transaction.  Available only when the participant paid with an offline payment method, such as cash or check.  | validation: format GUID, immutable
              - name: paidPlanDetails | type: PaidPlanDetails | description: Details about a Paid Plan enrollment.  
                 - name: paidPlanId | type: string | description: GUID of the Paid Plan for which member has paid to join the program.  | validation: format GUID, immutable
              - name: freeCouponDetails | type: FreeCouponDetails | description: Details about a Free Coupon enrollment.  
                 - name: freeCouponId | type: string | description: GUID of the coupon which was applied and gave 100% discount to join the program for free.  | validation: format GUID, immutable
           - name: timeZone | type: string | description: Time zone of the site when the participant was enrolled in the program, in IANA timezone format (e.g., "America/New_York").  | read-only: true | validation: maxLength 50
           - name: startDate | type: string | description: Date when the participant's program timeline begins, in `YYYY-MM-DD` format. If the program's `timeline.startDate` is set, this is that date. Otherwise, it's the local calendar date when the participant is created, based on the site's time zone.  | read-only: true | validation: format LOCAL_DATE
           - name: pricingType | type: PricingType | description: Pricing type used for the participant's enrollment in the program.  
                 - enum:
                 -     FREE: Member joined a program that is configured as free to join, with no payment required.
                 -     ADDED_MANUALLY: Member was added to the program by site owner.
                 -     SINGLE_PAYMENT: Member paid once to join the program.
                 -     PAID_PLAN: Member joined using a Pricing Plan.
                 -     FREE_COUPON: Member joined a paid program using a coupon that provided 100% discount.
           - name: deadline | type: string | description: Date by which the participant must complete the program, in `YYYY-MM-DD` format.  Returned only when the program has a fixed end date, or a duration-based deadline calculated from the participant's start date.  | read-only: true | validation: format LOCAL_DATE
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the participant object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - 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
        - name: tags | type: Tags | description: Tags for categorizing and organizing participants.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk action.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MULTIPLE_PROGRAM_IDS_IN_BULK_CREATE | Description: none
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: PARTICIPANTS_LIMIT_EXCEEDED | Description: Maximum participants limit exceeded for this program.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: PREMIUM_PLAN_REQUIRED | Description: Premium plan required to add more participants beyond the free limit.


```

### Examples

### Create participants in bulk
Creates app-managed participants for the same program.

```javascript
import { participants } from "@wix/online-programs";

async function bulkCreateParticipants() {
  const response = await participants.bulkCreateParticipants(
    [
      {
        memberId: "a16f79b1-1174-44ae-86ee-284029256bd4",
        programId: "1a87c246-5c3a-4eea-a7c8-e5e2cf5d61c0",
        enrollmentInfo: {
          pricingType: "ADDED_MANUALLY",
        },
      },
    ],
    { returnEntity: true },
  );

  return response;
}

/* Promise resolves to:
 * {
 *   "results": [
 *     {
 *       "itemMetadata": {
 *         "_id": "43db0e8d-4392-42d8-b3a6-56d412eb71e0",
 *         "originalIndex": 0,
 *         "success": true
 *       },
 *       "item": {
 *         "_id": "43db0e8d-4392-42d8-b3a6-56d412eb71e0",
 *         "memberId": "a16f79b1-1174-44ae-86ee-284029256bd4",
 *         "programId": "1a87c246-5c3a-4eea-a7c8-e5e2cf5d61c0",
 *         "enrollmentStatus": "JOINED",
 *         "progressStatus": "NOT_STARTED",
 *         "enrollmentInfo": {
 *           "pricingType": "ADDED_MANUALLY"
 *         }
 *       }
 *     }
 *   ],
 *   "bulkActionMetadata": {
 *     "totalSuccesses": 1,
 *     "totalFailures": 0,
 *     "undetailedFailures": 0
 *   }
 * }
 */

```

### bulkCreateParticipants (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 { participants } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { participants },
  // Include the auth strategy and host as relevant
});


async function bulkCreateParticipants(participants,options) {
  const response = await myWixClient.participants.bulkCreateParticipants(participants,options);
};
```

---