Skip to main content
Project and deployment routes need a key scoped to all, deploy, or project. Uploading source needs all or deploy and read_write permission.

Deploy source

POST /projects/spacedrop This endpoint uses multipart/form-data. Send exactly one file: a zip of your project, an index.html, or an index.php. The upload limit is 100 MB.
file
required
Project source. Any form field name works, but send only one file.
string
New project name: 3 to 63 lowercase letters, numbers, or hyphens. Required when projectId is not set.
string
Pxxl domain suffix for a new project, such as pxxl.pro. Required when projectId is not set.
string
Existing project that receives a new deployment.
string
Team that owns a new project.
number
default:"3000"
Port your app listens on, from 1 to 65535.
string
default:"production"
Environment name.
prod | staging
default:"prod"
Deploy target.
string
Project root inside a monorepo.
string
Custom dependency install command.
string
Custom build command.
string
Custom start command.
string
Label shown on the deployment.
You can also override detection with language, framework, runtime, entryFile, and packageManager.
Response 201
When you send projectId, the response has projectId, deploymentId, domainName, message, and asset.

Projects

GET /cli/projects/{projectId} returns id, name, projectType, source, githubUrl, githubBranch, baseDirectory, framework, and language. PUT /cli/projects/{projectId} accepts any of name, port, language, framework, projectType, baseDirectory, branch, installCommand, buildCommand, startCommand, nodeVersion, pythonVersion, goVersion, runtimeVersion, healthCheckPath, healthCheckMethod, healthCheckMode, healthCheckExpectedStatus, limits_cpus, and limits_memory.

Redeploy

commitSha must be 7 to 40 hex characters. Leave it out to redeploy the latest commit.
Response 201
POST /projects/{projectId}/redeploy does the same and accepts keys scoped to all or deploy.

Project control

A cache purge needs a stable id that you choose, so a retry does not purge twice. Add deployment_id to purge only one deployment’s cache.

Deployments and logs

When cursor reads are on and you pass afterSequence or limit, the response adds nextSequence, hasMore, and isComplete. Build logs past your plan’s retention come back empty with isComplete: true.
Build logs for people come from /cli/deployments/{deploymentId}/build-logs. The /logs route returns the raw stored build log.