> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.facebookbusiness.marketing.CreateAudience

- Component: `appmixer.facebookbusiness.marketing.CreateAudience`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.facebookbusiness 3.1.3](https://connectors.appmixer.com/connector/appmixer.facebookbusiness/3.1.3.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.facebookbusiness/3.1.3/component/appmixer.facebookbusiness.marketing.CreateAudience>

Create a new custom audience.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Account ID (`accountId`) | select | Enter your Ad Account ID. |
| Audience Name (`name`) | text | Enter your Custom Audience name. |
| Audience Description (`description`) | textarea | Enter your Custom Audience description. |
| Customer File Source (`customer_file_source`) | select | Source of customer information in the uploaded file. |
| Subtype (`subtype`) | select | Type of custom audience, derived from original data source. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Audience ID (`id`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.facebookbusiness.marketing.CreateAudience",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Create a new custom audience.",
  "auth": {
    "service": "appmixer:facebookbusiness",
    "scope": [
      "ads_management"
    ]
  },
  "quota": {
    "manager": "appmixer:facebookbusiness",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "customer_file_source": {
            "type": "string"
          },
          "subtype": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "customer_file_source"
        ]
      },
      "inspector": {
        "inputs": {
          "accountId": {
            "type": "select",
            "label": "Account ID",
            "index": 1,
            "tooltip": "Enter your Ad Account ID.",
            "source": {
              "url": "/component/appmixer/facebookbusiness/marketing/GetAdAccounts?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "transform": "./GetAdAccounts#toSelectArray"
              }
            }
          },
          "name": {
            "type": "text",
            "label": "Audience Name",
            "index": 2,
            "tooltip": "Enter your Custom Audience name."
          },
          "description": {
            "type": "textarea",
            "label": "Audience Description",
            "index": 3,
            "tooltip": "Enter your Custom Audience description."
          },
          "customer_file_source": {
            "type": "select",
            "label": "Customer File Source",
            "index": 4,
            "tooltip": "Source of customer information in the uploaded file.",
            "defaultValue": "USER_PROVIDED_ONLY",
            "options": [
              {
                "value": "USER_PROVIDED_ONLY",
                "label": "User Provided Only"
              },
              {
                "value": "PARTNER_PROVIDED_ONLY",
                "label": "Partner Provided Only"
              },
              {
                "value": "BOTH_USER_AND_PARTNER_PROVIDED",
                "label": "Both User and Partner Provided"
              }
            ]
          },
          "subtype": {
            "type": "select",
            "label": "Subtype",
            "index": 5,
            "tooltip": "Type of custom audience, derived from original data source.",
            "defaultValue": "CUSTOM",
            "options": [
              {
                "value": "CUSTOM",
                "label": "CUSTOM"
              },
              {
                "value": "PRIMARY",
                "label": "PRIMARY"
              },
              {
                "value": "WEBSITE",
                "label": "WEBSITE"
              },
              {
                "value": "APP",
                "label": "APP"
              },
              {
                "value": "OFFLINE_CONVERSION",
                "label": "OFFLINE_CONVERSION"
              },
              {
                "value": "CLAIM",
                "label": "CLAIM"
              },
              {
                "value": "MANAGED",
                "label": "MANAGED"
              },
              {
                "value": "PARTNER",
                "label": "PARTNER"
              },
              {
                "value": "VIDEO",
                "label": "VIDEO"
              },
              {
                "value": "LOOKALIKE",
                "label": "LOOKALIKE"
              },
              {
                "value": "ENGAGEMENT",
                "label": "ENGAGEMENT"
              },
              {
                "value": "BAG_OF_ACCOUNTS",
                "label": "BAG_OF_ACCOUNTS"
              },
              {
                "value": "STUDY_RULE_AUDIENCE",
                "label": "STUDY_RULE_AUDIENCE"
              },
              {
                "value": "FOX",
                "label": "FOX"
              },
              {
                "value": "MEASUREMENT",
                "label": "MEASUREMENT"
              },
              {
                "value": "REGULATED_CATEGORIES_AUDIENCE",
                "label": "REGULATED_CATEGORIES_AUDIENCE"
              },
              {
                "value": "BIDDING",
                "label": "BIDDING"
              },
              {
                "value": "SUBSCRIBER_SEGMENT",
                "label": "SUBSCRIBER_SEGMENT"
              },
              {
                "value": "EXCLUSION",
                "label": "EXCLUSION"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "value": "id",
          "label": "Audience ID",
          "schema": {
            "type": "string",
            "example": "23851234567890123"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
