Skip to main content
POST
/
computers
/
{id}
/
stop
Stop computer
curl --request POST \
  --url https://www.orgo.ai/api/computers/{id}/stop \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://www.orgo.ai/api/computers/{id}/stop"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://www.orgo.ai/api/computers/{id}/stop', 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://www.orgo.ai/api/computers/{id}/stop",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.orgo.ai/api/computers/{id}/stop"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://www.orgo.ai/api/computers/{id}/stop")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://www.orgo.ai/api/computers/{id}/stop")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "status": "stopping"
}
{
  "error": "Invalid API key"
}
{
  "error": "Resource not found"
}
Stops a running computer. The computer’s disk is preserved — files, installed software, and configuration are all kept — and a stopped computer incurs no compute charges.
Stopping saves the computer’s disk and releases its host. When you start it again it boots on a freshly chosen host and receives a new IP address. Running processes and other in-memory state from before the stop are not restored — the computer cold-boots from its saved disk. Only the disk is preserved.

Path parameters

id
string
required
Computer ID.

Response

success
boolean
true if stop was initiated.
Idempotent - stopping an already-stopped computer returns success without side effects.

Example

curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/stop \
  -H "Authorization: Bearer $ORGO_API_KEY"
import requests

response = requests.post(
    f"https://www.orgo.ai/api/computers/{computer_id}/stop",
    headers={"Authorization": f"Bearer {api_key}"}
)

if response.json().get("success"):
    print("Computer stopping")
const response = await fetch(`https://www.orgo.ai/api/computers/${computerId}/stop`, {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${apiKey}` }
});

const { success } = await response.json();
if (success) console.log('Computer stopping');

Response

{
  "success": true
}

Errors

  • 401 - Invalid or missing API key
  • 403 - You don’t have access to this computer
  • 404 - Computer not found
  • 409 - Computer is not running (e.g. still starting, or already stopped/terminating)

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

id
string
required

Computer ID

Response

Computer stopping

success
boolean
Example:

true

status
string
Example:

"stopping"