Builds API

Builds API

Deploy your application by creating builds through the API.

GET/organizations/:orgId/projects/:projectId/endpoints

Returns a flat list of the live URLs for a project — the default URL plus any connected (active) custom domains.

Response
{
  "endpoints": [
    "https://abc123.justdeploy.site",
    "https://www.example.com"
  ]
}
GET/organizations/:orgId/projects/:projectId/builds

Returns the most recent builds for a project (up to 50).

Response
{
  "builds": [
    {
      "id": "b1234567-abcd-...",
      "commit": null,
      "version": "1.0.0",
      "runtime": "nodejs22.x",
      "size": 524288,
      "status": "ready",
      "error": null,
      "createdAt": "2026-03-20T...",
      "updatedAt": "2026-03-20T..."
    }
  ]
}
POST/organizations/:orgId/projects/:projectId/builds

Create a new build. Returns a presigned upload URL for uploading your application code as a .zip file.

Response
{
  "build": {
    "id": "b2345678-efgh-...",
    "commit": null,
    "version": null,
    "runtime": null,
    "size": null,
    "status": "pending",
    "error": null,
    "createdAt": "2026-03-20T...",
    "updatedAt": "2026-03-20T..."
  },
  "url": "https://upload.justdeploy.net/..." // Presigned upload URL
}

Upload your zip file to the presigned URL:

Upload
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/zip" \
  --data-binary @app.zip

If a build for this project is already in progress, the request returns 409 Conflict with the existing build so you can poll it and retry once it finishes.

Conflict response (409)
{
  "status": "Conflict",
  "message": "A build is already in progress for this project.",
  "build": {
    "id": "b1234567-abcd-...",
    "status": "building",
    "createdAt": "2026-05-05T..."
  }
}
GET/organizations/:orgId/projects/:projectId/builds/:buildId

Check the status of a build. Poll this endpoint until the status reaches ready or error.

Response
{
  "build": {
    "id": "b2345678-efgh-...",
    "commit": null,
    "version": "1.0.0",
    "runtime": "nodejs22.x",
    "size": 524288,
    "status": "ready",
    "error": null,
    "createdAt": "2026-03-20T...",
    "updatedAt": "2026-03-20T..."
  }
}

Full deployment flow

Complete example
# 1. Create a build
BUILD=$(curl -s -X POST \
  "https://api.justdeploy.net/organizations/ORG_ID/projects/PROJECT_ID/builds" \
  -H "X-Access-Key: $ACCESS_KEY" \
  -H "X-Secret-Key: $SECRET_KEY")

UPLOAD_URL=$(echo $BUILD | jq -r '.url')
BUILD_ID=$(echo $BUILD | jq -r '.build.id')

# 2. Upload your code
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/zip" \
  --data-binary @app.zip

# 3. Poll for completion
curl -s \
  "https://api.justdeploy.net/organizations/ORG_ID/projects/PROJECT_ID/builds/$BUILD_ID" \
  -H "X-Access-Key: $ACCESS_KEY" \
  -H "X-Secret-Key: $SECRET_KEY"

Supported runtimes

JustDeploy detects your runtime automatically from your project. The runtime field returned in the build response is one of:

  • nodejs24.x
  • nodejs22.x
  • python3.14
  • python3.13
  • python3.12
  • java21
  • java17