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.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/marketing/url-rewrites | POST |
Details
- Requires an admin Bearer token and the
marketing.search_seo.url_rewrites.createpermission. - Returns the full rewrite payload.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
entity_type | string | yes | product, category, or cms_page |
request_path | string | yes | Source path the shopper requests |
target_path | string | yes | Path the shopper is redirected to |
redirect_type | string | yes | 301 permanent / 302 temporary |
locale | string | yes | Locale code; must exist in the store's locales |

