This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a redirect.
The from path can't be the site root, and can't already belong to another redirect unless
options.forceReplace is true. With options.forceReplace, the redirect that holds the path
is deleted and the new one is created in its place.
If the redirect would close a loop, meaning an existing redirect starts at the path this one points to, the redirect that closes the loop is deleted and the create proceeds. Both a conflicting redirect replaced this way and a loop-closing redirect are gone for good, so retrieve them first if you need to restore them.
Creating a redirect that already exists with the same from, to, and options.groupRedirect
changes nothing and returns the redirect from the request, without an id or a createdDate.
To create multiple redirects in a single API call, call Bulk Create Redirects. Note the
difference in how the two handle problems: this method resolves loops and, with
options.forceReplace, conflicts, while Bulk Create Redirects fails the individual redirect
instead.
You can only call this method when authenticated as a Wix app or Wix user identity.
There is 1 error with this status code.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.