For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Data API
    • Introduction
  • Token
    • GETGet Authorization User Info
    • GETGet Authorization Info
  • Sites
    • GETList Sites
    • GETGet Site
    • GETGet Custom Domains
    • POSTPublish Site
  • Pages and Components
  • CMS
  • Forms
  • Custom Code
  • Assets
  • Custom fonts
  • Comments
    • GETList Comment Threads
    • GETGet Comment Thread
    • GETList Comment Replies
  • Ecommerce
  • Webhooks
    • GETList Webhooks
    • GETGet Webhook
    • POSTCreate Webhook
    • DELRemove Webhook
  • Site Configuration
  • Enterprise
        • GETGet 301 redirects
        • POSTCreate a 301 redirect
        • PATCHUpdate 301 redirect
        • DELDelete 301 redirects
LogoLogo
Resources
Get started
EnterpriseSite Configuration301 Redirects

Create a 301 redirect

POST
https://api.webflow.com/v2/sites/:site_id/redirects
POST
/v2/sites/:site_id/redirects
$curl -X POST https://api.webflow.com/v2/sites/580e63e98c9a982ac9b8b741/redirects \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "fromUrl": "/mostly-harmless",
> "toUrl": "/earth"
>}'
1{
2 "id": "42e1a2b7aa1a13f768a0042a",
3 "fromUrl": "/mostly-harmless",
4 "toUrl": "/earth"
5}
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. <Warning title="Enterprise Only">This endpoint requires an Enterprise workspace.</Warning> Required scope: `sites:write`
Was this page helpful?
Previous

Update 301 redirect

Next
Built with

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.

Enterprise Only
This endpoint requires an Enterprise workspace.

Required scope: sites:write

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Request

A single redirection rule, specifying a source URL and a destination URL.
fromUrlstringOptional
The source URL path that will be redirected.
toUrlstringOptional
The target URL path where the user or client will be redirected.

Response

Request was successful
idstringRead-only
The ID of the specific redirect rule
fromUrlstring
The source URL path that will be redirected.
toUrlstring
The target URL path where the user or client will be redirected.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error