Skip to main content
POST
cURL
This endpoint has a rate limit of 1 request every 3 seconds.
The request must be sent as multipart/form-data. The file must be a .zip (max. 100 MB) and environmentVariables must be sent as a JSON encoded string.
Either mainFile or startupCommand is required, except on runtimes that do not start from a file (mainFile: false in GET /v1/runtimes, like Go). Without buildCommand, the runtime’s own build runs, when it has one. When exposedViaWeb is true, port and assignedSubdomain are required too. Fields that are not listed below are rejected with 400.
Environment variables with an empty value make the request fail with 500.
New to this endpoint? Follow the deploy guide, from the zip file to the first change.

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data

Application data to create

Unknown fields are rejected with 400. Either mainFile or startupCommand must be provided, except on runtimes that do not start from a file (mainFile: false in GET /v1/runtimes, like Go).

file
file
required

The application source as a .zip file (max. 100 MB). node_modules folders inside the zip are discarded. Not required when creating from a GitHub repository.

appName
string
required

The name of the application. At least 3 characters.

Minimum string length: 3
Example:

"My Application"

memoryMB
integer
required

Memory to allocate, in MB. Must be at least the platform minimum (256 MB by default) and fit in the memory left on the plan.

Example:

256

runtimeEnvironment
enum<string>
required

The runtime environment of the application.

Available options:
nodejs,
bun,
python
Example:

"nodejs"

mainFile
string

The main file of the application. Required unless startupCommand is sent or the runtime does not start from a file (mainFile: false in GET /v1/runtimes).

Example:

"index.js"

startupCommand
string

Custom command used to start the application. When omitted, the runtime's startCommand from GET /v1/runtimes is used: node <mainFile>, bun <mainFile>, python -u <mainFile>, or a command of its own like ./server for Go. Required unless mainFile is sent or the runtime does not start from a file.

Example:

"node index.js"

exposedViaWeb
boolean
default:false

Expose the application to the web. When true, port and assignedSubdomain are required.

Example:

false

port
integer

Port your application listens on. Required when exposedViaWeb is true.

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

3000

assignedSubdomain
string

Subdomain for the application. Required when exposedViaWeb is true. Must not be in use by another application.

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

"myapp"

autoRestartEnabled
boolean
default:false

Restart the application automatically.

Example:

false

team
string

ID of the team to create the application in. You must be the team owner or a member with the canCreateApplication permission. The plan of the team owner is used.

Example:

"000000000000000000000003"

environmentVariables
string

Environment variables as a JSON encoded array of { "key": string, "value": string } objects.

Example:

"[{\"key\":\"API_PORT\",\"value\":\"3005\"}]"

installationId
string

ID of a GitHub App installation linked to your account. Send it together with repositoryOwner, repositoryName, repositoryId and branch (all five or none) to create the application from a GitHub repository instead of a zip file.

repositoryOwner
string

Owner of the GitHub repository.

repositoryName
string

Name of the GitHub repository.

repositoryId
string

GitHub ID of the repository.

branch
string

Branch to deploy.

buildCommand
string

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

Maximum string length: 500
Example:

"npm run build"

Response

Application created successfully.

An application with its team referenced by ID.

_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
string | null

ID of the team the application belongs to. null or absent for personal applications.

Example:

null