Getting started
Back to home
Getting started

Update project settings

Change source, build or runtime settings. containerPort must be an integer from 1 to 65535. Stop the project before changing a locked port, then deploy; a conflicting update returns HTTP 409. Port source and lock timestamps are read-only. Omitted fields keep their values. Save environment variables and build secrets through their dedicated endpoints. To pin a language version, Railpack builds use its RAILPACK_*_VERSION environment variable (for example RAILPACK_NODE_VERSION); Dockerfile builds send dockerRuntimeVersions, such as {"node":"22"}, which sets the matching build argument and keeps the others. An empty version removes it.

PATCH/api/customer/v1/projects/{projectId}

Path parameters

NameValue
projectIdRequired resource ID from an earlier API response.

Request body

Send JSON with Content-Type: application/json. Nested fields and accepted values are listed in the schema.

FieldTypeRequired
namestringNo
descriptionstringNo
frameworkstringNo
repositoryUrlstringNo
branchstringNo
githubInstallationIdintegerNo
rootDirectorystringNo
buildTypestringNo
installCommandstringNo
buildCommandstringNo
startCommandstringNo
outputDirectorystringNo
healthCheckPathstringNo
dockerfilePathstringNo
dockerContextPathstringNo
dockerBuildStagestringNo
containerPortintegerNo
dockerRuntimeVersionsobjectNo
Full request schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "framework": {
      "type": "string"
    },
    "repositoryUrl": {
      "type": "string"
    },
    "branch": {
      "type": "string"
    },
    "githubInstallationId": {
      "type": "integer",
      "minimum": 1
    },
    "rootDirectory": {
      "type": "string"
    },
    "buildType": {
      "type": "string"
    },
    "installCommand": {
      "type": "string"
    },
    "buildCommand": {
      "type": "string"
    },
    "startCommand": {
      "type": "string"
    },
    "outputDirectory": {
      "type": "string"
    },
    "healthCheckPath": {
      "type": "string"
    },
    "dockerfilePath": {
      "type": "string"
    },
    "dockerContextPath": {
      "type": "string"
    },
    "dockerBuildStage": {
      "type": "string"
    },
    "containerPort": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "dockerRuntimeVersions": {
      "type": "object",
      "properties": {
        "node": {
          "type": "string"
        },
        "bun": {
          "type": "string"
        },
        "deno": {
          "type": "string"
        },
        "python": {
          "type": "string"
        },
        "go": {
          "type": "string"
        },
        "java": {
          "type": "string"
        },
        "ruby": {
          "type": "string"
        },
        "rust": {
          "type": "string"
        },
        "elixir": {
          "type": "string"
        },
        "erlang": {
          "type": "string"
        },
        "dotnet": {
          "type": "string"
        }
      },
      "required": [],
      "additionalProperties": false
    }
  },
  "required": [],
  "additionalProperties": false
}

Example request

Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.

curl --request PATCH "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}" \
  --header "Authorization: Bearer $HCODE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "name": "example-app"
}'

Response

The JSON shape is defined in the response schema.

Response schema
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    },
    "operationId": {
      "type": "string"
    },
    "operation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "operationId": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "errorMessage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "startedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "finishedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "status"
      ],
      "additionalProperties": true
    },
    "deploymentId": {
      "type": "string"
    },
    "projectId": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "operations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "href"
        ]
      }
    }
  },
  "required": [],
  "additionalProperties": true
}

See errors and retries for failure responses.