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.
/api/customer/v1/projects/{projectId}Path parameters
| Name | Value |
|---|---|
projectId | Required 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.
| Field | Type | Required |
|---|---|---|
name | string | No |
description | string | No |
framework | string | No |
repositoryUrl | string | No |
branch | string | No |
githubInstallationId | integer | No |
rootDirectory | string | No |
buildType | string | No |
installCommand | string | No |
buildCommand | string | No |
startCommand | string | No |
outputDirectory | string | No |
healthCheckPath | string | No |
dockerfilePath | string | No |
dockerContextPath | string | No |
dockerBuildStage | string | No |
containerPort | integer | No |
dockerRuntimeVersions | object | No |
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.