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
| Operation | Type | Purpose |
|---|---|---|
createAdminMarketingUrlRewrite | Mutation | Create a URL rewrite |
Details
- Requires an admin Bearer token and the
marketing.search_seo.url_rewrites.createpermission. - The mutation returns the full rewrite payload.
Input fields
| Field | Type | Required | Notes |
|---|---|---|---|
entityType | String | Yes | product, category, or cms_page |
requestPath | String | Yes | Source path the shopper requests |
targetPath | String | Yes | Destination path the request redirects to |
redirectType | String | Yes | 301 permanent / 302 temporary |
locale | String | Yes | Locale code; must exist in the store's locales |

