Create or Update Application File or Folder
curl --request PUT \
--url https://api.vertracloud.app/v1/apps/{id}/files \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"last_modified": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/files"
payload = {
"content": "<string>",
"last_modified": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', last_modified: '<string>'})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vertracloud.app/v1/apps/{id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'last_modified' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/files"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.vertracloud.app/v1/apps/{id}/files")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": null
}
File Manager
Create or Update Application File or Folder
Creates or updates a file or folder for an application by its ID.
PUT
/
v1
/
apps
/
{id}
/
files
Create or Update Application File or Folder
curl --request PUT \
--url https://api.vertracloud.app/v1/apps/{id}/files \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"last_modified": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/files"
payload = {
"content": "<string>",
"last_modified": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', last_modified: '<string>'})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vertracloud.app/v1/apps/{id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'last_modified' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/files"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.vertracloud.app/v1/apps/{id}/files")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"last_modified\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": null
}
string
required
The ID of the application to create or update the file or folder in. If the application belongs to a workspace, pass its ID in the
workspace_id query parameter.string
If the application belongs to a workspace, the workspace’s ID. Members with an Owner, Admin or Developer role can use the file manager on a workspace app they don’t own; without this, only the app’s own owner can.
string
required
The path where the file or folder will be created or updated. End with
/ to create a folder.string
The content of the file to create or update. Required for files, not applicable for folders.
string
Optional ISO timestamp of the file’s last known mtime, as returned by
GET /files/content. When provided and it doesn’t match the file’s current mtime on disk, the save is rejected with FILE_MODIFIED instead of silently overwriting a newer version — use this to detect edit conflicts. Omit it to save unconditionally.Response
A success returns200 with { "response": null }.
{
"response": null
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.FORBIDDEN: The user does not have permission to access the application.APP_NOT_FOUND: The specified application does not exist.PLAN_RESTRICTED_FEATURE: The user’s plan does not support file manager access.MISSING_PATH: The path query parameter was not provided.MISSING_CONTENT: The content body parameter is required for files.INVALID_PATH: The provided path is invalid.TARGET_IS_DIRECTORY: The path already exists as a folder and can’t be written to as a file.FILE_MODIFIED: The file’s current mtime doesn’t match thelast_modifiedsent — someone else changed it since it was last read. Reload the file before saving again.PUT_FILE_FAILED: Failed to create or update the file or folder.OWNER_APP_WITHOUT_LIMITS: The owner’s plan limits could not be found.
string
A descriptive message providing additional details about the error.
{
"code": "UNAUTHORIZED"
}
{
"code": "APP_NOT_FOUND"
}
{
"code": "FILE_MODIFIED",
"message": "File was modified since it was last read"
}
{
"code": "TARGET_IS_DIRECTORY"
}
{
"code": "MISSING_PATH",
"message": "Path query parameter is required"
}