> 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

# BulkCreateIntakeForms

# Package: contentCollector

# Namespace: IntakeForms

# Method link: https://dev.wix.com/docs/api-reference/account-level/partners/content-collector/intake-form-v1/bulk-create-intake-forms.md

## Permission Scopes:
SCOPE.PARTNERS.CONTENT-COLLECTOR: SCOPE.PARTNERS.CONTENT-COLLECTOR

## Introduction

Creates multiple intake forms in a single request.

The owner (`userId`) and `accountId` of each intake form are set
automatically from the caller's identity.

Set `returnEntity` to `true` to include the created intake forms in the
response.

To create a single intake form, call [Create Intake Form](https://dev.wix.com/docs/api-reference/account-level/partners/content-collector/intake-form-v1/create-intake-form.md).

---

## REST API

### Schema

```
 Method: bulkCreateIntakeForms
 Description: Creates multiple intake forms in a single request.  The owner (`userId`) and `accountId` of each intake form are set automatically from the caller's identity.  Set `returnEntity` to `true` to include the created intake forms in the response.  To create a single intake form, call [Create Intake Form](https://dev.wix.com/docs/api-reference/account-level/partners/content-collector/intake-form-v1/create-intake-form.md).
 URL: https://www.wixapis.com/partners/content-collector/v1/intake-forms/v1/bulk/intake-forms/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:  intakeForms
 Method parameters: 
   param name: fields | type: array<fields> | description: Fields to include in the response.  | validation: maxItems 5
                 - enum: CONTEXT, SOURCE_MATERIALS
   param name: intakeForms | type: array<intakeForms> | description: List of IntakeForms to be created | required: true | validation: minItems 1, maxItems 100
              - name: context | type: string | description: AI-generated background context for the intake form, stored as free-form text. Used as input when generating the questionnaire; stored and returned as-is and not otherwise interpreted by this service. Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
              - name: clientName | type: string | description: Client name.  | validation: maxLength 42
              - name: project | type: Project | description: Project information.  
                 - name: name | type: string | description: Project name.  | validation: maxLength 255
                 - name: industry | type: Industry | description: Industry vertical.  
                         - enum: RESTAURANT, TECHNOLOGY, TRAVEL_AND_TOURISM, WELLNESS, FITNESS, CONSULTING, FOOD_AND_BEVERAGE, EDUCATION, HEALTHCARE, REAL_ESTATE, OTHER
              - name: sourceMaterials | type: SourceMaterials | description: Source materials used as input for AI generation.  
                 - name: projectMaterials | type: string | description: User-provided project description used as input for AI generation.  | validation: maxLength 2147483647
                 - name: filesMarkdown | type: string | description: Markdown rendering of the files uploaded by the user, used as input for AI generation.  | validation: maxLength 2147483647
                 - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the user, used as input for AI generation.  | validation: maxLength 2147483647
              - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the form. Listed team members are notified through Wix Automations when the client submits the form or adds a note to it.  | validation: maxItems 50, format GUID
              - name: clientEmails | type: array<string> | description: Email addresses of the clients the form is shared with. Adding the first email shares the form and stamps `publishDate`; removing all emails clears `publishDate` (see `publishDate`). A client can retrieve the form through `GetClientIntakeForm` only if their email is listed here.  | validation: maxItems 20, format EMAIL
              - name: customFields | type: object | description: Free-form custom data stored verbatim with the intake form. Accepts any JSON structure, isn't interpreted or validated by the service, and is returned as-is. Use it to attach your own structured data to an intake form.  
   param name: returnEntity | type: returnEntity | description: set to `true` if you wish to receive back the created IntakeForms in the response  
 Return type: BulkCreateIntakeFormsResponse
  - name: results | type: array<BulkIntakeFormResult> | description: List of the bulk create operation results including the IntakeForms and metadata.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single create operation  
        - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - 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: IntakeForm | description: Only exists if `returnEntity` was set to true in the request  
        - name: id | type: string | description: Intake form GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the intake form is updated. To prevent conflicting changes, the current revision must be passed when updating the intake form.  Ignored when creating an intake form.  | validation: format int64
        - name: createdDate | type: string | description: Date and time the IntakeForm was created.  | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the IntakeForm was last updated.  | validation: format date-time
        - name: context | type: string | description: AI-generated background context for the intake form, stored as free-form text. Used as input when generating the questionnaire; stored and returned as-is and not otherwise interpreted by this service. Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
        - name: clientName | type: string | description: Client name.  | validation: maxLength 42
        - name: project | type: Project | description: Project information.  
           - name: name | type: string | description: Project name.  | validation: maxLength 255
           - name: industry | type: Industry | description: Industry vertical.  
                 - enum: RESTAURANT, TECHNOLOGY, TRAVEL_AND_TOURISM, WELLNESS, FITNESS, CONSULTING, FOOD_AND_BEVERAGE, EDUCATION, HEALTHCARE, REAL_ESTATE, OTHER
        - name: userId | type: string | description: Owner user GUID.  | validation: format GUID
        - name: sourceMaterials | type: SourceMaterials | description: Source materials used as input for AI generation.  
           - name: projectMaterials | type: string | description: User-provided project description used as input for AI generation.  | validation: maxLength 2147483647
           - name: filesMarkdown | type: string | description: Markdown rendering of the files uploaded by the user, used as input for AI generation.  | validation: maxLength 2147483647
           - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the user, used as input for AI generation.  | validation: maxLength 2147483647
        - name: submission | type: Submission | description: Submission state of the form. Populated asynchronously from Wix Forms submission events once the client submits, so these fields may be empty until a submission has been received and processed.  
           - name: submittedDate | type: string | description: Date and time the client submitted the form.  | validation: format date-time
           - name: lastEditDate | type: string | description: Date and time the client last edited the form.  | validation: format date-time
        - name: accountId | type: string | description: Account GUID.  | validation: format GUID
        - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the form. Listed team members are notified through Wix Automations when the client submits the form or adds a note to it.  | validation: maxItems 50, format GUID
        - name: clientEmails | type: array<string> | description: Email addresses of the clients the form is shared with. Adding the first email shares the form and stamps `publishDate`; removing all emails clears `publishDate` (see `publishDate`). A client can retrieve the form through `GetClientIntakeForm` only if their email is listed here.  | validation: maxItems 20, format EMAIL
        - name: customFields | type: object | description: Free-form custom data stored verbatim with the intake form. Accepts any JSON structure, isn't interpreted or validated by the service, and is returned as-is. Use it to attach your own structured data to an intake form.  
        - name: publishDate | type: string | description: Date and time the form was first shared with clients (the first time client emails were added). Cleared if all client emails are removed; re-stamped if client emails are added again.  | validation: format date-time
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk create operation  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0


```

### Examples

### Bulk Create Intake Forms
Creates multiple intake forms in a single request

```curl
curl -X POST \
  'https://www.wixapis.com/intake-forms/v1/bulk/intake-forms/create' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "intakeForms": [
      { "clientName": "Jane Cohen", "project": { "name": "Bloom Bakery Website", "industry": "FOOD_AND_BEVERAGE" } },
      { "clientName": "Avi Levi", "project": { "name": "Peak Fitness App", "industry": "FITNESS" } }
    ],
    "returnEntity": true
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.contentCollectorIntakeForms.contentCollectorIntakeForms.bulkCreateIntakeForms(intakeForms, options)
 Description: Creates multiple intake forms in a single request.  The owner (`userId`) and `accountId` of each intake form are set automatically from the caller's identity.  Set `returnEntity` to `true` to include the created intake forms in the response.  To create a single intake form, call [Create Intake Form](https://dev.wix.com/docs/api-reference/account-level/partners/content-collector/intake-form-v1/create-intake-form.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  intakeForms
 Method parameters: 
   param name: intakeForms | type: array<array> | description: List of IntakeForms to be created | required: true | validation: minItems 1, maxItems 100
              - name: context | type: string | description: AI-generated background context for the intake form, stored as free-form text. Used as input when generating the questionnaire; stored and returned as-is and not otherwise interpreted by this service. Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
              - name: clientName | type: string | description: Client name.  | validation: maxLength 42
              - name: project | type: Project | description: Project information.  
                 - name: name | type: string | description: Project name.  | validation: maxLength 255
                 - name: industry | type: Industry | description: Industry vertical.  
                         - enum: RESTAURANT, TECHNOLOGY, TRAVEL_AND_TOURISM, WELLNESS, FITNESS, CONSULTING, FOOD_AND_BEVERAGE, EDUCATION, HEALTHCARE, REAL_ESTATE, OTHER
              - name: sourceMaterials | type: SourceMaterials | description: Source materials used as input for AI generation.  
                 - name: projectMaterials | type: string | description: User-provided project description used as input for AI generation.  | validation: maxLength 2147483647
                 - name: filesMarkdown | type: string | description: Markdown rendering of the files uploaded by the user, used as input for AI generation.  | validation: maxLength 2147483647
                 - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the user, used as input for AI generation.  | validation: maxLength 2147483647
              - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the form. Listed team members are notified through Wix Automations when the client submits the form or adds a note to it.  | validation: maxItems 50, format GUID
              - name: clientEmails | type: array<string> | description: Email addresses of the clients the form is shared with. Adding the first email shares the form and stamps `publishDate`; removing all emails clears `publishDate` (see `publishDate`). A client can retrieve the form through `GetClientIntakeForm` only if their email is listed here.  | validation: maxItems 20, format EMAIL
              - name: customFields | type: object | description: Free-form custom data stored verbatim with the intake form. Accepts any JSON structure, isn't interpreted or validated by the service, and is returned as-is. Use it to attach your own structured data to an intake form.  
   param name: options | type: BulkCreateIntakeFormsOptions  none  
        - name: returnEntity | type: boolean | description: set to `true` if you wish to receive back the created IntakeForms in the response  
        - name: fields | type: array<RequestedFields> | description: Fields to include in the response.  | validation: maxItems 5
             - enum: CONTEXT, SOURCE_MATERIALS
 Return type: PROMISE<BulkCreateIntakeFormsResponse>
  - name: results | type: array<BulkIntakeFormResult> | description: List of the bulk create operation results including the IntakeForms and metadata.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single create operation  
        - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - 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: IntakeForm | description: Only exists if `returnEntity` was set to true in the request  
        - name: _id | type: string | description: Intake form GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the intake form is updated. To prevent conflicting changes, the current revision must be passed when updating the intake form.  Ignored when creating an intake form.  | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the IntakeForm was created.  
        - name: _updatedDate | type: Date | description: Date and time the IntakeForm was last updated.  
        - name: context | type: string | description: AI-generated background context for the intake form, stored as free-form text. Used as input when generating the questionnaire; stored and returned as-is and not otherwise interpreted by this service. Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
        - name: clientName | type: string | description: Client name.  | validation: maxLength 42
        - name: project | type: Project | description: Project information.  
           - name: name | type: string | description: Project name.  | validation: maxLength 255
           - name: industry | type: Industry | description: Industry vertical.  
                 - enum: RESTAURANT, TECHNOLOGY, TRAVEL_AND_TOURISM, WELLNESS, FITNESS, CONSULTING, FOOD_AND_BEVERAGE, EDUCATION, HEALTHCARE, REAL_ESTATE, OTHER
        - name: userId | type: string | description: Owner user GUID.  | validation: format GUID
        - name: sourceMaterials | type: SourceMaterials | description: Source materials used as input for AI generation.  
           - name: projectMaterials | type: string | description: User-provided project description used as input for AI generation.  | validation: maxLength 2147483647
           - name: filesMarkdown | type: string | description: Markdown rendering of the files uploaded by the user, used as input for AI generation.  | validation: maxLength 2147483647
           - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the user, used as input for AI generation.  | validation: maxLength 2147483647
        - name: submission | type: Submission | description: Submission state of the form. Populated asynchronously from Wix Forms submission events once the client submits, so these fields may be empty until a submission has been received and processed.  
           - name: submittedDate | type: Date | description: Date and time the client submitted the form.  
           - name: lastEditDate | type: Date | description: Date and time the client last edited the form.  
        - name: accountId | type: string | description: Account GUID.  | validation: format GUID
        - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the form. Listed team members are notified through Wix Automations when the client submits the form or adds a note to it.  | validation: maxItems 50, format GUID
        - name: clientEmails | type: array<string> | description: Email addresses of the clients the form is shared with. Adding the first email shares the form and stamps `publishDate`; removing all emails clears `publishDate` (see `publishDate`). A client can retrieve the form through `GetClientIntakeForm` only if their email is listed here.  | validation: maxItems 20, format EMAIL
        - name: customFields | type: object | description: Free-form custom data stored verbatim with the intake form. Accepts any JSON structure, isn't interpreted or validated by the service, and is returned as-is. Use it to attach your own structured data to an intake form.  
        - name: publishDate | type: Date | description: Date and time the form was first shared with clients (the first time client emails were added). Cleared if all client emails are removed; re-stamped if client emails are added again.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk create operation  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0


```

### Examples

### Bulk create intake forms
Creates multiple intake forms in a single request

```javascript
import { contentCollectorIntakeForms } from "@wix/content-collector-intake-forms";

const intakeForms = [
  {
    clientName: "Jane Cohen",
    project: {
      name: "Bloom Bakery Website",
      industry: contentCollectorIntakeForms.Industry.FOOD_AND_BEVERAGE,
    },
  },
  {
    clientName: "Avi Levi",
    project: {
      name: "Peak Fitness App",
      industry: contentCollectorIntakeForms.Industry.FITNESS,
    },
  },
];

const options = {
  returnEntity: true,
};

async function bulkCreateIntakeForms() {
  const response = await contentCollectorIntakeForms.bulkCreateIntakeForms(
    intakeForms,
    options
  );
}

```

### bulkCreateIntakeForms (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 { contentCollectorIntakeForms } from '@wix/content-collector-intake-forms';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function bulkCreateIntakeForms(intakeForms,options) {
  const response = await myWixClient.contentCollectorIntakeForms.bulkCreateIntakeForms(intakeForms,options);
};
```

---