Create a 301 redirect
/sites/{site_id}/redirects Add a new 301 redirection rule to a site.
This endpoint allows you to define a source path (fromUrl) and its corresponding destination path (toUrl), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links.
This endpoint requires an Enterprise workspace.
Required scope: sites:write
Parameters
path Path Parameters
| Name | Type |
|---|---|
site_id
required
Unique identifier for a Site | string |
Request Body
Responses
Request was successful
Client Errors
Request body was incorrectly formatted.
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
Provided access token is invalid or does not have access to requested resource
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
Requested resource not found
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
Server Errors
We had a problem with our server. Try again later.
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}