> 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

# UpsertMarketingSettings

# Package: marketingPlan

# Namespace: MarketingSettingsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/marketing-plan/marketing-settings-v1/upsert-marketing-settings.md

## Permission Scopes:
Manage Marketing Plans: SCOPE.PROMOTE.MANAGE-MARKETING-PLAN

## Introduction

Creates or updates the site's marketing settings.

If no settings exist yet, this method creates them. Otherwise it updates only the fields listed
in `fieldMask`; all other fields are left unchanged. Both `marketing_settings` and `field_mask`
are required. Every path listed in `fieldMask` must be present in the `marketingSettings` you
send; listing a path that isn't present returns a `FAILED_PRECONDITION` error. To clear a
field, include it in `fieldMask` and send it explicitly as null or empty.

Changing settings doesn't update an existing plan. After updating settings, regenerate the plan
for the changes to take effect (use Regenerate Marketing Plan with Keyword Research after
changing the content pillars in `topics`).

---

## REST API

### Schema

```
 Method: upsertMarketingSettings
 Description: Creates or updates the site's marketing settings.  If no settings exist yet, this method creates them. Otherwise it updates only the fields listed in `fieldMask`; all other fields are left unchanged. Both `marketing_settings` and `field_mask` are required. Every path listed in `fieldMask` must be present in the `marketingSettings` you send; listing a path that isn't present returns a `FAILED_PRECONDITION` error. To clear a field, include it in `fieldMask` and send it explicitly as null or empty.  Changing settings doesn't update an existing plan. After updating settings, regenerate the plan for the changes to take effect (use Regenerate Marketing Plan with Keyword Research after changing the content pillars in `topics`).
 URL: https://www.wixapis.com/promote/marketing-plan-service/v1/marketing-settings
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  marketingSettings
 Method parameters: 
   param name: marketingSettings | type: MarketingSettings | description: A site's marketing preferences that shape how the AI generates its marketing plan and posts.  Settings are optional: if a site hasn't configured them, sensible defaults are applied automatically when a plan is generated. Owners can customize any combination of fields using the UpsertMarketingSettings method. Settings are shared across all enabled marketing tools unless a tool-specific override is set in `overrides`. | required: true 
        - name: settings | type: Settings | description: Core preferences that apply to all marketing tools unless a tool-specific override is set.  
           - name: toneOfVoice | type: string | description: Writing style description used to shape the voice of generated post captions.  | validation: maxLength 10000
           - name: pointOfView | type: PointOfView | description: Narrative perspective used in generated post captions (first, second, or third person).  
                 - enum:
                 -     FIRST_PERSON: Uses "I", "we", "my", "our".
                 -     SECOND_PERSON: Uses "you", "your".
                 -     THIRD_PERSON: Uses "they", "their", or the business name.
           - name: customContentGuidelines | type: string | description: Free-text instructions that further personalize how content is written, beyond `tone_of_voice`.  | validation: maxLength 5000
           - name: topics | type: Topics | description: Content pillars: topics the AI should focus on or avoid when generating posts.  
              - name: included | type: array<string> | description: Topics the AI should actively incorporate into generated content.  | validation: minItems 0, maxItems 50, maxLength 50
              - name: excluded | type: array<string> | description: Topics the AI should avoid in generated content.  | validation: minItems 0, maxItems 50, maxLength 50
              - name: coreTopic | type: string | description: The primary theme that anchors all generated content. Stored but not currently used during generation; the fields that influence generation are `topics.included` and `topics.excluded`.  | validation: maxLength 100
           - name: imageGuidelines | type: string | description: Free-text style instructions applied when generating images for posts.  | validation: maxLength 10000
           - name: marketingPlanGoal | type: MarketingPlanGoal | description: Overall goal of the marketing plan, used to align content strategy across all tools.  
              - ONE-OF: 
                 - name: goalKey | type: PlanGoal | description: A standard goal selected from the available plan goal options.  
                         - enum:
                         -     DRIVE_TRAFFIC: Increase visits to the site.
                         -     BRAND_AWARENESS: Grow recognition and reach of the brand.
                         -     BOOST_SALES: Promote products or services to increase purchases.
                         -     COLLECT_LEADS: Capture contact information from potential customers.
                 - name: customGoal | type: string | description: A free-text goal provided when none of the standard options apply.  | validation: maxLength 400
           - name: socialChannels | type: array<SocialChannel> | description: Social platforms to generate content for. Social post drafts are only produced when `SOCIAL_MARKETING` is included in `marketing_tools`.  | validation: minItems 0, maxItems 10
                 - enum:
                 -     FACEBOOK: Facebook.
                 -     INSTAGRAM: Instagram.
                 -     LINKEDIN: LinkedIn.
                 -     TWITTER: Deprecated: No longer functional as of July 31, 2026.
                 -     PINTEREST: Pinterest.
                 -     GBP: Google Business Profile.
                 -     TIKTOK: TikTok.
           - name: frequency | type: Frequency | description: Posting cadence that acts as a fallback for social marketing only. Per-tool cadences are controlled by `overrides.socialMarketing.frequency`, `overrides.blogs.frequency`, and `overrides.emailMarketing.frequency` (each with its own per-tool default).  
              - name: interval | type: Interval | description: Time unit for the posting cadence (`WEEK`, `MONTH`, or `YEAR`).  
                     - enum:
                     -     WEEK: Per-week cadence.
                     -     MONTH: Per-month cadence.
                     -     YEAR: Per-year cadence.
              - name: count | type: integer | description: Number of posts to produce within each `interval`.  | validation: minimum 1, maximum 30, format int32
           - name: marketingTools | type: array<MarketingTool> | description: Marketing tools enabled in the plan. Social post drafts are only generated when `SOCIAL_MARKETING` is present.  | validation: minItems 0, maxItems 3
                 - enum:
                 -     EMAIL_MARKETING: Email marketing campaigns.
                 -     BLOGS: Blog post creation.
                 -     SOCIAL_MARKETING: Social media post drafts. Must be enabled for social post drafts to be generated.
           - name: businessProfile | type: BusinessProfile | description: Business context (goal, value proposition, and target audience) used to tailor content.  
              - name: businessGoal | type: string | description: What the business is trying to achieve (e.g., grow revenue, build community).  | validation: maxLength 3000
              - name: valueProposition | type: string | description: What makes the business unique and why customers should choose it.  | validation: maxLength 3000
              - name: targetAudience | type: string | description: Description of the intended audience the business wants to reach.  | validation: maxLength 3000
           - name: calendar | type: Calendar | description: Calendars whose events the AI considers when planning marketing activities.  
              - name: ids | type: array<string> | description: IDs of the selected calendar options.  | validation: minItems 0, maxItems 20, format GUID
           - name: imageGenerationSettings | type: ImageGenerationSettings | description: Controls how images are generated for posts (mode and photo sources). These values are stored but aren't currently applied during generation.  
              - name: mode | type: Mode | description: How images are generated for posts.  
                     - enum:
                     -     RAW: Uses existing photos from enabled sources without AI processing.
                     -     AI_ONLY: Generates images entirely with AI, without using existing photos.
                     -     REMIX: Applies AI enhancements to existing photos from enabled sources.
              - name: enabledPhotoSources | type: array<Source> | description: Photo sources the AI may draw from when generating or remixing images.  | validation: minItems 0, maxItems 2
                     - enum:
                     -     PRODUCTS_CATALOG: Photos from the site's product catalog.
                     -     SERVICES_CATALOG: Photos from the site's services catalog.
        - name: overrides | type: SettingsOverrides | description: Per-tool overrides. Unset fields in an override inherit the value from `settings`.  
           - name: emailMarketing | type: Settings | description: Settings applied only when generating email marketing content, overriding the shared settings.  
           - name: blogs | type: Settings | description: Settings applied only when generating blog content, overriding the shared settings.  
           - name: socialMarketing | type: Settings | description: Settings applied only when generating social marketing content, overriding the shared settings.  
 Return type: UpsertMarketingSettingsResponse
  - name: marketingSettings | type: MarketingSettings | description: The marketing settings after the create or update.  
     - name: id | type: string | description: Unique GUID of the marketing settings, equal to the site's MetaSite GUID.  | validation: format GUID
     - name: settings | type: Settings | description: Core preferences that apply to all marketing tools unless a tool-specific override is set.  
        - name: toneOfVoice | type: string | description: Writing style description used to shape the voice of generated post captions.  | validation: maxLength 10000
        - name: pointOfView | type: PointOfView | description: Narrative perspective used in generated post captions (first, second, or third person).  
             - enum:
             -     FIRST_PERSON: Uses "I", "we", "my", "our".
             -     SECOND_PERSON: Uses "you", "your".
             -     THIRD_PERSON: Uses "they", "their", or the business name.
        - name: customContentGuidelines | type: string | description: Free-text instructions that further personalize how content is written, beyond `tone_of_voice`.  | validation: maxLength 5000
        - name: language | type: Language | description: Language and regional variation used for generated content. Read-only; derived from site properties.  
           - name: language | type: string | description: Language for generated content (e.g., `English`, `Spanish`).  | validation: maxLength 50
           - name: regionalVariation | type: string | description: Regional variation of the language (e.g., `Australian` when `language` is `English`).  | validation: maxLength 50
        - name: topics | type: Topics | description: Content pillars: topics the AI should focus on or avoid when generating posts.  
           - name: included | type: array<string> | description: Topics the AI should actively incorporate into generated content.  | validation: minItems 0, maxItems 50, maxLength 50
           - name: excluded | type: array<string> | description: Topics the AI should avoid in generated content.  | validation: minItems 0, maxItems 50, maxLength 50
           - name: coreTopic | type: string | description: The primary theme that anchors all generated content. Stored but not currently used during generation; the fields that influence generation are `topics.included` and `topics.excluded`.  | validation: maxLength 100
        - name: imageGuidelines | type: string | description: Free-text style instructions applied when generating images for posts.  | validation: maxLength 10000
        - name: marketingPlanGoal | type: MarketingPlanGoal | description: Overall goal of the marketing plan, used to align content strategy across all tools.  
           - ONE-OF: 
              - name: goalKey | type: PlanGoal | description: A standard goal selected from the available plan goal options.  
                     - enum:
                     -     DRIVE_TRAFFIC: Increase visits to the site.
                     -     BRAND_AWARENESS: Grow recognition and reach of the brand.
                     -     BOOST_SALES: Promote products or services to increase purchases.
                     -     COLLECT_LEADS: Capture contact information from potential customers.
              - name: customGoal | type: string | description: A free-text goal provided when none of the standard options apply.  | validation: maxLength 400
        - name: socialChannels | type: array<SocialChannel> | description: Social platforms to generate content for. Social post drafts are only produced when `SOCIAL_MARKETING` is included in `marketing_tools`.  | validation: minItems 0, maxItems 10
             - enum:
             -     FACEBOOK: Facebook.
             -     INSTAGRAM: Instagram.
             -     LINKEDIN: LinkedIn.
             -     TWITTER: Deprecated: No longer functional as of July 31, 2026.
             -     PINTEREST: Pinterest.
             -     GBP: Google Business Profile.
             -     TIKTOK: TikTok.
        - name: frequency | type: Frequency | description: Posting cadence that acts as a fallback for social marketing only. Per-tool cadences are controlled by `overrides.socialMarketing.frequency`, `overrides.blogs.frequency`, and `overrides.emailMarketing.frequency` (each with its own per-tool default).  
           - name: interval | type: Interval | description: Time unit for the posting cadence (`WEEK`, `MONTH`, or `YEAR`).  
                 - enum:
                 -     WEEK: Per-week cadence.
                 -     MONTH: Per-month cadence.
                 -     YEAR: Per-year cadence.
           - name: count | type: integer | description: Number of posts to produce within each `interval`.  | validation: minimum 1, maximum 30, format int32
        - name: marketingTools | type: array<MarketingTool> | description: Marketing tools enabled in the plan. Social post drafts are only generated when `SOCIAL_MARKETING` is present.  | validation: minItems 0, maxItems 3
             - enum:
             -     EMAIL_MARKETING: Email marketing campaigns.
             -     BLOGS: Blog post creation.
             -     SOCIAL_MARKETING: Social media post drafts. Must be enabled for social post drafts to be generated.
        - name: businessProfile | type: BusinessProfile | description: Business context (goal, value proposition, and target audience) used to tailor content.  
           - name: businessGoal | type: string | description: What the business is trying to achieve (e.g., grow revenue, build community).  | validation: maxLength 3000
           - name: valueProposition | type: string | description: What makes the business unique and why customers should choose it.  | validation: maxLength 3000
           - name: targetAudience | type: string | description: Description of the intended audience the business wants to reach.  | validation: maxLength 3000
        - name: calendar | type: Calendar | description: Calendars whose events the AI considers when planning marketing activities.  
           - name: ids | type: array<string> | description: IDs of the selected calendar options.  | validation: minItems 0, maxItems 20, format GUID
        - name: businessLocation | type: BusinessLocation | description: Business location used to generate location-specific content. Read-only; derived from SEO settings.  
           - name: id | type: string | description: Unique identifier for the business location (msid)  | validation: format GUID
           - name: physicalLocations | type: array<PhysicalLocation> | description: List of physical business locations (maximum 5)  | validation: maxItems 5
              - name: location | type: string | description: Free-form location text (e.g., "123 Main St, New York, NY 10001")  | validation: maxLength 500
           - name: serviceLocations | type: array<ServiceLocation> | description: List of service areas where the business operates (maximum 5)  | validation: maxItems 5
              - name: location | type: string | description: Free-form service area text (e.g., "Manhattan, NY" or "Within 50 miles of Chicago")  | validation: maxLength 500
           - name: online | type: boolean | description: Indicates whether the business operates online  
           - name: createdDate | type: string | description: Timestamp when the business location was created (ISO 8601 format)  | validation: format LOCAL_DATE_TIME
           - name: updatedDate | type: string | description: Timestamp when the business location was last updated (ISO 8601 format)  | validation: format LOCAL_DATE_TIME
        - name: imageGenerationSettings | type: ImageGenerationSettings | description: Controls how images are generated for posts (mode and photo sources). These values are stored but aren't currently applied during generation.  
           - name: mode | type: Mode | description: How images are generated for posts.  
                 - enum:
                 -     RAW: Uses existing photos from enabled sources without AI processing.
                 -     AI_ONLY: Generates images entirely with AI, without using existing photos.
                 -     REMIX: Applies AI enhancements to existing photos from enabled sources.
           - name: enabledPhotoSources | type: array<Source> | description: Photo sources the AI may draw from when generating or remixing images.  | validation: minItems 0, maxItems 2
                 - enum:
                 -     PRODUCTS_CATALOG: Photos from the site's product catalog.
                 -     SERVICES_CATALOG: Photos from the site's services catalog.
     - name: overrides | type: SettingsOverrides | description: Per-tool overrides. Unset fields in an override inherit the value from `settings`.  
        - name: emailMarketing | type: Settings | description: Settings applied only when generating email marketing content, overriding the shared settings.  
        - name: blogs | type: Settings | description: Settings applied only when generating blog content, overriding the shared settings.  
        - name: socialMarketing | type: Settings | description: Settings applied only when generating social marketing content, overriding the shared settings.  
     - name: createdAt | type: string | description: Date and time the marketing settings were created.  | validation: format date-time
     - name: updatedAt | type: string | description: Date and time the marketing settings were last updated.  | validation: format date-time


```

### Examples

### Upsert marketing settings
Create or update marketing settings. The fieldMask determines which fields are written; every path in the fieldMask must be populated in the marketingSettings object.

```curl
curl -X POST \
'https://www.wixapis.com/promote/marketing-plan-service/v1/marketing-settings' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "marketingSettings": {
    "settings": {
      "marketingPlanGoal": {
        "goalKey": "BOOST_SALES"
      },
      "socialChannels": [
        "INSTAGRAM",
        "FACEBOOK",
        "TIKTOK"
      ]
    }
  },
  "fieldMask": [
    "settings.marketingPlanGoal",
    "settings.socialChannels"
  ]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGrowthToolsMarketingPlan.marketingSettings.upsertMarketingSettings(marketingSettings)
 Description: Creates or updates the site's marketing settings.  If no settings exist yet, this method creates them. Otherwise it updates only the fields listed in `fieldMask`; all other fields are left unchanged. Both `marketing_settings` and `field_mask` are required. Every path listed in `fieldMask` must be present in the `marketingSettings` you send; listing a path that isn't present returns a `FAILED_PRECONDITION` error. To clear a field, include it in `fieldMask` and send it explicitly as null or empty.  Changing settings doesn't update an existing plan. After updating settings, regenerate the plan for the changes to take effect (use Regenerate Marketing Plan with Keyword Research after changing the content pillars in `topics`).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  marketingSettings
 Method parameters: 
   param name: marketingSettings | type: MarketingSettings | description: A site's marketing preferences that shape how the AI generates its marketing plan and posts.  Settings are optional: if a site hasn't configured them, sensible defaults are applied automatically when a plan is generated. Owners can customize any combination of fields using the UpsertMarketingSettings method. Settings are shared across all enabled marketing tools unless a tool-specific override is set in `overrides`. | required: true 
        - name: settings | type: Settings | description: Core preferences that apply to all marketing tools unless a tool-specific override is set.  
           - name: toneOfVoice | type: string | description: Writing style description used to shape the voice of generated post captions.  | validation: maxLength 10000
           - name: pointOfView | type: PointOfView | description: Narrative perspective used in generated post captions (first, second, or third person).  
                 - enum:
                 -     FIRST_PERSON: Uses "I", "we", "my", "our".
                 -     SECOND_PERSON: Uses "you", "your".
                 -     THIRD_PERSON: Uses "they", "their", or the business name.
           - name: customContentGuidelines | type: string | description: Free-text instructions that further personalize how content is written, beyond `tone_of_voice`.  | validation: maxLength 5000
           - name: topics | type: Topics | description: Content pillars: topics the AI should focus on or avoid when generating posts.  
              - name: included | type: array<string> | description: Topics the AI should actively incorporate into generated content.  | validation: minItems 0, maxItems 50, maxLength 50
              - name: excluded | type: array<string> | description: Topics the AI should avoid in generated content.  | validation: minItems 0, maxItems 50, maxLength 50
              - name: coreTopic | type: string | description: The primary theme that anchors all generated content. Stored but not currently used during generation; the fields that influence generation are `topics.included` and `topics.excluded`.  | validation: maxLength 100
           - name: imageGuidelines | type: string | description: Free-text style instructions applied when generating images for posts.  | validation: maxLength 10000
           - name: marketingPlanGoal | type: MarketingPlanGoal | description: Overall goal of the marketing plan, used to align content strategy across all tools.  
              - ONE-OF: 
                 - name: goalKey | type: PlanGoal | description: A standard goal selected from the available plan goal options.  
                         - enum:
                         -     DRIVE_TRAFFIC: Increase visits to the site.
                         -     BRAND_AWARENESS: Grow recognition and reach of the brand.
                         -     BOOST_SALES: Promote products or services to increase purchases.
                         -     COLLECT_LEADS: Capture contact information from potential customers.
                 - name: customGoal | type: string | description: A free-text goal provided when none of the standard options apply.  | validation: maxLength 400
           - name: socialChannels | type: array<SocialChannel> | description: Social platforms to generate content for. Social post drafts are only produced when `SOCIAL_MARKETING` is included in `marketing_tools`.  | validation: minItems 0, maxItems 10
                 - enum:
                 -     FACEBOOK: Facebook.
                 -     INSTAGRAM: Instagram.
                 -     LINKEDIN: LinkedIn.
                 -     TWITTER: Deprecated: No longer functional as of July 31, 2026.
                 -     PINTEREST: Pinterest.
                 -     GBP: Google Business Profile.
                 -     TIKTOK: TikTok.
           - name: frequency | type: Frequency | description: Posting cadence that acts as a fallback for social marketing only. Per-tool cadences are controlled by `overrides.socialMarketing.frequency`, `overrides.blogs.frequency`, and `overrides.emailMarketing.frequency` (each with its own per-tool default).  
              - name: interval | type: Interval | description: Time unit for the posting cadence (`WEEK`, `MONTH`, or `YEAR`).  
                     - enum:
                     -     WEEK: Per-week cadence.
                     -     MONTH: Per-month cadence.
                     -     YEAR: Per-year cadence.
              - name: count | type: integer | description: Number of posts to produce within each `interval`.  | validation: minimum 1, maximum 30, format int32
           - name: marketingTools | type: array<MarketingTool> | description: Marketing tools enabled in the plan. Social post drafts are only generated when `SOCIAL_MARKETING` is present.  | validation: minItems 0, maxItems 3
                 - enum:
                 -     EMAIL_MARKETING: Email marketing campaigns.
                 -     BLOGS: Blog post creation.
                 -     SOCIAL_MARKETING: Social media post drafts. Must be enabled for social post drafts to be generated.
           - name: businessProfile | type: BusinessProfile | description: Business context (goal, value proposition, and target audience) used to tailor content.  
              - name: businessGoal | type: string | description: What the business is trying to achieve (e.g., grow revenue, build community).  | validation: maxLength 3000
              - name: valueProposition | type: string | description: What makes the business unique and why customers should choose it.  | validation: maxLength 3000
              - name: targetAudience | type: string | description: Description of the intended audience the business wants to reach.  | validation: maxLength 3000
           - name: calendar | type: Calendar | description: Calendars whose events the AI considers when planning marketing activities.  
              - name: ids | type: array<string> | description: IDs of the selected calendar options.  | validation: minItems 0, maxItems 20, format GUID
           - name: imageGenerationSettings | type: ImageGenerationSettings | description: Controls how images are generated for posts (mode and photo sources). These values are stored but aren't currently applied during generation.  
              - name: mode | type: Mode | description: How images are generated for posts.  
                     - enum:
                     -     RAW: Uses existing photos from enabled sources without AI processing.
                     -     AI_ONLY: Generates images entirely with AI, without using existing photos.
                     -     REMIX: Applies AI enhancements to existing photos from enabled sources.
              - name: enabledPhotoSources | type: array<Source> | description: Photo sources the AI may draw from when generating or remixing images.  | validation: minItems 0, maxItems 2
                     - enum:
                     -     PRODUCTS_CATALOG: Photos from the site's product catalog.
                     -     SERVICES_CATALOG: Photos from the site's services catalog.
        - name: overrides | type: SettingsOverrides | description: Per-tool overrides. Unset fields in an override inherit the value from `settings`.  
           - name: emailMarketing | type: Settings | description: Settings applied only when generating email marketing content, overriding the shared settings.  
           - name: blogs | type: Settings | description: Settings applied only when generating blog content, overriding the shared settings.  
           - name: socialMarketing | type: Settings | description: Settings applied only when generating social marketing content, overriding the shared settings.  
 Return type: PROMISE<UpsertMarketingSettingsResponse>
  - name: marketingSettings | type: MarketingSettings | description: The marketing settings after the create or update.  
     - name: _id | type: string | description: Unique GUID of the marketing settings, equal to the site's MetaSite GUID.  | validation: format GUID
     - name: settings | type: Settings | description: Core preferences that apply to all marketing tools unless a tool-specific override is set.  
        - name: toneOfVoice | type: string | description: Writing style description used to shape the voice of generated post captions.  | validation: maxLength 10000
        - name: pointOfView | type: PointOfView | description: Narrative perspective used in generated post captions (first, second, or third person).  
             - enum:
             -     FIRST_PERSON: Uses "I", "we", "my", "our".
             -     SECOND_PERSON: Uses "you", "your".
             -     THIRD_PERSON: Uses "they", "their", or the business name.
        - name: customContentGuidelines | type: string | description: Free-text instructions that further personalize how content is written, beyond `tone_of_voice`.  | validation: maxLength 5000
        - name: language | type: Language | description: Language and regional variation used for generated content. Read-only; derived from site properties.  
           - name: language | type: string | description: Language for generated content (e.g., `English`, `Spanish`).  | validation: maxLength 50
           - name: regionalVariation | type: string | description: Regional variation of the language (e.g., `Australian` when `language` is `English`).  | validation: maxLength 50
        - name: topics | type: Topics | description: Content pillars: topics the AI should focus on or avoid when generating posts.  
           - name: included | type: array<string> | description: Topics the AI should actively incorporate into generated content.  | validation: minItems 0, maxItems 50, maxLength 50
           - name: excluded | type: array<string> | description: Topics the AI should avoid in generated content.  | validation: minItems 0, maxItems 50, maxLength 50
           - name: coreTopic | type: string | description: The primary theme that anchors all generated content. Stored but not currently used during generation; the fields that influence generation are `topics.included` and `topics.excluded`.  | validation: maxLength 100
        - name: imageGuidelines | type: string | description: Free-text style instructions applied when generating images for posts.  | validation: maxLength 10000
        - name: marketingPlanGoal | type: MarketingPlanGoal | description: Overall goal of the marketing plan, used to align content strategy across all tools.  
           - ONE-OF: 
              - name: goalKey | type: PlanGoal | description: A standard goal selected from the available plan goal options.  
                     - enum:
                     -     DRIVE_TRAFFIC: Increase visits to the site.
                     -     BRAND_AWARENESS: Grow recognition and reach of the brand.
                     -     BOOST_SALES: Promote products or services to increase purchases.
                     -     COLLECT_LEADS: Capture contact information from potential customers.
              - name: customGoal | type: string | description: A free-text goal provided when none of the standard options apply.  | validation: maxLength 400
        - name: socialChannels | type: array<SocialChannel> | description: Social platforms to generate content for. Social post drafts are only produced when `SOCIAL_MARKETING` is included in `marketing_tools`.  | validation: minItems 0, maxItems 10
             - enum:
             -     FACEBOOK: Facebook.
             -     INSTAGRAM: Instagram.
             -     LINKEDIN: LinkedIn.
             -     TWITTER: Deprecated: No longer functional as of July 31, 2026.
             -     PINTEREST: Pinterest.
             -     GBP: Google Business Profile.
             -     TIKTOK: TikTok.
        - name: frequency | type: Frequency | description: Posting cadence that acts as a fallback for social marketing only. Per-tool cadences are controlled by `overrides.socialMarketing.frequency`, `overrides.blogs.frequency`, and `overrides.emailMarketing.frequency` (each with its own per-tool default).  
           - name: interval | type: Interval | description: Time unit for the posting cadence (`WEEK`, `MONTH`, or `YEAR`).  
                 - enum:
                 -     WEEK: Per-week cadence.
                 -     MONTH: Per-month cadence.
                 -     YEAR: Per-year cadence.
           - name: count | type: integer | description: Number of posts to produce within each `interval`.  | validation: minimum 1, maximum 30, format int32
        - name: marketingTools | type: array<MarketingTool> | description: Marketing tools enabled in the plan. Social post drafts are only generated when `SOCIAL_MARKETING` is present.  | validation: minItems 0, maxItems 3
             - enum:
             -     EMAIL_MARKETING: Email marketing campaigns.
             -     BLOGS: Blog post creation.
             -     SOCIAL_MARKETING: Social media post drafts. Must be enabled for social post drafts to be generated.
        - name: businessProfile | type: BusinessProfile | description: Business context (goal, value proposition, and target audience) used to tailor content.  
           - name: businessGoal | type: string | description: What the business is trying to achieve (e.g., grow revenue, build community).  | validation: maxLength 3000
           - name: valueProposition | type: string | description: What makes the business unique and why customers should choose it.  | validation: maxLength 3000
           - name: targetAudience | type: string | description: Description of the intended audience the business wants to reach.  | validation: maxLength 3000
        - name: calendar | type: Calendar | description: Calendars whose events the AI considers when planning marketing activities.  
           - name: ids | type: array<string> | description: IDs of the selected calendar options.  | validation: minItems 0, maxItems 20, format GUID
        - name: businessLocation | type: BusinessLocation | description: Business location used to generate location-specific content. Read-only; derived from SEO settings.  
           - name: _id | type: string | description: Unique identifier for the business location (msid)  | validation: format GUID
           - name: physicalLocations | type: array<PhysicalLocation> | description: List of physical business locations (maximum 5)  | validation: maxItems 5
              - name: location | type: string | description: Free-form location text (e.g., "123 Main St, New York, NY 10001")  | validation: maxLength 500
           - name: serviceLocations | type: array<ServiceLocation> | description: List of service areas where the business operates (maximum 5)  | validation: maxItems 5
              - name: location | type: string | description: Free-form service area text (e.g., "Manhattan, NY" or "Within 50 miles of Chicago")  | validation: maxLength 500
           - name: online | type: boolean | description: Indicates whether the business operates online  
           - name: _createdDate | type: string | description: Timestamp when the business location was created (ISO 8601 format)  | validation: format LOCAL_DATE_TIME
           - name: _updatedDate | type: string | description: Timestamp when the business location was last updated (ISO 8601 format)  | validation: format LOCAL_DATE_TIME
        - name: imageGenerationSettings | type: ImageGenerationSettings | description: Controls how images are generated for posts (mode and photo sources). These values are stored but aren't currently applied during generation.  
           - name: mode | type: Mode | description: How images are generated for posts.  
                 - enum:
                 -     RAW: Uses existing photos from enabled sources without AI processing.
                 -     AI_ONLY: Generates images entirely with AI, without using existing photos.
                 -     REMIX: Applies AI enhancements to existing photos from enabled sources.
           - name: enabledPhotoSources | type: array<Source> | description: Photo sources the AI may draw from when generating or remixing images.  | validation: minItems 0, maxItems 2
                 - enum:
                 -     PRODUCTS_CATALOG: Photos from the site's product catalog.
                 -     SERVICES_CATALOG: Photos from the site's services catalog.
     - name: overrides | type: SettingsOverrides | description: Per-tool overrides. Unset fields in an override inherit the value from `settings`.  
        - name: emailMarketing | type: Settings | description: Settings applied only when generating email marketing content, overriding the shared settings.  
        - name: blogs | type: Settings | description: Settings applied only when generating blog content, overriding the shared settings.  
        - name: socialMarketing | type: Settings | description: Settings applied only when generating social marketing content, overriding the shared settings.  
     - name: createdAt | type: Date | description: Date and time the marketing settings were created.  
     - name: updatedAt | type: Date | description: Date and time the marketing settings were last updated.  


```

### Examples

### Upsert marketing settings
Every path in fieldMask must be populated in the marketingSettings object.

```javascript
import { marketingSettings } from "@wix/promote-growth-tools-marketing-plan";

const settings = {
  settings: {
    marketingPlanGoal: {
      goalKey: "BOOST_SALES" as const,
    },
    socialChannels: ["INSTAGRAM", "FACEBOOK", "TIKTOK"] as const,
  },
};

const options = {
  fieldMask: ["settings.marketingPlanGoal", "settings.socialChannels"],
};

async function upsertMarketingSettings() {
  const response = await marketingSettings.upsertMarketingSettings(
    settings,
    options,
  );
}

/* Promise resolves to:
 * {
 *   "_id": "f1c2e3a4-5b6c-47d8-9e0f-1a2b3c4d5e6f",
 *   "settings": {
 *     "marketingPlanGoal": {
 *       "goalKey": "BOOST_SALES"
 *     },
 *     "socialChannels": [
 *       "INSTAGRAM",
 *       "FACEBOOK"
 *     ]
 *   },
 *   "createdAt": "2026-05-01T09:15:00.000Z",
 *   "updatedAt": "2026-06-25T11:04:27.000Z"
 * }
 */

```

### upsertMarketingSettings (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 { marketingSettings } from '@wix/promote-growth-tools-marketing-plan';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function upsertMarketingSettings(marketingSettings) {
  const response = await myWixClient.marketingSettings.upsertMarketingSettings(marketingSettings);
};
```

---