Skip to content

Create URL Rewrite

Creates a URL rewrite — the Create 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
createAdminMarketingUrlRewriteMutationCreate a URL rewrite

Details

  • Requires an admin Bearer token and the marketing.search_seo.url_rewrites.create permission.
  • The mutation returns the full rewrite payload.

Input fields

FieldTypeRequiredNotes
entityTypeStringYesproduct, category, or cms_page
requestPathStringYesSource path the shopper requests
targetPathStringYesDestination path the request redirects to
redirectTypeStringYes301 permanent / 302 temporary
localeStringYesLocale code; must exist in the store's locales

Released under the MIT License.