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.Account identifier
Project name
The Git branch that will be used for production deployments
Build configuration settings
Deployment configuration for production and preview environments
Project identifier
Project name
The project’s
*.pages.dev subdomainWhen the project was created
List projects
Fetch all projects in an account.Account identifier
Get a project
Fetch a specific project by name.Update a project
Set new attributes for an existing project, including environment variables.The Git branch for production deployments
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
Project identifier
Project name
The
*.pages.dev subdomainGit branch for production
Creation timestamp
Deployment
Deployment identifier
Deployment URL
Deployment environment (production or preview)
When the deployment was created
Stage
Deployment stage information.Stage name
Stage status