The Server API is based on our Plugin API and shares most methods. Below are the extra or different methods for the Server API.
Create a new connection to a project
import { connect } from "framer-api"
const framer = await connect(projectUrl, process.env.FRAMER_API_KEY)import { connect } from "framer-api"
const framer = await connect(projectUrl, process.env.FRAMER_API_KEY)import { connect } from "framer-api"
const framer = await connect(projectUrl, process.env.FRAMER_API_KEY)This creates a long-lived connection to Framer and requires explicit manual disconnection
Get the paths of pages that have changed between versions
framer.getChangedPaths(): Promise<{ added: string[], removed: string[], modified: string[] }framer.getChangedPaths(): Promise<{ added: string[], removed: string[], modified: string[] }framer.getChangedPaths(): Promise<{ added: string[], removed: string[], modified: string[] }Get the authors who made changes between versions
framer.getChangeContributors(fromVersion?: number, toVersion?: number): Promise<string[]
framer.getChangeContributors(fromVersion?: number, toVersion?: number): Promise<string[]
framer.getChangeContributors(fromVersion?: number, toVersion?: number): Promise<string[]
Creates a new managed collection in the project
framer.createManagedCollection(name: string): Promise<ManagedCollection
framer.createManagedCollection(name: string): Promise<ManagedCollection
framer.createManagedCollection(name: string): Promise<ManagedCollection
Publish a new preview link
framer.publish(): Promise<{deployment: { id: string }}framer.publish(): Promise<{deployment: { id: string }}framer.publish(): Promise<{deployment: { id: string }}Promote a published link to production
framer.deploy(deployment.id)
framer.deploy(deployment.id)
framer.deploy(deployment.id)
Please see the Reference page for the documentation for all other methods.