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.

Endpoint

EndpointMethod
/api/admin/marketing/url-rewrites/{id}PUT

Details

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

Request body

FieldTypeRequiredNotes
entity_typestringnoproduct, category, or cms_page
request_pathstringnoSource path the shopper requests
target_pathstringnoPath the shopper is redirected to
redirect_typestringno301 permanent / 302 temporary
localestringnoLocale code; must exist in the store's locales

Released under the MIT License.