Skip to main content

Overview

The Webflow Enterprise API provides endpoints exclusively available to Enterprise workspace customers. These endpoints enable workspace-level management, audit logging, site activity tracking, and advanced site configuration.
All endpoints require an Enterprise workspace. They will return errors on non-Enterprise plans.

Download Skill

Add this skill to your AI agent for Enterprise API assistance:
https://skills.224ai.au/webflow-enterprise-api.skill

API Endpoints Overview

All endpoints use https://api.webflow.com/v2 as the base URL.

Audit & Activity

EndpointMethodScopeDescription
/workspaces/{id}/audit_logsGETworkspace_activity:readWorkspace audit logs
/sites/{id}/activity_logsGETsite_activity:readSite activity logs

Site Configuration

EndpointMethodScopeDescription
/sites/{id}/redirectsGETsites:readList 301 redirect rules
/sites/{id}/redirectsPOSTsites:writeCreate a 301 redirect
/sites/{id}/redirects/{rid}PATCHsites:writeUpdate a 301 redirect
/sites/{id}/redirects/{rid}DELETEsites:writeDelete a 301 redirect
/sites/{id}/robots_txtGETsite_config:readGet robots.txt configuration
/sites/{id}/robots_txtPUTsite_config:writeReplace robots.txt configuration
/sites/{id}/robots_txtPATCHsite_config:writeUpdate robots.txt configuration
/sites/{id}/robots_txtDELETEsite_config:writeDelete robots.txt rules
/sites/{id}/well_knownPUTsite_config:writeUpload a well-known file
/sites/{id}/well_knownDELETEsite_config:writeDelete well-known files

Workspace Management

EndpointMethodScopeDescription
/workspaces/{id}/sitesPOSTworkspace:writeCreate a new site
/sites/{id}PATCHsites:writeUpdate a site
/sites/{id}DELETEsites:writeDelete a site
/sites/{id}/planGETsites:readGet site hosting plan

Authentication

All endpoints require Bearer token authentication:
Authorization: Bearer <your-enterprise-token>
Use workspace API tokens (not site tokens) for workspace-level endpoints.

Key Features

Audit Logs

Track workspace events: logins, role changes, membership updates, and invitations

Site Activity

Monitor design changes, publishing events, CMS operations, and library updates

301 Redirects

Programmatically manage URL redirects for SEO and site migrations

Robots.txt

Configure crawler rules and sitemap URLs via API

Well-Known Files

Upload files to .well-known directory for domain verification

Workspace Management

Create, update, and delete sites within your workspace

Code Examples

Get Workspace Audit Logs

const response = await fetch(
  'https://api.webflow.com/v2/workspaces/YOUR_WORKSPACE_ID/audit_logs?limit=50',
  {
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Accept': 'application/json'
    }
  }
);

const data = await response.json();

data.auditLogs.forEach(log => {
  console.log(`${log.createdOn}: ${log.event} by ${log.payload.user?.email}`);
});

Get Site Activity Logs

const response = await fetch(
  'https://api.webflow.com/v2/sites/YOUR_SITE_ID/activity_logs?limit=50',
  {
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Accept': 'application/json'
    }
  }
);

const data = await response.json();

data.activityLogs.forEach(log => {
  console.log(`${log.createdOn}: ${log.event} - ${log.payload.description}`);
});

Create a 301 Redirect

const redirect = {
  from: '/old-page',
  to: '/new-page',
  permanent: true
};

const response = await fetch(
  'https://api.webflow.com/v2/sites/YOUR_SITE_ID/redirects',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(redirect)
  }
);

const data = await response.json();
console.log('Redirect created:', data);

List All Redirects

const response = await fetch(
  'https://api.webflow.com/v2/sites/YOUR_SITE_ID/redirects',
  {
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Accept': 'application/json'
    }
  }
);

const data = await response.json();

data.redirects.forEach(redirect => {
  console.log(`${redirect.from}${redirect.to}`);
});

Update Robots.txt

const robotsConfig = {
  rules: [
    {
      userAgent: '*',
      allow: ['/'],
      disallow: ['/admin/', '/private/']
    }
  ],
  sitemapUrl: 'https://example.com/sitemap.xml'
};

const response = await fetch(
  'https://api.webflow.com/v2/sites/YOUR_SITE_ID/robots_txt',
  {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(robotsConfig)
  }
);

const data = await response.json();
console.log('Robots.txt updated:', data);

Upload a Well-Known File

const fileContent = 'verification-code-here';

const response = await fetch(
  'https://api.webflow.com/v2/sites/YOUR_SITE_ID/well_known',
  {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      fileName: 'verification.txt',
      content: fileContent
    })
  }
);

const data = await response.json();
console.log('Well-known file uploaded:', data);

Create a New Site

const newSite = {
  displayName: 'My New Site',
  workspaceId: 'YOUR_WORKSPACE_ID',
  shortName: 'my-new-site'
};

const response = await fetch(
  'https://api.webflow.com/v2/workspaces/YOUR_WORKSPACE_ID/sites',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.WEBFLOW_ENTERPRISE_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(newSite)
  }
);

const data = await response.json();
console.log('Site created:', data);

Rate Limits

Rate limits apply to all endpoints. Check the X-RateLimit-Remaining response header to monitor your usage.
const response = await fetch(endpoint, options);

const remaining = response.headers.get('X-RateLimit-Remaining');
const limit = response.headers.get('X-RateLimit-Limit');

console.log(`Rate limit: ${remaining}/${limit} remaining`);

Pagination

List endpoints support pagination via limit and offset query parameters:
// Get first 50 audit logs
const page1 = await fetch(
  'https://api.webflow.com/v2/workspaces/ID/audit_logs?limit=50&offset=0',
  { headers: { 'Authorization': `Bearer ${token}` } }
);

// Get next 50 audit logs
const page2 = await fetch(
  'https://api.webflow.com/v2/workspaces/ID/audit_logs?limit=50&offset=50',
  { headers: { 'Authorization': `Bearer ${token}` } }
);

Important Notes

Never handle secrets in plain text. Store API tokens in environment variables or a secrets manager.
  • All endpoints require an Enterprise workspace
  • Use workspace API tokens for workspace-level endpoints
  • Use site API tokens for site-level endpoints
  • Rate limits are enforced — monitor headers
  • Pagination is required for large result sets
  • Always use HTTPS for API requests

Reference Documentation

The skill includes comprehensive reference documentation:

Audit & Activity

  • workspace-audit-logs.md — Workspace audit logs (login/logout, roles, membership, invitations)
  • site-activity-logs.md — Site activity logs (design changes, publishing, CMS, branches, libraries)

Site Configuration

  • 301-redirects.md — 301 redirect rules (list, create, update, delete)
  • robots-txt.md — Robots.txt crawler rules and sitemap URL (get, replace, update, delete)
  • well-known-files.md — Upload files to .well-known directory

Workspace Management

  • workspace-management.md — Create, update, delete sites, and get site plans

Searching References

# List all references with metadata
python scripts/search_references.py --list

# Search by tag (exact match)
python scripts/search_references.py --tag audit

# Search by keyword
python scripts/search_references.py --search redirects

Use Cases

Track all workspace and site activity for security audits, compliance reporting, and user action monitoring.
Bulk create and manage 301 redirects when migrating content or restructuring URLs for SEO preservation.
Programmatically create, configure, and manage multiple sites within an Enterprise workspace.
Upload verification files to .well-known for domain ownership verification with third-party services.
Configure robots.txt rules and sitemap URLs across multiple sites from a central automation script.

License

MIT License - See the repository for details.

Build docs developers (and LLMs) love