PATCH

Set Item Seo Tags


Developer Preview

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

Sets the SEO tags of a single item.

List the fields to change in fieldMask.

Setting tags replaces the item's tags in full, so send the complete set you want the item to have. To return the item to the tags it inherits, call Reset Item SEO Tags To Default rather than sending an empty list.

Whether the change reaches the live site immediately depends on the item type. Items that keep no separate draft, such as store products, are always live. Static pages keep a draft and a published version, so set publish to true to update the published one. A blog post that's already published stays published. Setting publish for an item type that keeps no draft has no effect.

For a static page, publish: true saves the changed fields to the draft first, then updates the existing published revision with the same payload. A later Editor publish retains these SEO changes when no intervening edit replaces them. Get and List read the saved revision; this response is not a rendered-page check.

Writes are last-write-wins. The two revisions are not an atomic transaction; concurrent writers can leave them different. Serialize conflicting item edits. This response represents the accepted payload; optional resolved tags are best-effort. If no published revision exists, the draft stays saved and the call fails with DRAFT_SAVED_NOT_PUBLISHED (FAILED_PRECONDITION). Error data contains draftSaved: true and the savedItemIds. This operation never publishes an entire site. Other publication failures also report that the draft saved. Unexpected failures report the saved item IDs and publicationStatus: UNKNOWN in their message; system errors do not expose application error data.

Tags are validated before anything is saved, so a request that contains an invalid tag changes nothing.

Tags can currently be written only for the item's primary language: leave itemSeoTags.language unset. Sending a language fails with LANGUAGE_NOT_SUPPORTED, even when fieldMask doesn't name it.

To set the tags of many items in one call, call Bulk Set Item SEO Tags.

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
PATCH
https://www.wixapis.com/seo-metatags-server/v1/item-seo-tags/{itemType}/{itemId}

Errors
400Invalid Argument

There are 3 errors with this status code.

404Not Found

There is 1 error with this status code.

428Failed Precondition

There is 1 error with this status code.

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

Did this help?