> 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

# CreateFunctionBuilderlessProduction

# Package: functions

# Namespace: FunctionBuilderlessProductions

# Method link: https://dev.wix.com/docs/api-reference/business-management/functions/builderless-productions/create-function-builderless-production.md

## Permission Scopes:
Manage Functions: SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS

## Introduction

Creates a builderless function production.

This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration).

You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters:
- `namespace`: `wix.function_template.form`
- `formIds`: An array that contains the function template's `formTemplateExtensionId`
- `kind`: `EXTENSION`

---

## REST API

### Schema

```
 Method: createFunctionBuilderlessProduction
 Description: Creates a builderless function production.  This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration).  You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`
 URL: https://www.wixapis.com/functions/v1/function-builderless-productions
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  functionBuilderlessProduction, functionBuilderlessProduction.appId, functionBuilderlessProduction.function.functionTemplateExtensionId, functionBuilderlessProduction.function.formTemplateExtensionId
 Method parameters: 
   param name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: A function builderless production defines a function and its related entities. | required: true 
        - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. | required: true | validation: format GUID
        - name: formValues | type: Map<string,Value> | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`  | validation: format map
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
        - name: function | type: Function | description: Function created from the function builderless production.  
           - name: functionTemplateExtensionId | type: string | description: Function template extension id | required: true | validation: format GUID
           - name: formTemplateExtensionId | type: string | description: Form template extension id | required: true | validation: format GUID
        - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function.  
           - name: configuration | type: object | description: Function SPI configuration dev center component payload.  
 Return type: CreateFunctionBuilderlessProductionResponse
  - name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: The created function builderless production.  
     - name: id | type: string | description: Function builderless production GUID. This is the same as the associated function's GUID.  | read-only: true | validation: format GUID
     - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on.  | validation: format GUID
     - name: formValues | type: Map<string,Value> | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`  | validation: format map
        - ONE-OF: 
           - name: nullValue | type:  | description:   
           - name: numberValue | type: number | description:   
           - name: stringValue | type: string | description:   
           - name: boolValue | type: boolean | description:   
           - name: structValue | type: object | description:   
           - name: listValue | type: ListValue | description:   
              - name: values | type: array<Value> | description:   
     - name: function | type: Function | description: Function created from the function builderless production.  
        - name: id | type: string | description: Function GUID.  | read-only: true | validation: format GUID
        - name: createdDate | type: string | description: Date and time the function was created.  | read-only: true | validation: format date-time
        - name: functionExtensionId | type: string | description: The function's app extension GUID.  | read-only: true | validation: format GUID
        - name: functionName | type: string | description: Function name.  | read-only: true | validation: maxLength 100
        - name: activationStatus | type: ActivationStatus | description: Activation status  | read-only: true 
             - enum:
             -     ACTIVE: Function is activated.
             -     INACTIVE: Function is deactivated.
             -     DRAFT: Function is saved but has never been activated.
        - name: appId | type: string | description: GUID of the app that defines the function.  | read-only: true | validation: format GUID
        - name: functionExtensionName | type: string | description: The function's app extension name.  | read-only: true | validation: minLength 1, maxLength 100
        - name: functionTemplateExtensionId | type: string | description: Function template extension id  | validation: format GUID
        - name: formTemplateExtensionId | type: string | description: Form template extension id  | validation: format GUID
        - name: updatedDate | type: string | description: Date and time the function was last updated.  | read-only: true | validation: format date-time
        - name: revision | type: string | description: Revision number that increases with every update.  | read-only: true | validation: format int64
     - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function.  
        - name: id | type: string | description: SpiConfiguration GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: SpiConfiguration revision.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the SpiConfiguration was created.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the SpiConfiguration was last updated.  | read-only: true | validation: format date-time
        - name: functionId | type: string | description: Function GUID  | read-only: true | validation: format GUID
        - name: configuration | type: object | description: Function SPI configuration dev center component payload.  
     - name: automationIds | type: array<string> | description: Automations created from the function builderless production.  | read-only: true | validation: maxItems 100, format GUID


```

### Examples

### Create Function Builderless Production
```curl
curl -X POST \
  https://www.wixapis.com/functions/v1/function-builderless-productions \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
          "functionBuilderlessProduction": {
              "appId": "d49080e4-7b60-4dd4-b18a-f7ba7856bf27",
              "function": {
                "functionTemplateExtensionId": "545d1812-601f-4867-9f62-32a077e7d3f0",
                "formTemplateExtensionId": "5db3dbf9-6f02-442d-9eb8-4276461648e9"
              },
              "formValues": {
                  "config.description": "This is service plugin"
              }
          }
      }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.functions.functionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction)
 Description: Creates a builderless function production.  This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration).  You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  functionBuilderlessProduction, functionBuilderlessProduction.appId, functionBuilderlessProduction.function.functionTemplateExtensionId, functionBuilderlessProduction.function.formTemplateExtensionId
 Method parameters: 
   param name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: A function builderless production defines a function and its related entities. | required: true 
        - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. | required: true | validation: format GUID
        - name: formValues | type: Map<string,Value> | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`  | validation: format map
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
        - name: function | type: Function | description: Function created from the function builderless production.  
           - name: functionTemplateExtensionId | type: string | description: Function template extension id | required: true | validation: format GUID
           - name: formTemplateExtensionId | type: string | description: Form template extension id | required: true | validation: format GUID
        - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function.  
           - name: configuration | type: object | description: Function SPI configuration dev center component payload.  
 Return type: PROMISE<FunctionBuilderlessProduction>
  - name: _id | type: string | description: Function builderless production GUID. This is the same as the associated function's GUID.  | read-only: true | validation: format GUID
  - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on.  | validation: format GUID
  - name: formValues | type: Map<string,Value> | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION`  | validation: format map
     - ONE-OF: 
        - name: nullValue | type:  | description:   
        - name: numberValue | type: number | description:   
        - name: stringValue | type: string | description:   
        - name: boolValue | type: boolean | description:   
        - name: structValue | type: object | description:   
        - name: listValue | type: ListValue | description:   
           - name: values | type: array<Value> | description:   
  - name: function | type: Function | description: Function created from the function builderless production.  
     - name: _id | type: string | description: Function GUID.  | read-only: true | validation: format GUID
     - name: _createdDate | type: Date | description: Date and time the function was created.  | read-only: true 
     - name: functionExtensionId | type: string | description: The function's app extension GUID.  | read-only: true | validation: format GUID
     - name: functionName | type: string | description: Function name.  | read-only: true | validation: maxLength 100
     - name: activationStatus | type: ActivationStatus | description: Activation status  | read-only: true 
         - enum:
         -     ACTIVE: Function is activated.
         -     INACTIVE: Function is deactivated.
         -     DRAFT: Function is saved but has never been activated.
     - name: appId | type: string | description: GUID of the app that defines the function.  | read-only: true | validation: format GUID
     - name: functionExtensionName | type: string | description: The function's app extension name.  | read-only: true | validation: minLength 1, maxLength 100
     - name: functionTemplateExtensionId | type: string | description: Function template extension id  | validation: format GUID
     - name: formTemplateExtensionId | type: string | description: Form template extension id  | validation: format GUID
     - name: _updatedDate | type: Date | description: Date and time the function was last updated.  | read-only: true 
     - name: revision | type: string | description: Revision number that increases with every update.  | read-only: true | validation: format int64
  - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function.  
     - name: _id | type: string | description: SpiConfiguration GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: SpiConfiguration revision.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the SpiConfiguration was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the SpiConfiguration was last updated.  | read-only: true 
     - name: functionId | type: string | description: Function GUID  | read-only: true | validation: format GUID
     - name: configuration | type: object | description: Function SPI configuration dev center component payload.  
  - name: automationIds | type: array<string> | description: Automations created from the function builderless production.  | read-only: true | validation: maxItems 100, format GUID


```

### Examples

### createFunctionBuilderlessProduction
```javascript
import { functionBuilderlessProductions } from '@wix/functions';

async function createFunctionBuilderlessProduction(functionBuilderlessProduction) {
  const response = await functionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction);
};
```

### createFunctionBuilderlessProduction (with elevated permissions)
```javascript
import { functionBuilderlessProductions } from '@wix/functions';
import { auth } from '@wix/essentials';

async function myCreateFunctionBuilderlessProductionMethod(functionBuilderlessProduction) {
  const elevatedCreateFunctionBuilderlessProduction = auth.elevate(functionBuilderlessProductions.createFunctionBuilderlessProduction);
  const response = await elevatedCreateFunctionBuilderlessProduction(functionBuilderlessProduction);
}
```

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

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


async function createFunctionBuilderlessProduction(functionBuilderlessProduction) {
  const response = await myWixClient.functionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction);
};
```

---