Skip to main content
POST
cURL
This endpoint has a rate limit of 1 request every 3 seconds.
Only the fields you send are changed. Fields that are not listed below (for example team) are rejected with 400.
Most changes are not applied immediately: the response comes back with restartRequired: true and the new settings take effect the next time the application is started or restarted.
environmentVariables replaces the whole list. Omit the field to keep the current variables; send [] to remove all of them. A variable with an empty value makes the request fail with 500.
buildCommand runs after the dependencies are installed and before startupCommand; send "" to remove it. Changing mainFile also updates a start command that was the default of the runtime (for example node index.js); a start command you wrote stays as it is.
A custom domain (assignedCustomDomain) is not routed right away. The response brings customDomainPending, customDomainTxtName and customDomainTxtValue: publish that TXT record in your DNS and confirm with POST /v1/apps/{appId}/custom-domain/verify.

Authorizations

Authorization
string
header
required

Your CamposCloud API token, sent as Authorization: Bearer <token>.

Path Parameters

appId
string
required

ID of the application to update

Body

application/json

Application data to update

Only the fields that are sent are changed. Unknown fields (for example team) are rejected with 400.

appName
string

The new name of the application. At least 3 characters.

Minimum string length: 3
Example:

"My Updated Application"

memoryMB
integer

Memory to allocate, in MB. Must fit in the memory left on the plan.

Required range: x >= 256
Example:

512

runtimeEnvironment
enum<string>

The runtime environment of the application.

Available options:
nodejs,
bun,
python
Example:

"nodejs"

startupCommand
string

The command used to start the application. An empty string is rejected.

Required string length: 3 - 500
Example:

"node index.js"

autoRestartEnabled
boolean

Restart the application automatically.

Example:

true

exposedViaWeb
boolean

Expose the application to the web. When true, port is required. When false, the port, the subdomain and the custom domain of the application are removed.

Example:

false

port
integer

Port your application listens on.

Required range: 1 <= x <= 65535
Example:

3000

assignedSubdomain
string

Subdomain for the application. Only accepted when the application is (or is being) exposed via web. Must not be in use by another application.

Required string length: 3 - 63
Pattern: ^[a-z0-9-]+$
Example:

"myapp"

assignedCustomDomain
string

Custom domain for the application. Only accepted when the application is (or is being) exposed via web, and the domain must use Cloudflare nameservers. The domain is not routed right away: it stays pending (customDomainPending) until you publish the TXT record returned in customDomainTxtName and customDomainTxtValue and call POST /v1/apps/{appId}/custom-domain/verify. Send an empty string to remove it.

Maximum string length: 253
Example:

"app.example.com"

environmentVariables
object[]

Replaces all environment variables. Omit the field to keep the current ones; send [] to remove all of them.

buildCommand
string

Command that builds the application, run after the dependencies are installed and before the start command (for example npm run build). Send an empty string to remove it. It is kept apart from startupCommand.

Maximum string length: 500
Example:

"npm run build"

mainFile
string

The main file of the application, relative to its root. When the start command was the default of the runtime for the old file (for example node index.js), it follows the new file; a start command you wrote stays as it is. Paths with .. are rejected with MAIN_FILE_INVALID.

Required string length: 1 - 300
Example:

"src/index.js"

Response

Application updated successfully.

An application with its team expanded.

_id
string

The unique identifier of the application.

Example:

"000000000000000000000001"

id
string

Same value as _id. Only present in the responses of create, update, start, stop and restart.

Example:

"000000000000000000000001"

containerId
string

The unique identifier of the container.

Example:

"00000000-0000-4000-8000-000000000000"

userId
string

ID of the user who owns the application. For team applications this is the team owner.

Example:

"000000000000000000000002"

name
string

The name of the application.

Example:

"My Application"

mainFile
string

The main file of the application.

Example:

"index.js"

restartRequired
boolean

true when settings were changed and will only be applied on the next start or restart.

Example:

false

allocatedMemoryMB
integer

Memory allocated to the application, in MB.

Example:

256

allocatedVCpu
number

vCPUs allocated to the application.

Example:

2

workerNodeId
object

The node the application runs on.

containerImage
string

The container image used by the application.

Example:

"kevencampos/camposcloud-nodejs"

exposedViaWeb
boolean

Whether the application is reachable from the web.

Example:

false

internalPort
integer | null

Port the application listens on. Only set when the application is exposed via web.

Example:

3000

externalPort
integer | null

Port published on the node. Only set when the application is exposed via web.

Example:

30001

assignedSubdomain
string | null

Subdomain assigned to the application. Only set when the application is exposed via web.

Example:

"myapp"

assignedCustomDomain
string | null

Custom domain assigned to the application, if any.

Example:

"app.example.com"

startupCommand
string

The command used to start the application.

Example:

"node index.js"

installDependenciesCmd
string

The command used to install the dependencies.

Example:

"npm install --force"

runtimeEnvironment
enum<string>

The runtime environment of the application.

Available options:
nodejs,
bun,
python
Example:

"nodejs"

autoRestartEnabled
boolean

Whether the application is restarted automatically.

Example:

false

status
enum<string>

Status of the application. error is set when rebuilding the container failed.

Available options:
active,
creating,
suspended,
error
Example:

"active"

suspension
object

Present while status is suspended: the CamposCloud team turned the application off. A suspended application cannot be started or changed, but its files can still be listed and downloaded. See Why an application stopped.

shutdownNotice
object

Present when the platform turned the application off by itself because it sent too many requests. It is removed when the application is started or restarted again. See Why an application stopped.

environmentVariables
object[]

Environment variables of the application.

repository
object

GitHub repository connected to the application. Absent when the application was created from a zip file.

githubDeploys
object[]

Deploys made from the connected GitHub repository.

volumeMoved
boolean

Internal flag.

Example:

false

currentResourceMetrics
object

Latest resource metrics. Not returned by create.

historyResourceMetrics
object[]

Recent history of resource metrics, newest first. Not guaranteed to be present on every endpoint.

volumeSizeHistory
object[]

Recent history of the disk usage of the application, newest first. Not guaranteed to be present on every endpoint.

createdAt
string<date-time>

When the application was created.

Example:

"2025-01-01T12:00:00.000Z"

updatedAt
string<date-time>

When the application was last updated.

Example:

"2025-01-01T12:00:00.000Z"

__v
integer

Internal document version.

Example:

0

buildCommand
string | null

Command that builds the application before it starts, if any.

Example:

"npm run build"

customDomainPending
string

Custom domain waiting for its ownership proof. Only present while there is one.

Example:

"app.example.com"

customDomainTxtName
string

Name of the TXT record to publish to prove you own customDomainPending.

Example:

"_camposcloud-verify.app.example.com"

customDomainTxtValue
string

Value of the TXT record to publish.

Example:

"camposcloud-verify=3f2a9c0d8e7b6a5f4e3d2c1b0a998877"

teamId
object | null

The team the application belongs to, including its members and pending invites. In application responses the invite code is never included. null or absent for personal applications.