Skip to content

Update URL Rewrite

Updates an existing URL rewrite — the Edit action on the admin Marketing → Search & SEO → URL Rewrites screen.

TIP

New here? Read the URL Rewrites overview for what a URL rewrite does and how its fields behave.

Operation

OperationTypePurpose
updateAdminMarketingUrlRewriteMutationUpdate a URL rewrite

Details

  • Requires an admin Bearer token and the marketing.search_seo.url_rewrites.edit permission.
  • Pass the rewrite's IRI as id. The update is a partial merge — send only the fields you want to change; omitted fields keep their existing values.
  • The mutation returns the full updated rewrite payload.

Input fields

FieldTypeRequiredNotes
idIDYesThe rewrite's IRI
entityTypeStringNoproduct, category, or cms_page
requestPathStringNoSource path the shopper requests
targetPathStringNoDestination path the request redirects to
redirectTypeStringNo301 permanent / 302 temporary
localeStringNoLocale code; must exist in the store's locales

Released under the MIT License.