Overview
Cloudflare Pages is a JAMstack platform for frontend developers to collaborate and deploy websites. Use the Pages API to manage projects, deployments, and domains programmatically.Initialize the client
Projects
Manage Pages projects.Create a project
Create a new Pages project.string
required
Account identifier
string
required
Project name
string
required
The Git branch that will be used for production deployments
object
Build configuration settings
object
Deployment configuration for production and preview environments
string
Project identifier
string
Project name
string
The project’s
*.pages.dev subdomainstring
When the project was created
List projects
Fetch all projects in an account.string
required
Account identifier
Get a project
Fetch a specific project by name.Update a project
Set new attributes for an existing project, including environment variables.string
The Git branch for production deployments
object
Environment-specific deployment configuration
Delete a project
Delete a project by name.Purge build cache
Purge the build cache for a project.Deployments
Manage Pages deployments for a project.Create deployment
Create a new deployment.List deployments
List all deployments for a project.Get deployment
Get details of a specific deployment.Delete deployment
Delete a deployment.Retry deployment
Retry a failed deployment.Rollback deployment
Rollback to a previous deployment.Domains
Manage custom domains for a project.create()- Add a custom domainlist()- List all custom domainsget()- Get domain detailsdelete()- Remove a custom domain
Types
Project
string
Project identifier
string
Project name
string
The
*.pages.dev subdomainstring
Git branch for production
string
Creation timestamp
Deployment
string
Deployment identifier
string
Deployment URL
string
Deployment environment (production or preview)
string
When the deployment was created
Stage
Deployment stage information.string
Stage name
string
Stage status