curl --request PATCH \
--url https://api.instacloud.com/projects/{projectId}/services/{serviceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"alwaysOn": true,
"memoryMb": 123,
"cpu": 123,
"startCommand": "<string>",
"volumeMountPath": "<string>",
"volumeGib": 123
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/services/{serviceId}"
payload = {
"name": "<string>",
"alwaysOn": True,
"memoryMb": 123,
"cpu": 123,
"startCommand": "<string>",
"volumeMountPath": "<string>",
"volumeGib": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
alwaysOn: true,
memoryMb: 123,
cpu: 123,
startCommand: '<string>',
volumeMountPath: '<string>',
volumeGib: 123
})
};
fetch('https://api.instacloud.com/projects/{projectId}/services/{serviceId}', 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.instacloud.com/projects/{projectId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'alwaysOn' => true,
'memoryMb' => 123,
'cpu' => 123,
'startCommand' => '<string>',
'volumeMountPath' => '<string>',
'volumeGib' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.instacloud.com/projects/{projectId}/services/{serviceId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.instacloud.com/projects/{projectId}/services/{serviceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}"
response = http.request(request)
puts response.read_body{
"applied": [
"<string>"
],
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "postgres",
"name": "<string>",
"spec": {},
"machine_count": 123,
"desired_state": "running",
"always_on": true,
"websocket": true,
"region": "<string>",
"domain": "<string>",
"public": true,
"image": "<string>",
"port": 123,
"start_command": "<string>",
"volume_applied_mount_path": "<string>",
"volume_mount_path": "<string>",
"volume_gib": 123,
"pg_version": 123,
"template_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_modified": true,
"template_code": "<string>",
"template_logo_url": "<string>",
"source": {
"type": "image",
"owner": "<string>",
"repo": "<string>",
"branch": "<string>",
"auto_deploy": true
},
"status": "creating",
"created_at": "2023-11-07T05:31:56Z"
},
"limits": {
"cpu": 123,
"memoryMb": 123
},
"cap": {
"cpu": 123,
"memoryMb": 123,
"volumeGib": 123
},
"volume": {
"sizeGib": 123,
"mountPath": "<string>",
"id": "<string>",
"appliedMountPath": "<string>",
"pending": true
},
"volumeAttached": true
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update service
Token scope: account · org · project — read-only tokens refused (not a GET).
Apply several service settings at once (compute and managed databases): rename, always-on, resource ceiling and data volume size. The whole patch is validated before anything applies, and every machine-facing change lands as one reconfigure per machine (one restart, not one per field).
curl --request PATCH \
--url https://api.instacloud.com/projects/{projectId}/services/{serviceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"alwaysOn": true,
"memoryMb": 123,
"cpu": 123,
"startCommand": "<string>",
"volumeMountPath": "<string>",
"volumeGib": 123
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/services/{serviceId}"
payload = {
"name": "<string>",
"alwaysOn": True,
"memoryMb": 123,
"cpu": 123,
"startCommand": "<string>",
"volumeMountPath": "<string>",
"volumeGib": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
alwaysOn: true,
memoryMb: 123,
cpu: 123,
startCommand: '<string>',
volumeMountPath: '<string>',
volumeGib: 123
})
};
fetch('https://api.instacloud.com/projects/{projectId}/services/{serviceId}', 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.instacloud.com/projects/{projectId}/services/{serviceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'alwaysOn' => true,
'memoryMb' => 123,
'cpu' => 123,
'startCommand' => '<string>',
'volumeMountPath' => '<string>',
'volumeGib' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.instacloud.com/projects/{projectId}/services/{serviceId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.instacloud.com/projects/{projectId}/services/{serviceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"alwaysOn\": true,\n \"memoryMb\": 123,\n \"cpu\": 123,\n \"startCommand\": \"<string>\",\n \"volumeMountPath\": \"<string>\",\n \"volumeGib\": 123\n}"
response = http.request(request)
puts response.read_body{
"applied": [
"<string>"
],
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "postgres",
"name": "<string>",
"spec": {},
"machine_count": 123,
"desired_state": "running",
"always_on": true,
"websocket": true,
"region": "<string>",
"domain": "<string>",
"public": true,
"image": "<string>",
"port": 123,
"start_command": "<string>",
"volume_applied_mount_path": "<string>",
"volume_mount_path": "<string>",
"volume_gib": 123,
"pg_version": 123,
"template_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_modified": true,
"template_code": "<string>",
"template_logo_url": "<string>",
"source": {
"type": "image",
"owner": "<string>",
"repo": "<string>",
"branch": "<string>",
"auto_deploy": true
},
"status": "creating",
"created_at": "2023-11-07T05:31:56Z"
},
"limits": {
"cpu": 123,
"memoryMb": 123
},
"cap": {
"cpu": 123,
"memoryMb": 123,
"volumeGib": 123
},
"volume": {
"sizeGib": 123,
"mountPath": "<string>",
"id": "<string>",
"appliedMountPath": "<string>",
"pending": true
},
"volumeAttached": true
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).
Body
new service name (lower-kebab, max 39); applied last so the other fields in this request still address the service by its current name
256true = machines never autostop (the platform default for new compute services); false = scale-to-zero
memory ceiling in MB — a multiple of 256, within the per-vCPU band
vCPU ceiling; requires memoryMb, derived from it when omitted
Compute runtime startup override via sh -c, including source-built images; overrides the built image CMD on next deploy or restart. Empty resets to image default. Persisted as readable service settings; use secrets for credentials.
8192Compute only: container mount path chosen on attachment; defaults to /data. Requires volumeGib only when attaching. Existing path changes are staged until the next deploy.
the persistent volume size in whole Gi — attaches when none exists, grows an existing one (never shrinks)
Response
Default Response
the fields that actually changed: name, alwaysOn, limits, volume, volumeMountPath, startCommand
A project-level service (postgres | storage | compute | redis | mysql | mongodb).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
true when this patch attached the volume (it mounts on the next deploy)