POST

Create Seo Pattern


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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

Before creating a pattern:

  1. Call Get SEO Pattern for the same pageType. For a page-specific WIX_DATA_PAGE_ITEM pattern, pass the same pageId to Get that you will send in seoPattern.pageId to Create. Create only when source is PATTERN_SOURCE_DEFAULT. If it is PATTERN_SOURCE_USER, call Set SEO Pattern instead. Creating an existing pattern fails with PATTERN_ALREADY_EXISTS (409).
  2. Call List SEO Pattern Variables for that pageType. Use the returned key values inside double braces, such as {{blog-post.title}} for BLOG_POST, not {{post.title}}. Names differ by page type; an unknown variable fails with INVALID_PATTERN (400).

The pattern must contain at least one tag. Build the complete desired tag list from defaultPattern, because the new pattern replaces the page type's tag templates. To leave a page type on its Wix default, create nothing for it.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permission Scopes
Manage SEO Settings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/seo-metatags-server/v1/seo-patterns/{pageType}

Errors
400Invalid Argument

There are 3 errors with this status code.

404Not Found

There is 1 error with this status code.

409Already Exists

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?