Create redirect
create_redirectIdempotent
Create a Shopify URL redirect. Preferred: pass brokenLinkId (from list_broken_links, internal links only) plus target, which also marks the broken link fixed. Or pass path + target directly. Targets must be an existing page on the store (or '/'); redirects into another 404 are refused.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Broken path, e.g. /products/old-handle (when no brokenLinkId) | |
| target | Yes | Where to send visitors, e.g. /products/new-handle or / | |
| brokenLinkId | No | Fix this broken link (preferred) |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| path | Yes | ||
| target | Yes | The target that was requested | |
| created | Yes | False when the path already had a redirect and nothing changed | |
| message | Yes | What to tell the merchant | |
| existingTarget | No | Where the path already redirected; present only when created is false | |
| existingTargetUnknown | No | A redirect existed but Shopify didn't reveal its target |