Skip to main content
POST
cURL
This endpoint has a rate limit of 1 request every 3 seconds, shared with the other endpoints that change files (upload, delete, rename, move and create).
An existing file with the same name is overwritten without confirmation.
The request body is limited to 100 KB and the content is saved as UTF-8 text. For binary or larger files, send a .zip to the upload endpoint.
To edit a file: read it with GET /v1/apps/{appId}/files?path=..., send the new content to this endpoint, then restart the application so it loads the change.

Authorizations

Authorization
string
header
required

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

Path Parameters

appId
string
required

ID of the application.

Pattern: ^[a-f0-9]{24}$

Body

application/json
path
string
required

Directory in which the item is created. Use / for the application root.

Required string length: 1 - 1024
Example:

"src"

name
string
required

Name of the file or directory, without any directory. It must not contain /, must not be . or .., must not start or end with a space and must not end with a dot.

Required string length: 1 - 255
Example:

"config.json"

isDirectory
boolean
required

true to create a directory, false to create or overwrite a file.

Example:

false

content
string

Text content of the file. Required when isDirectory is false (an empty string creates an empty file). Ignored for directories.

Example:

"{ \"debug\": false }"

Response

The file or directory was created (or the file was overwritten).

message
string
Example:

"File created successfully"