> 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

# SetSeoPattern

# Package: seo

# Namespace: PageTypeSeoPatternsService

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

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

## Introduction

Changes the pattern a site has for a page type.

Setting `pattern` replaces the page type's tag templates in full, so retrieve the
pattern first and send back the complete set you want it to have. Sending an empty
pattern clears it, which returns the page type to its Wix default.

This method changes a pattern that already exists rather than creating one. For a page
type still on its Wix default, call [Create SEO
Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern.md)
instead.

A pattern has no revision, and the site's SEO settings in the dashboard write to the
same pattern. The last write wins, so retrieve the pattern immediately before writing
it.

---

## REST API

### Schema

```
 Method: setSeoPattern
 Description: Changes the pattern a site has for a page type.  Setting `pattern` replaces the page type's tag templates in full, so retrieve the pattern first and send back the complete set you want it to have. Sending an empty pattern clears it, which returns the page type to its Wix default.  This method changes a pattern that already exists rather than creating one. For a page type still on its Wix default, call [Create SEO Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern.md) instead.  A pattern has no revision, and the site's SEO settings in the dashboard write to the same pattern. The last write wins, so retrieve the pattern immediately before writing it.
 URL: https://www.wixapis.com/promote/seo/v1/seo-patterns/{pageType}
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  seoPattern, fieldMask
 Method parameters: 
   param name: fieldMask | type: fieldMask | description: Fields to update.  Supported properties: `pattern` | required: true 
   param name: pageId | type: pageId | description: GUID of a single page built from a Wix Data collection, to change the pattern of that page alone.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
   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: SetSeoPatternResponse
  - name: seoPattern | type: SeoPattern | description: The updated pattern.  
     - 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: COLLECTION_NAME_NOT_SUPPORTED | Description: A `collectionName` was specified. Resolving a dynamic page by collection isn't supported yet, so specify the page's GUID in `pageId` instead.
   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_FIELD_MASK | Description: The `fieldMask` is empty, or names a field that doesn't exist or isn't writable.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PATTERN | Description: The pattern 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: PATTERN_NOT_FOUND | Description: Couldn't find the pattern. The site has no pattern of its own for this page type, so call Create SEO Pattern instead.


```

### Examples

### Change a page type's pattern
The request carries every tag the pattern should keep, not only the changed title, because the tags sent replace the pattern in full.

```curl
curl -X PATCH \
'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.business.name}}"
        },
        {
          "type": "meta",
          "props": {
            "name": "description",
            "content": "{{page.name}} at {{site.business.name}}."
          }
        },
        {
          "type": "link",
          "props": {
            "rel": "canonical",
            "href": "{{page.url}}"
          }
        }
      ]
    }
  },
  "fieldMask": "pattern"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.seoPatterns.setSeoPattern(pageType, seoPattern, options)
 Description: Changes the pattern a site has for a page type.  Setting `pattern` replaces the page type's tag templates in full, so retrieve the pattern first and send back the complete set you want it to have. Sending an empty pattern clears it, which returns the page type to its Wix default.  This method changes a pattern that already exists rather than creating one. For a page type still on its Wix default, call [Create SEO Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern.md) instead.  A pattern has no revision, and the site's SEO settings in the dashboard write to the same pattern. The last write wins, so retrieve the pattern immediately before writing it.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  pageType, seoPattern, options.fieldMask, options
 Method parameters: 
   param name: options | type: SetSeoPatternOptions  none | required: true 
        - name: fieldMask | type: array<string> | description: Fields to update.  Supported properties: `pattern` | required: true 
        - name: pageId | type: string | description: GUID of a single page built from a Wix Data collection, to change the pattern of that page alone.  Supported only for the `WIX_DATA_PAGE_ITEM` page type.  | validation: maxLength 200
   param name: pageType | type: string | description: Page type whose pattern to change. For example, `STATIC_PAGE`, `BLOG_POST`, or `STORES_PRODUCT`. | required: true | validation: maxLength 100
   param name: seoPattern | type: SetSeoPattern | 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<SetSeoPatternResponse>
  - name: seoPattern | type: SeoPattern | description: The updated pattern.  
     - 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: COLLECTION_NAME_NOT_SUPPORTED | Description: A `collectionName` was specified. Resolving a dynamic page by collection isn't supported yet, so specify the page's GUID in `pageId` instead.
   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_FIELD_MASK | Description: The `fieldMask` is empty, or names a field that doesn't exist or isn't writable.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PATTERN | Description: The pattern 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: PATTERN_NOT_FOUND | Description: Couldn't find the pattern. The site has no pattern of its own for this page type, so call Create SEO Pattern instead.


```

### Examples

### Change a page type's pattern
The tags sent replace the pattern in full, so this call carries every tag the pattern should keep, not only the changed title.

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

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

/* Promise resolves to:
 * {
 *   "seoPattern": {
 *     "pageType": "STATIC_PAGE",
 *     "pattern": {
 *       "tags": [
 *         {
 *           "type": "title",
 *           "children": "{{page.name}} | {{site.business.name}}",
 *           "custom": false,
 *           "disabled": false
 *         },
 *         {
 *           "type": "meta",
 *           "props": { "name": "description", "content": "{{page.name}} at {{site.business.name}}." },
 *           "children": "",
 *           "custom": false,
 *           "disabled": false
 *         },
 *         {
 *           "type": "link",
 *           "props": { "rel": "canonical", "href": "{{page.url}}" },
 *           "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"
 *   }
 * }
 */

```

### setSeoPattern (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 setSeoPattern(pageType,seoPattern,options) {
  const response = await myWixClient.seoPatterns.setSeoPattern(pageType,seoPattern,options);
};
```

---