> 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

# BulkCreateQuizzes

# Package: onlinePrograms

# Namespace: QuizService

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

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

## Introduction

Creates up to 30 detached quiz definitions in a single API call.

Each definition must contain at least one question.

Quiz IDs, revisions, and creation and update timestamps are assigned by the server. Client-supplied values for these read-only fields are ignored. Question IDs (`quizzes.fields.id`) must be supplied by the caller.

Invalid quiz definitions fail the entire request before any quizzes are created.

Individual item failures don't fail the bulk request. Check `results.itemMetadata.success` for each item and inspect `results.itemMetadata.error` when it is `false`. Individual results can contain error codes not listed for the request.

To use the quizzes in an Online Program, specify the returned quiz IDs as `step.quizOptions.id` values when calling the Steps API's [Create Step](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/create-step.md) or [Bulk Create Steps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md) method.

To create a single quiz definition, call [Create Quiz](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/create-quiz.md).

---

## REST API

### Schema

```
 Method: bulkCreateQuizzes
 Description: Creates up to 30 detached quiz definitions in a single API call.  Each definition must contain at least one question.  Quiz GUIDs, revisions, and creation and update timestamps are assigned by the server. Client-supplied values for these read-only fields are ignored. Question GUIDs (`quizzes.fields.id`) must be supplied by the caller.  Invalid quiz definitions fail the entire request before any quizzes are created.  Individual item failures don't fail the bulk request. Check `results.itemMetadata.success` for each item and inspect `results.itemMetadata.error` when it is `false`. Individual results can contain error codes not listed for the request.  To use the quizzes in an Online Program, specify the returned quiz GUIDs as `step.quizOptions.id` values when calling the Steps API's [Create Step](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/create-step.md) or [Bulk Create Steps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md) method.  To create a single quiz definition, call [Create Quiz](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/create-quiz.md).
 URL: https://www.wixapis.com/online-programs/v1/bulk/quizzes/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:  quizzes, quizzes.fields, quizzes.fields.id, quizzes.fields.target, quizzes.fields.question
 Method parameters: 
   param name: quizzes | type: array<quizzes> | description: Quiz definitions to create. | required: true | validation: minItems 1, maxItems 30
              - name: settings | type: QuizSettings | description: Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data.  
                 - name: passingGrade | type: integer | description: Minimum unweighted integer percentage required to pass. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect.  | validation: minimum 0, maximum 100, format int32
                 - name: title | type: string | description: Quiz title.  | validation: maxLength 200
                 - name: attempts | type: integer | description: Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. Submissions grouped together share an attempt count, even across quizzes. See [Attempt limits](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/quiz-grading.md#attempt-limits) for how submissions are counted.  | validation: minimum 1, format int32
              - name: fields | type: array<QuizField> | description: Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.  New submissions use the current questions; stored submissions retain their recorded answer evaluations. | required: true | validation: minItems 1, maxItems 200
                 - ONE-OF: 
                    - name: numeric | type: NumericField | description: Numeric input.  
                       - name: rightAnswer | type: number | description: Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.  | validation: format double
                    - name: shortText | type: ShortTextField | description: Short-text input.  
                       - name: rightAnswer | type: string | description: Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.  | validation: minLength 1, maxLength 200
                    - name: longText | type: LongTextField | description: Long-text input. Set this to an empty object (`{}`) to select it.  
         EMPTY-OBJECT {}
                    - name: singleChoice | type: SingleChoiceField | description: Input with predefined options where only one option can be selected.  
                       - name: rightAnswer | type: string | description: Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.  | validation: minLength 1, maxLength 350
                       - name: options | type: array<string> | description: Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
                    - name: multiChoice | type: MultiChoiceField | description: Input with predefined options where multiple options can be selected.  
                       - name: rightAnswer | type: array<string> | description: Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.  | validation: minItems 0, maxItems 90, minLength 1, maxLength 350
                       - name: options | type: array<string> | description: Options available to the participant.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
                    - name: fileUpload | type: FileUploadField | description: File-upload input.  
                       - name: buttonText | type: string | description: Text displayed on the upload button.  Default: `Upload`.  | validation: minLength 1, maxLength 100
                       - name: itemsLimit | type: integer | description: Maximum number of files a participant can upload for this question.  Default: `10`.  | validation: minimum 1, maximum 10, format int32
                       - name: fileUploadFormats | type: array<FileUploadFormat> | description: Wix Forms file categories that participants can upload.  Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade.  | validation: maxItems 6
                                 - enum:
                                 -     IMAGE: Image-file category.
                                 -     VIDEO: Video-file category.
                                 -     AUDIO: Audio-file category.
                                 -     DOCUMENT: Document-file category.
                                 -     ARCHIVE: Archive-file category.
                                 -     MODEL_3D: 3D-model-file category.
                 - name: id | type: string | description: Caller-generated GUGUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this GUID to identify the question.  | validation: format GUID, immutable
                 - name: target | type: string | description: Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question.  | validation: maxLength 200, immutable
                 - name: question | type: string | description: Question text.  | validation: minLength 1, maxLength 350
                 - name: score | type: number | description: Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage.  | validation: format double
                 - name: rightMessage | type: string | description: Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers.  | validation: maxLength 350
                 - name: wrongMessage | type: string | description: Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers.  | validation: maxLength 350
   param name: returnEntity | type: returnEntity | description: Whether to return the created quizzes in the response.  Default: `false`  
 Return type: BulkCreateQuizzesResponse
  - name: results | type: array<BulkQuizResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 30
     - name: itemMetadata | type: ItemMetadata | description: Result metadata for the individual create operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request.  
        - 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: Quiz | description: Created quiz. Empty when `returnEntity` is `false`.  
        - name: id | type: string | description: Quiz GUID.  | read-only: true | validation: format GUID
        - name: settings | type: QuizSettings | description: Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data.  
           - name: passingGrade | type: integer | description: Minimum unweighted integer percentage required to pass. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect.  | validation: minimum 0, maximum 100, format int32
           - name: title | type: string | description: Quiz title.  | validation: maxLength 200
           - name: attempts | type: integer | description: Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. Submissions grouped together share an attempt count, even across quizzes. See [Attempt limits](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/quiz-grading.md#attempt-limits) for how submissions are counted.  | validation: minimum 1, format int32
        - name: revision | type: string | description: Current revision of the stored quiz definition. The revision changes when the definition changes. The public Quiz API doesn't currently provide an update method.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the quiz was created.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the quiz was last updated.  | read-only: true | validation: format date-time
        - name: fields | type: array<QuizField> | description: Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.  New submissions use the current questions; stored submissions retain their recorded answer evaluations.  | validation: minItems 1, maxItems 200
           - ONE-OF: 
              - name: numeric | type: NumericField | description: Numeric input.  
                 - name: rightAnswer | type: number | description: Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.  | validation: format double
              - name: shortText | type: ShortTextField | description: Short-text input.  
                 - name: rightAnswer | type: string | description: Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.  | validation: minLength 1, maxLength 200
              - name: longText | type: LongTextField | description: Long-text input. Set this to an empty object (`{}`) to select it.  
       EMPTY-OBJECT {}
              - name: singleChoice | type: SingleChoiceField | description: Input with predefined options where only one option can be selected.  
                 - name: rightAnswer | type: string | description: Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.  | validation: minLength 1, maxLength 350
                 - name: options | type: array<string> | description: Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
              - name: multiChoice | type: MultiChoiceField | description: Input with predefined options where multiple options can be selected.  
                 - name: rightAnswer | type: array<string> | description: Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.  | validation: minItems 0, maxItems 90, minLength 1, maxLength 350
                 - name: options | type: array<string> | description: Options available to the participant.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
              - name: fileUpload | type: FileUploadField | description: File-upload input.  
                 - name: buttonText | type: string | description: Text displayed on the upload button.  Default: `Upload`.  | validation: minLength 1, maxLength 100
                 - name: itemsLimit | type: integer | description: Maximum number of files a participant can upload for this question.  Default: `10`.  | validation: minimum 1, maximum 10, format int32
                 - name: fileUploadFormats | type: array<FileUploadFormat> | description: Wix Forms file categories that participants can upload.  Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade.  | validation: maxItems 6
                         - enum:
                         -     IMAGE: Image-file category.
                         -     VIDEO: Video-file category.
                         -     AUDIO: Audio-file category.
                         -     DOCUMENT: Document-file category.
                         -     ARCHIVE: Archive-file category.
                         -     MODEL_3D: 3D-model-file category.
           - name: id | type: string | description: Caller-generated GUGUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this GUID to identify the question.  | validation: format GUID, immutable
           - name: target | type: string | description: Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question.  | validation: maxLength 200, immutable
           - name: question | type: string | description: Question text.  | validation: minLength 1, maxLength 350
           - name: score | type: number | description: Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage.  | validation: format double
           - name: rightMessage | type: string | description: Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers.  | validation: maxLength 350
           - name: wrongMessage | type: string | description: Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers.  | validation: maxLength 350
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk create operation.  
     - 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: INVALID_QUIZ | Description: A quiz definition is invalid; the entire request fails before creation.


```

### Examples

### Create quiz definitions in bulk
Create two general knowledge quizzes using numeric, text, choice, and file-upload questions. Set returnEntity to true to include the created quizzes in the response. Replace <AUTH> with your authorization token and generate a new UUID for each question. Check each result's itemMetadata.success for individual failures. The illustrative request and response use explicit upload limits: 2 files for the first quiz and 1 file for the second.

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/v1/bulk/quizzes/create' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "quizzes": [
    {
      "settings": {
        "title": "General Knowledge Practice Quiz",
        "passingGrade": 70,
        "attempts": 3
      },
      "fields": [
        {
          "id": "1e4e7236-307a-4d21-a862-e3e70b579344",
          "target": "daysInWeek",
          "question": "How many days are in a week?",
          "numeric": {
            "rightAnswer": 7
          }
        },
        {
          "id": "8263b0c8-156c-412f-98bf-672397f73a3f",
          "target": "skyColor",
          "question": "What color is a clear daytime sky?",
          "shortText": {
            "rightAnswer": "blue"
          }
        },
        {
          "id": "15834574-4b7d-4f69-b4ce-e5f5d40f7d01",
          "target": "learningGoal",
          "question": "Describe your learning goal.",
          "longText": {}
        },
        {
          "id": "85a2c277-8f9d-46a0-bbd9-3a6bfc4253f8",
          "target": "capitalOfFrance",
          "question": "What is the capital of France?",
          "singleChoice": {
            "rightAnswer": "Paris",
            "options": [
              "Paris",
              "Lyon",
              "Marseille"
            ]
          }
        },
        {
          "id": "3b6a338a-19a0-40f3-9554-cb74ea436b35",
          "target": "primeNumbers",
          "question": "Select all prime numbers.",
          "multiChoice": {
            "rightAnswer": [
              "2",
              "3"
            ],
            "options": [
              "2",
              "3",
              "4"
            ]
          }
        },
        {
          "id": "6e99753a-12f7-413f-80df-fce25c1536a1",
          "target": "supportingFiles",
          "question": "Upload supporting files.",
          "fileUpload": {
            "buttonText": "Upload files",
            "itemsLimit": 2,
            "fileUploadFormats": [
              "IMAGE",
              "DOCUMENT",
              "MODEL_3D"
            ]
          }
        }
      ]
    },
    {
      "settings": {
        "title": "General Knowledge Final Assessment",
        "passingGrade": 70,
        "attempts": 3
      },
      "fields": [
        {
          "id": "7ca9d2d1-323f-4a17-80b7-1268dca1d0fc",
          "target": "daysInWeek",
          "question": "How many days are in a week?",
          "numeric": {
            "rightAnswer": 7
          }
        },
        {
          "id": "d6ac0d14-2f84-470a-9e31-ce1ed65b2f4e",
          "target": "skyColor",
          "question": "What color is a clear daytime sky?",
          "shortText": {
            "rightAnswer": "blue"
          }
        },
        {
          "id": "c026a72d-1e77-4ea2-97ec-19b28738e3fc",
          "target": "learningGoal",
          "question": "Describe your learning goal.",
          "longText": {}
        },
        {
          "id": "1b716808-5818-4e5a-b1a0-60ce097aa6ee",
          "target": "capitalOfFrance",
          "question": "What is the capital of France?",
          "singleChoice": {
            "rightAnswer": "Paris",
            "options": [
              "Paris",
              "Lyon",
              "Marseille"
            ]
          }
        },
        {
          "id": "d7c28b44-03b2-471b-9e30-b4920aba154a",
          "target": "primeNumbers",
          "question": "Select all prime numbers.",
          "multiChoice": {
            "rightAnswer": [
              "2",
              "3"
            ],
            "options": [
              "2",
              "3",
              "4"
            ]
          }
        },
        {
          "id": "592bb200-41bc-49d0-9699-bc02611b066e",
          "target": "supportingFiles",
          "question": "Upload supporting files.",
          "fileUpload": {
            "buttonText": "Upload files",
            "itemsLimit": 1,
            "fileUploadFormats": [
              "IMAGE",
              "DOCUMENT",
              "MODEL_3D"
            ]
          }
        }
      ]
    }
  ],
  "returnEntity": true
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.quizzes.bulkCreateQuizzes(quizzes, options)
 Description: Creates up to 30 detached quiz definitions in a single API call.  Each definition must contain at least one question.  Quiz GUIDs, revisions, and creation and update timestamps are assigned by the server. Client-supplied values for these read-only fields are ignored. Question GUIDs (`quizzes.fields.id`) must be supplied by the caller.  Invalid quiz definitions fail the entire request before any quizzes are created.  Individual item failures don't fail the bulk request. Check `results.itemMetadata.success` for each item and inspect `results.itemMetadata.error` when it is `false`. Individual results can contain error codes not listed for the request.  To use the quizzes in an Online Program, specify the returned quiz GUIDs as `step.quizOptions.id` values when calling the Steps API's [Create Step](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/create-step.md) or [Bulk Create Steps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md) method.  To create a single quiz definition, call [Create Quiz](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/create-quiz.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  quizzes, quizzes.fields, quizzes.fields._id, quizzes.fields.target, quizzes.fields.question, quizzes.fields.singleChoice.options, quizzes.fields.multiChoice.options
 Method parameters: 
   param name: quizzes | type: array<Quiz> | description: Quiz definitions to create. | required: true | validation: minItems 1, maxItems 30
              - name: settings | type: QuizSettings | description: Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data.  
                 - name: passingGrade | type: integer | description: Minimum unweighted integer percentage required to pass. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect.  | validation: minimum 0, maximum 100, format int32
                 - name: title | type: string | description: Quiz title.  | validation: maxLength 200
                 - name: attempts | type: integer | description: Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. Submissions grouped together share an attempt count, even across quizzes. See [Attempt limits](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/quiz-grading.md#attempt-limits) for how submissions are counted.  | validation: minimum 1, format int32
              - name: fields | type: array<QuizField> | description: Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.  New submissions use the current questions; stored submissions retain their recorded answer evaluations. | required: true | validation: minItems 1, maxItems 200
                 - ONE-OF: - required: true
                    - name: numeric | type: NumericField | description: Numeric input.  
                       - name: rightAnswer | type: number | description: Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.  
                    - name: shortText | type: ShortTextField | description: Short-text input.  
                       - name: rightAnswer | type: string | description: Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.  | validation: minLength 1, maxLength 200
                    - name: singleChoice | type: SingleChoiceField | description: Input with predefined options where only one option can be selected.  
                       - name: rightAnswer | type: string | description: Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.  | validation: minLength 1, maxLength 350
                       - name: options | type: array<string> | description: Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
                    - name: multiChoice | type: MultiChoiceField | description: Input with predefined options where multiple options can be selected.  
                       - name: rightAnswer | type: array<string> | description: Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.  | validation: minItems 0, maxItems 90, minLength 1, maxLength 350
                       - name: options | type: array<string> | description: Options available to the participant.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
                    - name: fileUpload | type: FileUploadField | description: File-upload input.  
                       - name: buttonText | type: string | description: Text displayed on the upload button.  Default: `Upload`.  | validation: minLength 1, maxLength 100
                       - name: itemsLimit | type: integer | description: Maximum number of files a participant can upload for this question.  Default: `10`.  | validation: minimum 1, maximum 10, format int32
                       - name: fileUploadFormats | type: array<FileUploadFormat> | description: Wix Forms file categories that participants can upload.  Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade.  | validation: maxItems 6
                                 - enum:
                                 -     IMAGE: Image-file category.
                                 -     VIDEO: Video-file category.
                                 -     AUDIO: Audio-file category.
                                 -     DOCUMENT: Document-file category.
                                 -     ARCHIVE: Archive-file category.
                                 -     MODEL_3D: 3D-model-file category.
                 - name: _id | type: string | description: Caller-generated GUGUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this GUID to identify the question.  | validation: format GUID, immutable
                 - name: target | type: string | description: Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question.  | validation: maxLength 200, immutable
                 - name: question | type: string | description: Question text.  | validation: minLength 1, maxLength 350
                 - name: score | type: number | description: Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage.  
                 - name: rightMessage | type: string | description: Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers.  | validation: maxLength 350
                 - name: wrongMessage | type: string | description: Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers.  | validation: maxLength 350
   param name: options | type: BulkCreateQuizzesOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the created quizzes in the response.  Default: `false`  
 Return type: PROMISE<BulkCreateQuizzesResponse>
  - name: results | type: array<BulkQuizResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 30
     - name: itemMetadata | type: ItemMetadata | description: Result metadata for the individual create operation. If `success` is `false`, inspect `error` for details. Individual results can contain error codes not listed for the request.  
        - 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: Quiz | description: Created quiz. Empty when `returnEntity` is `false`.  
        - name: _id | type: string | description: Quiz GUID.  | read-only: true | validation: format GUID
        - name: settings | type: QuizSettings | description: Quiz title, passing grade, and attempt limit. New submissions use the current settings; stored submissions retain their recorded grade data.  
           - name: passingGrade | type: integer | description: Minimum unweighted integer percentage required to pass. The earned grade is calculated as `floor((correct answer count / submitted answer count) * 100)`; question `score` values don't weight it. Non-evaluable answers count as correct. If omitted, the submission has no earned or passing grade and its status is COMPLETED, even if an individual evaluated answer is incorrect.  | validation: minimum 0, maximum 100, format int32
           - name: title | type: string | description: Quiz title.  | validation: maxLength 200
           - name: attempts | type: integer | description: Maximum number of submissions allowed per submitter. If omitted, no attempt-limit check is applied. Submissions grouped together share an attempt count, even across quizzes. See [Attempt limits](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/quiz-grading.md#attempt-limits) for how submissions are counted.  | validation: minimum 1, format int32
        - name: revision | type: string | description: Current revision of the stored quiz definition. The revision changes when the definition changes. The public Quiz API doesn't currently provide an update method.  | read-only: true | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the quiz was created.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the quiz was last updated.  | read-only: true 
        - name: fields | type: array<QuizField> | description: Active questions in the quiz. Each `QuizField` defines one question and its answer input. Creating or cloning a quiz requires at least one active question. A retrieved quiz can have an empty list after all its questions have been deleted. Check for active questions before displaying or reusing it.  New submissions use the current questions; stored submissions retain their recorded answer evaluations.  | validation: minItems 1, maxItems 200
           - ONE-OF: 
              - name: numeric | type: NumericField | description: Numeric input.  
                 - name: rightAnswer | type: number | description: Correct numeric value. Matching is exact. If no correct value is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct value is stored.  
              - name: shortText | type: ShortTextField | description: Short-text input.  
                 - name: rightAnswer | type: string | description: Correct text. Matching trims leading and trailing whitespace and is case-insensitive. If no correct text is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct text is stored.  | validation: minLength 1, maxLength 200
              - name: singleChoice | type: SingleChoiceField | description: Input with predefined options where only one option can be selected.  
                 - name: rightAnswer | type: string | description: Correct option. When supplied, it must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers is exact. If no correct option is stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Omitted from responses when the caller can't access answer keys. Hidden answers still participate in grading; an absent response value doesn't mean no correct option is stored.  | validation: minLength 1, maxLength 350
                 - name: options | type: array<string> | description: Options available to the participant. Labels must be unique; comparison is case-sensitive. Duplicate labels are rejected with INVALID_QUIZ before creation.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
              - name: multiChoice | type: MultiChoiceField | description: Input with predefined options where multiple options can be selected.  
                 - name: rightAnswer | type: array<string> | description: Correct options. Every supplied value must exactly match an entry in `options`; otherwise, creation fails with INVALID_QUIZ. Matching submitted answers ignores option order but doesn't ignore duplicate values. If no correct options are stored for this question, its submitted answer is non-evaluable and counts as correct when calculating the earned grade.  Empty in responses when the caller can't access answer keys. Hidden answers still participate in grading; an empty response list doesn't mean no correct options are stored.  | validation: minItems 0, maxItems 90, minLength 1, maxLength 350
                 - name: options | type: array<string> | description: Options available to the participant.  | validation: minItems 1, maxItems 90, minLength 1, maxLength 350
              - name: fileUpload | type: FileUploadField | description: File-upload input.  
                 - name: buttonText | type: string | description: Text displayed on the upload button.  Default: `Upload`.  | validation: minLength 1, maxLength 100
                 - name: itemsLimit | type: integer | description: Maximum number of files a participant can upload for this question.  Default: `10`.  | validation: minimum 1, maximum 10, format int32
                 - name: fileUploadFormats | type: array<FileUploadFormat> | description: Wix Forms file categories that participants can upload.  Specify at least one format. `UNKNOWN_FILE_UPLOAD_FORMAT` isn't supported as a format selection. File-upload answers aren't evaluated and count as correct when calculating the earned grade.  | validation: maxItems 6
                         - enum:
                         -     IMAGE: Image-file category.
                         -     VIDEO: Video-file category.
                         -     AUDIO: Audio-file category.
                         -     DOCUMENT: Document-file category.
                         -     ARCHIVE: Archive-file category.
                         -     MODEL_3D: 3D-model-file category.
           - name: _id | type: string | description: Caller-generated GUGUID that identifies this question. Use a stable value that is unique within the quiz. Submission answer evaluations use this GUID to identify the question.  | validation: format GUID, immutable
           - name: target | type: string | description: Stable key used to match a submitted answer to this question. Use a value that is unique within the quiz and don't change or reuse it for another question.  | validation: maxLength 200, immutable
           - name: question | type: string | description: Question text.  | validation: minLength 1, maxLength 350
           - name: score | type: number | description: Score returned for evaluable answers, whether correct or incorrect. Omitted from non-evaluable answer evaluations. This value doesn't weight the submission's unweighted `earnedGrade` percentage.  
           - name: rightMessage | type: string | description: Feedback returned when an evaluable submitted answer is correct. Omitted for non-evaluable answers.  | validation: maxLength 350
           - name: wrongMessage | type: string | description: Feedback returned when an evaluable submitted answer is incorrect. Omitted for non-evaluable answers.  | validation: maxLength 350
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk create operation.  
     - 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: INVALID_QUIZ | Description: A quiz definition is invalid; the entire request fails before creation.


```

### Examples

### Create quiz definitions in bulk
```javascript
import { quizzes } from "@wix/online-programs";

// Run in an authorized Wix context. Generate a new UUID for each question.
// Set returnEntity to true to include created quizzes in the response.
// Check each result's itemMetadata.success before using the created quiz's _id.
const bulkCreateQuizzesResponse = await quizzes.bulkCreateQuizzes([
  {
    settings: {
      title: "General Knowledge Practice Quiz",
      passingGrade: 70,
      attempts: 3
    },
    fields: [
      {
        _id: "7f73b593-04d7-4415-ae82-f51e0f37512e",
        target: "daysInWeek",
        question: "How many days are in a week?",
        numeric: {
          rightAnswer: 7
        }
      },
      {
        _id: "4ab09c5a-7840-44a4-a414-07b53f123df8",
        target: "skyColor",
        question: "What color is a clear daytime sky?",
        shortText: {
          rightAnswer: "blue"
        }
      },
      {
        _id: "fb07538b-a53e-4d07-95fd-2b92fb5ad03b",
        target: "learningGoal",
        question: "Describe your learning goal.",
        longText: {}
      },
      {
        _id: "f6011afe-c4d1-4cf1-95d8-a1dfeb5bf701",
        target: "capitalOfFrance",
        question: "What is the capital of France?",
        singleChoice: {
          rightAnswer: "Paris",
          options: [
            "Paris",
            "Lyon",
            "Marseille"
          ]
        }
      },
      {
        _id: "56e1324b-d6fe-4b56-984f-2d906fdc7afa",
        target: "primeNumbers",
        question: "Select all prime numbers.",
        multiChoice: {
          rightAnswer: [
            "2",
            "3"
          ],
          options: [
            "2",
            "3",
            "4"
          ]
        }
      },
      {
        _id: "deb3d13b-8235-44e0-bf2d-5c29b2c88250",
        target: "supportingFiles",
        question: "Upload supporting files.",
        fileUpload: {
          buttonText: "Upload files",
          itemsLimit: 2,
          fileUploadFormats: [
            "IMAGE",
            "DOCUMENT",
            "MODEL_3D"
          ]
        }
      }
    ]
  },
  {
    settings: {
      title: "General Knowledge Final Assessment",
      passingGrade: 70,
      attempts: 3
    },
    fields: [
      {
        _id: "e203d861-644c-44c7-83aa-d096b5adddec",
        target: "daysInWeek",
        question: "How many days are in a week?",
        numeric: {
          rightAnswer: 7
        }
      },
      {
        _id: "9aff11ad-b740-4893-9449-e6ae1fb8136c",
        target: "skyColor",
        question: "What color is a clear daytime sky?",
        shortText: {
          rightAnswer: "blue"
        }
      },
      {
        _id: "b283546b-e967-4563-9e91-de9986dcebcb",
        target: "learningGoal",
        question: "Describe your learning goal.",
        longText: {}
      },
      {
        _id: "18a985e2-59bf-4aca-adf4-b0bcf632b97b",
        target: "capitalOfFrance",
        question: "What is the capital of France?",
        singleChoice: {
          rightAnswer: "Paris",
          options: [
            "Paris",
            "Lyon",
            "Marseille"
          ]
        }
      },
      {
        _id: "9799485f-7702-4a1e-9335-f5d99d6fbe35",
        target: "primeNumbers",
        question: "Select all prime numbers.",
        multiChoice: {
          rightAnswer: [
            "2",
            "3"
          ],
          options: [
            "2",
            "3",
            "4"
          ]
        }
      },
      {
        _id: "598a0a03-0f02-4cc8-8fc7-786560166ef2",
        target: "supportingFiles",
        question: "Upload supporting files.",
        fileUpload: {
          buttonText: "Upload files",
          fileUploadFormats: [
            "IMAGE",
            "DOCUMENT",
            "MODEL_3D"
          ]
        }
      }
    ]
  }
], {
  returnEntity: true
});

/* Promise resolves to:
{
  "results": [
    {
      "itemMetadata": {
        "originalIndex": 0,
        "success": true,
        "_id": "f04086ab-7979-4891-88b1-f9ece950bd0c"
      },
      "item": {
        "settings": {
          "passingGrade": 70,
          "title": "General Knowledge Practice Quiz",
          "attempts": 3
        },
        "revision": "1",
        "fields": [
          {
            "target": "daysInWeek",
            "question": "How many days are in a week?",
            "numeric": {
              "rightAnswer": 7
            },
            "_id": "7f73b593-04d7-4415-ae82-f51e0f37512e"
          },
          {
            "target": "skyColor",
            "question": "What color is a clear daytime sky?",
            "shortText": {
              "rightAnswer": "blue"
            },
            "_id": "4ab09c5a-7840-44a4-a414-07b53f123df8"
          },
          {
            "target": "learningGoal",
            "question": "Describe your learning goal.",
            "longText": {},
            "_id": "fb07538b-a53e-4d07-95fd-2b92fb5ad03b"
          },
          {
            "target": "capitalOfFrance",
            "question": "What is the capital of France?",
            "singleChoice": {
              "rightAnswer": "Paris",
              "options": [
                "Paris",
                "Lyon",
                "Marseille"
              ]
            },
            "_id": "f6011afe-c4d1-4cf1-95d8-a1dfeb5bf701"
          },
          {
            "target": "primeNumbers",
            "question": "Select all prime numbers.",
            "multiChoice": {
              "rightAnswer": [
                "2",
                "3"
              ],
              "options": [
                "2",
                "3",
                "4"
              ]
            },
            "_id": "56e1324b-d6fe-4b56-984f-2d906fdc7afa"
          },
          {
            "target": "supportingFiles",
            "question": "Upload supporting files.",
            "fileUpload": {
              "buttonText": "Upload files",
              "itemsLimit": 2,
              "fileUploadFormats": [
                "IMAGE",
                "DOCUMENT",
                "MODEL_3D"
              ]
            },
            "_id": "deb3d13b-8235-44e0-bf2d-5c29b2c88250"
          }
        ],
        "_id": "f04086ab-7979-4891-88b1-f9ece950bd0c",
        "_createdDate": "2026-09-15T14:56:10.732Z",
        "_updatedDate": "2026-09-15T14:56:10.732Z"
      }
    },
    {
      "itemMetadata": {
        "originalIndex": 1,
        "success": true,
        "_id": "e0e6bd9f-017e-4abc-8368-a74dac8acd2f"
      },
      "item": {
        "settings": {
          "passingGrade": 70,
          "title": "General Knowledge Final Assessment",
          "attempts": 3
        },
        "revision": "1",
        "fields": [
          {
            "target": "daysInWeek",
            "question": "How many days are in a week?",
            "numeric": {
              "rightAnswer": 7
            },
            "_id": "e203d861-644c-44c7-83aa-d096b5adddec"
          },
          {
            "target": "skyColor",
            "question": "What color is a clear daytime sky?",
            "shortText": {
              "rightAnswer": "blue"
            },
            "_id": "9aff11ad-b740-4893-9449-e6ae1fb8136c"
          },
          {
            "target": "learningGoal",
            "question": "Describe your learning goal.",
            "longText": {},
            "_id": "b283546b-e967-4563-9e91-de9986dcebcb"
          },
          {
            "target": "capitalOfFrance",
            "question": "What is the capital of France?",
            "singleChoice": {
              "rightAnswer": "Paris",
              "options": [
                "Paris",
                "Lyon",
                "Marseille"
              ]
            },
            "_id": "18a985e2-59bf-4aca-adf4-b0bcf632b97b"
          },
          {
            "target": "primeNumbers",
            "question": "Select all prime numbers.",
            "multiChoice": {
              "rightAnswer": [
                "2",
                "3"
              ],
              "options": [
                "2",
                "3",
                "4"
              ]
            },
            "_id": "9799485f-7702-4a1e-9335-f5d99d6fbe35"
          },
          {
            "target": "supportingFiles",
            "question": "Upload supporting files.",
            "fileUpload": {
              "buttonText": "Upload files",
              "itemsLimit": 10,
              "fileUploadFormats": [
                "IMAGE",
                "DOCUMENT",
                "MODEL_3D"
              ]
            },
            "_id": "598a0a03-0f02-4cc8-8fc7-786560166ef2"
          }
        ],
        "_id": "e0e6bd9f-017e-4abc-8368-a74dac8acd2f",
        "_createdDate": "2026-09-15T14:56:10.732Z",
        "_updatedDate": "2026-09-15T14:56:10.732Z"
      }
    }
  ],
  "bulkActionMetadata": {
    "totalSuccesses": 2,
    "totalFailures": 0,
    "undetailedFailures": 0
  }
}
*/

```

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

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


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

---