> 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

# CreateSeoPattern

# Package: seo

# Namespace: PageTypeSeoPatternsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern.md

## Permission Scopes:
Manage SEO Settings: SCOPE.PROMOTE.MANAGE-SEO

## Introduction

Creates a pattern for a page type that's still on its Wix default.

The pattern must contain at least one tag. To leave a page type on its Wix default,
create nothing for it.

To change a pattern that already exists, call [Set SEO
Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/set-seo-pattern.md).

---

## REST API

### Schema

```
 Method: createSeoPattern
 Description: Creates a pattern for a page type that's still on its Wix default.  The pattern must contain at least one tag. To leave a page type on its Wix default, create nothing for it.  To change a pattern that already exists, call [Set SEO Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/set-seo-pattern.md).
 URL: https://www.wixapis.com/promote/seo/v1/seo-patterns/{pageType}
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  seoPattern
 Method parameters: 
   param name: seoPattern | type: SeoPattern | description: An SEO pattern is a template of SEO tags defined for one page type, such as every blog post or every store product. A pattern's tags may contain variables, written as `{{variable}}`, that are filled in with each item's own values when its page renders, so a Wix user sets the tags for a whole page type once instead of item by item.  Every page type always has a pattern in effect. When a site has no pattern of its own for a page type, the built-in Wix default applies, and `source` reports which of the two is in effect.  A change to a pattern reaches the live site without a site publish, and applies to every page of that type that has no SEO tags set for the item itself. | required: true 
        - name: pageId | type: string | description: GUID of a single page built from a Wix Data collection, when the pattern applies to that page alone rather than to the whole page type.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
        - name: pattern | type: SeoPatternBlob | description: The site's own pattern for the page type, which takes precedence over the Wix default.  Empty when the site has no pattern of its own, in which case `defaultPattern` applies.  
           - name: tags | type: array<Tag> | description: The pattern's SEO tag templates.  A tag may reference only the variables the page type offers. Call [List SEO Pattern Variables](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/list-seo-pattern-variables.md) for the page type to retrieve them.  A tag whose `disabled` or `custom` value is itself a variable is returned with that value unset, because those fields are booleans. The behavior still applies when the page renders.  | validation: maxItems 100
              - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  
              - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.  
              - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.  
              - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.  
              - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.  
              - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.  
 Return type: CreateSeoPatternResponse
  - name: seoPattern | type: SeoPattern | description: The created pattern, with `source` reporting that the site's own pattern is now in effect.  
     - name: id | type: string | description: SEO pattern GUID, in the format `{pageType}`.  For a pattern that applies to a single page built from a Wix Data collection, the format is `{pageType}:{pageId}`.  | read-only: true | validation: maxLength 400
     - name: pageType | type: string | description: Page type the pattern applies to. For example, `STATIC_PAGE`, `BLOG_POST`, or `STORES_PRODUCT`.  | read-only: true | validation: maxLength 100
     - name: pageId | type: string | description: GUID of a single page built from a Wix Data collection, when the pattern applies to that page alone rather than to the whole page type.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
     - name: pattern | type: SeoPatternBlob | description: The site's own pattern for the page type, which takes precedence over the Wix default.  Empty when the site has no pattern of its own, in which case `defaultPattern` applies.  
        - name: tags | type: array<Tag> | description: The pattern's SEO tag templates.  A tag may reference only the variables the page type offers. Call [List SEO Pattern Variables](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/list-seo-pattern-variables.md) for the page type to retrieve them.  A tag whose `disabled` or `custom` value is itself a variable is returned with that value unset, because those fields are booleans. The behavior still applies when the page renders.  | validation: maxItems 100
           - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  
           - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.  
           - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.  
           - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.  
           - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.  
           - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.  
     - name: defaultPattern | type: SeoPatternBlob | description: The pattern Wix provides for the page type, which applies whenever the site has no pattern of its own.  Always returned, so you can see what a reset would restore.  | read-only: true 
     - name: source | type: PatternSource | description: Which pattern is in effect for the page type: the site's own, or the Wix default.  | read-only: true 
         - enum:
         -     PATTERN_SOURCE_UNSPECIFIED: Unknown source.
         -     PATTERN_SOURCE_USER: The site has a pattern of its own for the page type, returned in `pattern`.
         -     PATTERN_SOURCE_DEFAULT: The site has no pattern of its own for the page type, so the Wix default in `defaultPattern` applies.
     - name: language | type: string | description: Language the pattern applies to, as an IETF BCP 47 language tag. For example, `en-US` for U.S. English.  A page type has a single pattern, so this reports the site's primary language.  | read-only: true | validation: maxLength 100
     - name: origin | type: Origin | description: What made the most recent change to the pattern, for example a Wix user or the site migration flow. Derived from the caller, not from the request.  Reported only on the response to a write, and on the event the write emits. It isn't stored with the pattern, so Get SEO Pattern and List SEO Patterns always report `ORIGIN_UNSPECIFIED`, as does a write by a caller Wix doesn't identify as a specific origin.  | read-only: true 
         - enum:
         -     ORIGIN_UNSPECIFIED: Unknown origin. Returned by read methods, because origin isn't stored alongside the data it describes.
         -     ORIGIN_USER: A user, working in the dashboard or editor, or calling the API on their own behalf.
         -     ORIGIN_MIGRATION: The flow that imports an existing site into Wix.
         -     ORIGIN_AI: An AI agent or an automated suggestion flow.

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: PAGE_ID_NOT_SUPPORTED | Description: A `pageId` was specified for a page type that has a single pattern for the whole type. Only `WIX_DATA_PAGE_ITEM` supports a per-page pattern.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PATTERN | Description: The pattern contains no tags, references a variable the page type doesn't offer, or contains a tag that isn't valid. When a variable is the problem, the error message lists the variables the page type offers.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_PAGE_TYPE | Description: Wix doesn't recognize the specified `pageType`. The error message lists the page types that are supported.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: PAGE_TYPE_NOT_ON_SITE | Description: The page type is valid, but the Wix business solution that provides it isn't installed on the site.
   HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: PATTERN_ALREADY_EXISTS | Description: The site already has a pattern for this page type. Call Set SEO Pattern to change it.


```

### Examples

### Create a pattern for a page type
```curl
curl -X POST \
'https://www.wixapis.com/seo-metatags-server/v1/seo-patterns/STATIC_PAGE' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "seoPattern": {
    "pattern": {
      "tags": [
        {
          "type": "title",
          "children": "{{page.name}} | {{site.name}}"
        },
        {
          "type": "meta",
          "props": {
            "name": "description",
            "content": "{{page.name}} at {{site.business.name}}."
          }
        }
      ]
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.seoPatterns.createSeoPattern(pageType, seoPattern)
 Description: Creates a pattern for a page type that's still on its Wix default.  The pattern must contain at least one tag. To leave a page type on its Wix default, create nothing for it.  To change a pattern that already exists, call [Set SEO Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/set-seo-pattern.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  pageType, seoPattern
 Method parameters: 
   param name: pageType | type: string | description: Page type to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or `STORES_PRODUCT`. | required: true | validation: maxLength 100
   param name: seoPattern | type: SeoPattern | description: An SEO pattern is a template of SEO tags defined for one page type, such as every blog post or every store product. A pattern's tags may contain variables, written as `{{variable}}`, that are filled in with each item's own values when its page renders, so a Wix user sets the tags for a whole page type once instead of item by item.  Every page type always has a pattern in effect. When a site has no pattern of its own for a page type, the built-in Wix default applies, and `source` reports which of the two is in effect.  A change to a pattern reaches the live site without a site publish, and applies to every page of that type that has no SEO tags set for the item itself. | required: true 
        - name: pageId | type: string | description: GUID of a single page built from a Wix Data collection, when the pattern applies to that page alone rather than to the whole page type.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
        - name: pattern | type: SeoPatternBlob | description: The site's own pattern for the page type, which takes precedence over the Wix default.  Empty when the site has no pattern of its own, in which case `defaultPattern` applies.  
           - name: tags | type: array<Tag> | description: The pattern's SEO tag templates.  A tag may reference only the variables the page type offers. Call [List SEO Pattern Variables](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/list-seo-pattern-variables.md) for the page type to retrieve them.  A tag whose `disabled` or `custom` value is itself a variable is returned with that value unset, because those fields are booleans. The behavior still applies when the page renders.  | validation: maxItems 100
              - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  
              - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.  
              - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.  
              - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.  
              - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.  
              - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.  
 Return type: PROMISE<SeoPattern>
  - name: _id | type: string | description: SEO pattern GUID, in the format `{pageType}`.  For a pattern that applies to a single page built from a Wix Data collection, the format is `{pageType}:{pageId}`.  | read-only: true | validation: maxLength 400
  - name: pageType | type: string | description: Page type the pattern applies to. For example, `STATIC_PAGE`, `BLOG_POST`, or `STORES_PRODUCT`.  | read-only: true | validation: maxLength 100
  - name: pageId | type: string | description: GUID of a single page built from a Wix Data collection, when the pattern applies to that page alone rather than to the whole page type.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
  - name: pattern | type: SeoPatternBlob | description: The site's own pattern for the page type, which takes precedence over the Wix default.  Empty when the site has no pattern of its own, in which case `defaultPattern` applies.  
     - name: tags | type: array<Tag> | description: The pattern's SEO tag templates.  A tag may reference only the variables the page type offers. Call [List SEO Pattern Variables](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/list-seo-pattern-variables.md) for the page type to retrieve them.  A tag whose `disabled` or `custom` value is itself a variable is returned with that value unset, because those fields are booleans. The behavior still applies when the page renders.  | validation: maxItems 100
        - name: type | type: string | description: SEO tag type.   Supported values: `title`, `meta`, `script`, `link`.  
        - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`.  
        - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`.  
        - name: children | type: string | description: SEO tag inner content. For example, `<title> inner content </title>`.  
        - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) — i.e. an entry from the site's Advanced/Custom Tags list.  This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed default/pattern — standard tags always resolve with `custom: false`, even when their content comes from a page's manually saved SEO title/description override. Don't use this field to verify whether a live page reflects a manual per-page SEO edit.  Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the response entirely — there, `false` means this API could not tell, not that no custom tag exists. Pass `seoData` explicitly to resolve against a known set of tags.  
        - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines.  
  - name: defaultPattern | type: SeoPatternBlob | description: The pattern Wix provides for the page type, which applies whenever the site has no pattern of its own.  Always returned, so you can see what a reset would restore.  | read-only: true 
  - name: source | type: PatternSource | description: Which pattern is in effect for the page type: the site's own, or the Wix default.  | read-only: true 
     - enum:
     -     PATTERN_SOURCE_UNSPECIFIED: Unknown source.
     -     PATTERN_SOURCE_USER: The site has a pattern of its own for the page type, returned in `pattern`.
     -     PATTERN_SOURCE_DEFAULT: The site has no pattern of its own for the page type, so the Wix default in `defaultPattern` applies.
  - name: language | type: string | description: Language the pattern applies to, as an IETF BCP 47 language tag. For example, `en-US` for U.S. English.  A page type has a single pattern, so this reports the site's primary language.  | read-only: true | validation: maxLength 100
  - name: origin | type: Origin | description: What made the most recent change to the pattern, for example a Wix user or the site migration flow. Derived from the caller, not from the request.  Reported only on the response to a write, and on the event the write emits. It isn't stored with the pattern, so Get SEO Pattern and List SEO Patterns always report `ORIGIN_UNSPECIFIED`, as does a write by a caller Wix doesn't identify as a specific origin.  | read-only: true 
     - enum:
     -     ORIGIN_UNSPECIFIED: Unknown origin. Returned by read methods, because origin isn't stored alongside the data it describes.
     -     ORIGIN_USER: A user, working in the dashboard or editor, or calling the API on their own behalf.
     -     ORIGIN_MIGRATION: The flow that imports an existing site into Wix.
     -     ORIGIN_AI: An AI agent or an automated suggestion flow.

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: PAGE_ID_NOT_SUPPORTED | Description: A `pageId` was specified for a page type that has a single pattern for the whole type. Only `WIX_DATA_PAGE_ITEM` supports a per-page pattern.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PATTERN | Description: The pattern contains no tags, references a variable the page type doesn't offer, or contains a tag that isn't valid. When a variable is the problem, the error message lists the variables the page type offers.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_PAGE_TYPE | Description: Wix doesn't recognize the specified `pageType`. The error message lists the page types that are supported.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: PAGE_TYPE_NOT_ON_SITE | Description: The page type is valid, but the Wix business solution that provides it isn't installed on the site.
   HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: PATTERN_ALREADY_EXISTS | Description: The site already has a pattern for this page type. Call Set SEO Pattern to change it.


```

### Examples

### Create a pattern for a page type
The page type had no pattern of its own. A pattern must contain at least one tag, and may reference only the variables the page type offers.

```javascript
import { seoPatterns } from "@wix/seo";

async function createSeoPattern() {
  const response = await seoPatterns.createSeoPattern("STATIC_PAGE", {
    pattern: {
      tags: [
        {
          type: "title",
          children: "{{page.name}} | {{site.name}}",
        },
        {
          type: "meta",
          props: {
            name: "description",
            content: "{{page.name}} at {{site.business.name}}.",
          },
        },
      ],
    },
  });
  return response;
}

/* Promise resolves to the entity BARE, not wrapped in `seoPattern` the way Set and Reset
 * return it:
 * {
 *   "pageType": "STATIC_PAGE",
 *   "pattern": {
 *     "tags": [
 *       {
 *         "type": "title",
 *         "children": "{{page.name}} | {{site.name}}",
 *         "custom": false,
 *         "disabled": false
 *       },
 *       {
 *         "type": "meta",
 *         "props": { "name": "description", "content": "{{page.name}} at {{site.business.name}}." },
 *         "children": "",
 *         "custom": false,
 *         "disabled": false
 *       }
 *     ]
 *   },
 *   "defaultPattern": {
 *     "tags": [
 *       {
 *         "type": "title",
 *         "children": "{{page.name}} | {{site.name}}",
 *         "custom": false,
 *         "disabled": false
 *       }
 *     ]
 *   },
 *   "source": "PATTERN_SOURCE_USER",
 *   "origin": "ORIGIN_UNSPECIFIED",
 *   "_id": "STATIC_PAGE"
 * }
 */

```

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

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


async function createSeoPattern(pageType,seoPattern) {
  const response = await myWixClient.seoPatterns.createSeoPattern(pageType,seoPattern);
};
```

---