> 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

# GetIntakeForm

# Package: contentCollector

# Namespace: IntakeForms

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/content-collector/intake-form-v1/get-intake-form.md

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

## Introduction

Retrieves an intake form by ID.

Returns only intake forms in the caller's account. A valid ID belonging to
another account reads as not found.

By default, `context`, `sourceMaterials`, and `introData` aren't returned. To
retrieve them, include `CONTEXT`, `SOURCE_MATERIALS`, or `INTRO_DATA` in
`fields`.

---

## REST API

### Schema

```
 Method: getIntakeForm
 Description: Retrieves an intake form by GUID.  Returns only intake forms in the caller's account. A valid GUID belonging to another account reads as not found.  By default, `context`, `sourceMaterials`, and `introData` aren't returned. To retrieve them, include `CONTEXT`, `SOURCE_MATERIALS`, or `INTRO_DATA` in `fields`.
 URL: https://www.wixapis.com/partners/content-collector/v1/intake-forms/{intakeFormId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  intakeFormId
 Method parameters: 
   query param name: fields | type: array<fields> | description: Additional fields to return. By default, `context`, `sourceMaterials`, and `introData` aren't returned.  | validation: maxItems 5
                 - enum:
                 -     CONTEXT: Returns `context`.
                 -     SOURCE_MATERIALS: Returns `sourceMaterials`.
                 -     INTRO_DATA: Returns `introData`.
   param name: intakeFormId | type:   none | required: true 
 Return type: GetIntakeFormResponse
  - name: intakeForm | type: IntakeForm | description: Retrieved intake form.  
     - name: id | type: string | description: Intake form GUID.  | read-only: true | 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.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the intake form was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the intake form was last updated.  | read-only: true | validation: format date-time
     - name: context | type: string | description: AI-generated background context for the intake form, in free-form text. Used to tailor the questionnaire. Stored and returned as is.  Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
     - name: clientName | type: string | description: Name of the client the intake form is for.  | validation: maxLength 42
     - name: project | type: Project | description: Client project the intake form collects content for.  
        - name: name | type: string | description: Project name.  | validation: maxLength 255
        - name: industry | type: Industry | description: Industry the project belongs to.  
             - enum: BEAUTY_AND_WELLNESS, CREATIVE, EDUCATION, FIELD_AND_CONSTRUCTION, FITNESS, HEALTH, FOOD_AND_BEVERAGE, NON_PROFIT_AND_COMMUNITIES, REAL_ESTATE, SCIENCE_AND_TECHNOLOGY, TRAVEL_AND_TOURISM, CONSULTING_AND_MARKETING, LEGAL_AND_FINANCE, FASHION_AND_APPAREL, ENTERTAINMENT, RESTAURANT, TECHNOLOGY, WELLNESS, CONSULTING, HEALTHCARE, OTHER
     - name: userId | type: string | description: GUID of the user who owns the intake form. Set automatically from the caller's identity when the intake form is created.  | read-only: true | validation: format GUID
     - name: sourceMaterials | type: SourceMaterials | description: Partner-provided materials used to generate the questionnaire.  Returned only when `SOURCE_MATERIALS` is included in the request's `fields`.  
        - name: projectMaterials | type: string | description: Project description provided by the partner.  | validation: maxLength 2147483647
        - name: filesMarkdown | type: string | description: Content of the files the partner uploaded, converted to Markdown.  | validation: maxLength 2147483647
        - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the partner.  | validation: maxLength 2147483647
     - name: clientFormInteraction | type: ClientFormInteraction | description: The client's interaction with the form: when they last edited it and when they submitted it. The form is considered submitted only when `clientFormInteraction.submissionDate` is set.  Updated asynchronously after the client edits or submits the form, so it may be empty for a short time afterward.  | read-only: true 
        - name: submissionDate | type: string | description: Date and time the client submitted the form. The form is considered submitted only when this field is set.  | read-only: true | validation: format date-time
        - name: lastEditDate | type: string | description: Date and time the client last edited the form.  | read-only: true | validation: format date-time
     - name: accountId | type: string | description: GUID of the partner account that owns the intake form. Set automatically from the caller's identity when the intake form is created.  | read-only: true | validation: format GUID
     - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the intake 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 intake form is shared with. A client must sign in with one of these email addresses to open the form.  Adding the first email address shares the form and sets `publishDate`. Removing all email addresses clears `publishDate`.  | validation: maxItems 20, format EMAIL
     - name: customFields | type: object | description: Custom data to store with the intake form. Accepts any JSON structure, isn't validated, 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 intake form was shared with clients, meaning when the first email address was added to `clientEmails`.  Cleared when all email addresses are removed from `clientEmails`, and set again when email addresses are added back. Set asynchronously, shortly after the change.  | read-only: true | validation: format date-time
     - name: introData | type: IntroData | description: Title and message shown to the client on the intro screen, before they sign in.  Returned only when `INTRO_DATA` is included in the request's `fields`.  
        - name: title | type: string | description: Welcome headline shown at the top of the intro screen.  When not set, the client sees the default headline. An empty string shows no headline.  | validation: maxLength 120
        - name: message | type: string | description: Welcome message shown on the intro screen, in rich-text HTML.  | validation: maxLength 2147483647
     - name: language | type: string | description: Language of the form's content and client experience, as a 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. For example, `en`, `de`, or `ja`.  Can be set only when the intake form is created.  Default: `en`  | validation: format LANGUAGE, immutable


```

### Examples

### Get Intake Form
Retrieves an intake form by ID, including its AI-generated context

```curl
curl -X GET \
'https://www.wixapis.com/partners/content-collector/v1/intake-forms/8046df3c-7575-4098-a5ab-c91ad8f33c47?fields=CONTEXT' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.contentCollectorIntakeForms.contentCollectorIntakeForms.getIntakeForm(intakeFormId, options)
 Description: Retrieves an intake form by GUID.  Returns only intake forms in the caller's account. A valid GUID belonging to another account reads as not found.  By default, `context`, `sourceMaterials`, and `introData` aren't returned. To retrieve them, include `CONTEXT`, `SOURCE_MATERIALS`, or `INTRO_DATA` in `fields`.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  intakeFormId
 Method parameters: 
   param name: intakeFormId | type: string | description: GUID of the intake form to retrieve. | required: true | validation: format GUID
   param name: options | type: GetIntakeFormOptions  none  
        - name: fields | type: array<RequestedFields> | description: Additional fields to return. By default, `context`, `sourceMaterials`, and `introData` aren't returned.  | validation: maxItems 5
             - enum:
             -     CONTEXT: Returns `context`.
             -     SOURCE_MATERIALS: Returns `sourceMaterials`.
             -     INTRO_DATA: Returns `introData`.
 Return type: PROMISE<IntakeForm>
  - name: _id | type: string | description: Intake form GUID.  | read-only: true | 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.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the intake form was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the intake form was last updated.  | read-only: true 
  - name: context | type: string | description: AI-generated background context for the intake form, in free-form text. Used to tailor the questionnaire. Stored and returned as is.  Returned only when `CONTEXT` is included in the request's `fields`.  | validation: maxLength 2147483647
  - name: clientName | type: string | description: Name of the client the intake form is for.  | validation: maxLength 42
  - name: project | type: Project | description: Client project the intake form collects content for.  
     - name: name | type: string | description: Project name.  | validation: maxLength 255
     - name: industry | type: Industry | description: Industry the project belongs to.  
         - enum: BEAUTY_AND_WELLNESS, CREATIVE, EDUCATION, FIELD_AND_CONSTRUCTION, FITNESS, HEALTH, FOOD_AND_BEVERAGE, NON_PROFIT_AND_COMMUNITIES, REAL_ESTATE, SCIENCE_AND_TECHNOLOGY, TRAVEL_AND_TOURISM, CONSULTING_AND_MARKETING, LEGAL_AND_FINANCE, FASHION_AND_APPAREL, ENTERTAINMENT, RESTAURANT, TECHNOLOGY, WELLNESS, CONSULTING, HEALTHCARE, OTHER
  - name: userId | type: string | description: GUID of the user who owns the intake form. Set automatically from the caller's identity when the intake form is created.  | read-only: true | validation: format GUID
  - name: sourceMaterials | type: SourceMaterials | description: Partner-provided materials used to generate the questionnaire.  Returned only when `SOURCE_MATERIALS` is included in the request's `fields`.  
     - name: projectMaterials | type: string | description: Project description provided by the partner.  | validation: maxLength 2147483647
     - name: filesMarkdown | type: string | description: Content of the files the partner uploaded, converted to Markdown.  | validation: maxLength 2147483647
     - name: existingQuestionnaire | type: string | description: Existing questionnaire provided by the partner.  | validation: maxLength 2147483647
  - name: clientFormInteraction | type: ClientFormInteraction | description: The client's interaction with the form: when they last edited it and when they submitted it. The form is considered submitted only when `clientFormInteraction.submissionDate` is set.  Updated asynchronously after the client edits or submits the form, so it may be empty for a short time afterward.  | read-only: true 
     - name: submissionDate | type: Date | description: Date and time the client submitted the form. The form is considered submitted only when this field is set.  | read-only: true 
     - name: lastEditDate | type: Date | description: Date and time the client last edited the form.  | read-only: true 
  - name: accountId | type: string | description: GUID of the partner account that owns the intake form. Set automatically from the caller's identity when the intake form is created.  | read-only: true | validation: format GUID
  - name: teamMemberIds | type: array<string> | description: IDs of the team members to notify about the intake 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 intake form is shared with. A client must sign in with one of these email addresses to open the form.  Adding the first email address shares the form and sets `publishDate`. Removing all email addresses clears `publishDate`.  | validation: maxItems 20, format EMAIL
  - name: customFields | type: object | description: Custom data to store with the intake form. Accepts any JSON structure, isn't validated, 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 intake form was shared with clients, meaning when the first email address was added to `clientEmails`.  Cleared when all email addresses are removed from `clientEmails`, and set again when email addresses are added back. Set asynchronously, shortly after the change.  | read-only: true 
  - name: introData | type: IntroData | description: Title and message shown to the client on the intro screen, before they sign in.  Returned only when `INTRO_DATA` is included in the request's `fields`.  
     - name: title | type: string | description: Welcome headline shown at the top of the intro screen.  When not set, the client sees the default headline. An empty string shows no headline.  | validation: maxLength 120
     - name: message | type: string | description: Welcome message shown on the intro screen, in rich-text HTML.  | validation: maxLength 2147483647
  - name: language | type: string | description: Language of the form's content and client experience, as a 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. For example, `en`, `de`, or `ja`.  Can be set only when the intake form is created.  Default: `en`  | validation: format LANGUAGE, immutable


```

### Examples

### Get an intake form
Retrieves an intake form by ID, including its AI-generated context

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

async function getIntakeForm() {
  const response = await contentCollectorIntakeForms.getIntakeForm(
    "8046df3c-7575-4098-a5ab-c91ad8f33c47",
    {
      fields: ["CONTEXT"],
    }
  );
}

/* Promise resolves to:
 * {
 *   "_id": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
 *   "revision": "3",
 *   "_createdDate": "2024-03-18T17:22:10.299Z",
 *   "_updatedDate": "2024-03-19T09:14:02.118Z",
 *   "clientName": "Jane Cohen",
 *   "project": {
 *     "name": "Bloom Bakery Website",
 *     "industry": "FOOD_AND_BEVERAGE"
 *   },
 *   "context": "Bloom Bakery is a family-run business focused on artisan sourdough...",
 *   "clientEmails": ["jane@bloombakery.com"],
 *   "userId": "3f9c2e71-8a4b-4d6e-b5c0-7e1d9a2f4c86",
 *   "accountId": "c42e8b19-6d3a-4f75-9e0b-5a81d7c3f2e4",
 *   "publishDate": "2024-03-19T09:14:02.118Z",
 *   "clientFormInteraction": {
 *     "submissionDate": "2024-03-20T11:05:44.000Z",
 *     "lastEditDate": "2024-03-20T11:05:44.000Z"
 *   }
 * }
 */

```

### getIntakeForm (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 { 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 getIntakeForm(intakeFormId,options) {
  const response = await myWixClient.contentCollectorIntakeForms.getIntakeForm(intakeFormId,options);
};
```

---