API reference
Projects
Create, read, update, transfer and delete projects.
A project links a repository to builds and deployments.
GET /v1/orgs/:orgId/projects
Lists the organization's projects.
Auth: user access token or platform agent key · Scope: projects:read · Allowed: deployments:read; domains:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
| Query parameter | Type | Required | Notes |
|---|---|---|---|
include | "summary" | No |
Response 200
{
projects: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}[]
}
| {
projects: {
latest?: {
error?: string
status?: "error" | "queued" | "building" | "deploying" | "ready" | "canceled" | "expired" | "skipped"
createdAt?: number
updatedAt?: number
region?: string
orgId: string
createdBy?: string
projectId: string
location: string
deploymentId: string
target: "preview" | "production"
branch?: string
commitSha?: string
commitMessage?: string
commitAuthor?: string
host?: string
buildId?: string
buildDurationMs?: number
readyAt?: number
crons?: string
envHash?: string
previousDeploymentId?: string
reason?: string
buildMetrics?: {
restoreMs?: number
installMs?: number
buildMs?: number
uploadMs?: number
saveMs?: number
depsCache?: "hit" | "partial" | "miss" | "off"
nextCache?: "hit" | "partial" | "miss" | "off"
packageManager?: string
installDir?: string
}
}
production?: {
error?: string
status?: "error" | "queued" | "building" | "deploying" | "ready" | "canceled" | "expired" | "skipped"
createdAt?: number
updatedAt?: number
region?: string
orgId: string
createdBy?: string
projectId: string
location: string
deploymentId: string
target: "preview" | "production"
branch?: string
commitSha?: string
commitMessage?: string
commitAuthor?: string
host?: string
buildId?: string
buildDurationMs?: number
readyAt?: number
crons?: string
envHash?: string
previousDeploymentId?: string
reason?: string
buildMetrics?: {
restoreMs?: number
installMs?: number
buildMs?: number
uploadMs?: number
saveMs?: number
depsCache?: "hit" | "partial" | "miss" | "off"
nextCache?: "hit" | "partial" | "miss" | "off"
packageManager?: string
installDir?: string
}
}
productionHost?: string
repo?: {
resourceId: string
name: string
}
domains?: {
hostname: string
status?: "error" | "active" | "pending" | "verifying"
redirectTo?: string
}[]
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}[]
}Errors
| Status | Message |
|---|---|
404 | Organization not found |
404 | Not found |
404 | Commit not found |
POST /v1/orgs/:orgId/projects
Creates a project. Without location, the registry's default location is used.
Auth: user access token or platform agent key · Scope: projects:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Request body
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
name | string | Yes | 1–64 characters; trimmed | |
slug | string | Yes | matches ^[a-z0-9][a-z0-9-]{0,38}[a-z0-9]$ | |
repoId | string | No | ||
framework | "nextjs" | "static" | "node" | No | "nextjs" | |
rootDirectory | string | No | "." | up to 256 characters; trimmed |
location | string | No |
Response 201
{
project: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}
deployment: null | {
deploymentId: string
host: string
target: "preview" | "production"
}
}Errors
| Status | Message |
|---|---|
400 | Repository not found in this organization. |
400 | Unknown location: … |
409 | A project with this slug exists. |
GET /v1/orgs/:orgId/projects/:projectId
A project with its most recent deployments and, once it has a production deployment, its production hostname.
Auth: user access token or platform agent key · Scope: projects:read · Allowed: domains:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:projectId | Project id (prj_…). |
Response 200
{
project: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}
productionHost?: string
deployments: {
error?: string
status?: "error" | "queued" | "building" | "deploying" | "ready" | "canceled" | "expired" | "skipped"
createdAt?: number
updatedAt?: number
region?: string
orgId: string
createdBy?: string
projectId: string
location: string
deploymentId: string
target: "preview" | "production"
branch?: string
commitSha?: string
commitMessage?: string
commitAuthor?: string
host?: string
buildId?: string
buildDurationMs?: number
readyAt?: number
crons?: string
envHash?: string
previousDeploymentId?: string
reason?: string
buildMetrics?: {
restoreMs?: number
installMs?: number
buildMs?: number
uploadMs?: number
saveMs?: number
depsCache?: "hit" | "partial" | "miss" | "off"
nextCache?: "hit" | "partial" | "miss" | "off"
packageManager?: string
installDir?: string
}
}[]
production?: {
error?: string
status?: "error" | "queued" | "building" | "deploying" | "ready" | "canceled" | "expired" | "skipped"
createdAt?: number
updatedAt?: number
region?: string
orgId: string
createdBy?: string
projectId: string
location: string
deploymentId: string
target: "preview" | "production"
branch?: string
commitSha?: string
commitMessage?: string
commitAuthor?: string
host?: string
buildId?: string
buildDurationMs?: number
readyAt?: number
crons?: string
envHash?: string
previousDeploymentId?: string
reason?: string
buildMetrics?: {
restoreMs?: number
installMs?: number
buildMs?: number
uploadMs?: number
saveMs?: number
depsCache?: "hit" | "partial" | "miss" | "off"
nextCache?: "hit" | "partial" | "miss" | "off"
packageManager?: string
installDir?: string
}
}
repo?: {
resourceId: string
name: string
}
domains?: {
message?: string
status?: "error" | "active" | "pending" | "verifying"
createdAt?: number
updatedAt?: number
orgId: string
projectId: string
hostname: string
tenantId?: string
certificateArn?: string
records?: string
zone?: string
dnsProvider?: string
checkedAt?: number
redirectTo?: string
}[]
functionConfig: {
memoryMb: 1024
timeoutSeconds: 30
architecture: "arm64"
runtime: "nodejs22.x"
}
}Errors
| Status | Message |
|---|---|
404 | Project not found |
404 | Organization not found |
404 | Not found |
404 | Commit not found |
PATCH /v1/orgs/:orgId/projects/:projectId
Updates the name, repository link, production branch, root directory or build and install commands. repoId: null unlinks the repository.
Auth: user access token or platform agent key · Scope: projects:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:projectId | Project id (prj_…). |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | No | 1–64 characters; trimmed |
slug | string | No | matches ^[a-z0-9][a-z0-9-]{0,38}[a-z0-9]$ |
framework | "nextjs" | "static" | "node" | No | |
repoId | string | No | can be null |
productionBranch | string | No | 1–255 characters; trimmed |
rootDirectory | string | No | up to 256 characters; trimmed |
buildCommand | any JSON | Yes | |
installCommand | any JSON | Yes | |
outputDirectory | any JSON | Yes | |
location | string | No | at least 1 character |
Response 200
{
project: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}
}
| {
project: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
repoId?: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}
deployment: null | {
deploymentId: string
host: string
target: "preview" | "production"
}
}Errors
| Status | Message |
|---|---|
400 | Repository not found in this organization. |
400 | Unknown location: … |
404 | Project not found |
404 | Organization not found |
409 | A project with this slug exists. |
POST /v1/orgs/:orgId/projects/:projectId/transfer
Moves a project to another org the caller administers. Deployments, domains, environment variables (re-encrypted for the new org) and crons move with it; the repository stays and is disconnected, and linked storage must be unlinked first.
Auth: user access token or platform agent key · Scope: org:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:projectId | Project id (prj_…). |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
orgId | string | Yes | at least 1 character |
Response 200
{
project: {
name: string
createdAt?: number
updatedAt?: number
orgId: string
slug: string
createdBy: string
projectId: string
productionBranch?: string
framework?: "static" | "nextjs" | "node"
rootDirectory?: string
buildCommand?: string
installCommand?: string
outputDirectory?: string
location: string
productionDeploymentId?: string
}
org: {
orgId: string
slug: string
}
}Errors
| Status | Message |
|---|---|
400 | The project is already in this organization. |
404 | Project not found |
404 | Organization not found |
409 | Unlink this project's databases and buckets first. They stay in this organization. |
409 | Wait for the deployment in progress to finish. |
409 | … already has a project with this slug. Rename it first. |
DELETE /v1/orgs/:orgId/projects/:projectId
Deletes a project: its domains (routes and certificates), crons, server functions, routes, deployment records and environment variables. Linked storage is unlinked, not deleted, and the repository is kept.
Auth: user access token or platform agent key · Scope: projects:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:projectId | Project id (prj_…). |
Response 204 with no body.
Errors
| Status | Message |
|---|---|
404 | Project not found |
404 | Organization not found |
409 | Wait for the deployment in progress to finish. |
502 | Couldn't remove all of the project's resources. Try again. |