Create URL redirect
Adds a 301 redirect to the app’s published site.
Use it to keep old links working after you rename or remove a page. The rule takes effect on the published site once this call returns.
Base44 also tries to drop any cached copy of the source path so visitors get the redirect straight away, but that step is best effort and the response does not report it. When it does not land, the source URL keeps serving its cached page with a 200 instead of the new 301 until the cache revalidates or expires on its own. For a prefix rule only the cached children Base44 already tracks are dropped; the rest fall through the same way.
Both paths start with /, are at most 512 characters, and carry no query string or fragment; Base44 strips a trailing slash and decodes percent-escapes before storing them, so /old/ and /%6Fld are the same rule. target_path may instead be an absolute https:// URL to send visitors to another site.
A rule is rejected when its source is a reserved path the redirect layer never sees (/sitemap.xml, /robots.txt, /favicon.ico, /manifest.json, /link_preview.png, /llms.txt, /.well-known/*, and the app’s auth paths), when source and target are equal, when a prefix rule starts at /, and when it overlaps another rule or would make a visitor follow two redirects in a row. Overlap is resolved against the whole rule set, so a prefix rule at /docs blocks a single rule at /docs/intro, and an internal target that matches any other rule’s source is a chain.
An app can hold up to 50 rules; the 51st is rejected with a 400.
Authorizations
Personal API key.
Path Parameters
ID of the app whose URL redirects to manage.
Body
Path visitors request, starting with /. Base44 strips a trailing slash and decodes percent-escapes before storing it, so /old/ and /%6Fld are the same rule.
1 - 512"/old-pricing"
Where to send them: an internal path starting with /, or an absolute https:// URL on another site. Store it without a query string or fragment; the visitor's own query string is carried over to the destination, so /old?utm=x lands on /new?utm=x.
1 - 512"/pricing"
single redirects that exact path. prefix redirects it and everything under it, keeping the remainder of the path. Defaults to single, so omitting it on an update turns an existing prefix rule into a single one and its child paths stop redirecting.
single, prefix "single"
Response
The redirect that was created.
One 301 redirect rule on the app's published site.
ID of the redirect. Pass it as redirect_id to Update URL redirect and Delete URL redirect.
"68c2d1e5f3b8a4216e9b5583"
The path visitors request, normalized: no trailing slash, percent-escapes decoded.
"/old-pricing"
Where the visitor is sent. Either an internal path or an absolute https:// URL on another site.
"/pricing"
single redirects that exact path. prefix redirects the path and everything under it, keeping the remainder of the path.
single, prefix "single"