The `webflow-api` package provides a JavaScript/TypeScript SDK for interacting with the Webflow Data API. It offers convenient access to Webflow resources such as sites, CMS items, assets, and comments, along with robust support for authentication via workspace or site tokens and OAuth. The SDK, currently at version 3.3.4, is actively maintained with frequent releases driven by its Fern-generated structure, ensuring up-to-date typings and request builders that align closely with the latest Webflow API specifications. Key differentiators include its comprehensive type definitions, automatic regeneration via Fern, and integrated utilities for complex operations like asset uploads and OAuth flows, distinguishing it from manual API client implementations. It requires Node.js version 18 or higher.
npm install webflow-apiVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the WebflowClient with an access token from environment variables, then demonstrates listing all sites, retrieving a specific site's details, and conditionally publishing a site. It highlights basic API interaction patterns.
Upgrade your Node.js environment to version 18.0.0 or later.
Refer to the latest Webflow Data API documentation for updated methods to interact with form submissions and migrate your code accordingly.
Remove any direct references to the `isMembersOnly` property from `Page` type objects in your code. Consult the latest API documentation for alternative properties if needed.
Ensure you generate a valid API token from your Webflow Dashboard and pass it as the `accessToken` option when creating a new `WebflowClient` instance. Example: `new WebflowClient({ accessToken: process.env.WEBFLOW_API_TOKEN });`Follow the official Webflow OAuth documentation precisely. Ensure your Webflow App is registered correctly, and that `clientId`, `redirectUri`, and `state` parameters match your application's setup when calling `WebflowClient.authorizeURL` and `WebflowClient.getAccessToken`.
Initialize `WebflowClient` with a valid Webflow API token: `new WebflowClient({ accessToken: 'your-webflow-token' });` Ensure the token is not empty or undefined.For ES Modules, use `import { WebflowClient } from 'webflow-api';`. For CommonJS, use `const { WebflowClient } = require('webflow-api');` to destructure the named export correctly.Update your code to use the new, dedicated API endpoints and methods for form submissions as per the latest Webflow API documentation. The structure for interacting with these resources has changed.
If running in a browser, ensure your bundler is configured to replace `process.env` with actual environment variables or a polyfill. Alternatively, pass tokens directly without relying on `process.env`.
No dependency data recorded yet.