Workflows
Stop run
Stop a run wherever it is: mid-step, between tries, or waiting. What it runs on the computer is ended.
POST
/
workflows
/
{id}
/
runs
/
{runId}
/
stop
Stop a run
curl --request POST \
--url https://www.orgo.ai/api/workflows/{id}/runs/{runId}/stop \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/stop")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/workflows/{id}/runs/{runId}/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{
"run": {
"run_id": "0d9c6c1e-5b8e-4a59-9d3b-7a1f2c3d4e5f",
"state": "stopped",
"at": 1793887204000,
"by": "Claude Code",
"inputs": {},
"steps": [
{
"id": "a",
"title": "9:00 AM",
"kind": "start",
"how": "ran",
"ms": 4,
"output": {}
},
{
"id": "b",
"title": "Write the report",
"kind": "agent",
"how": "ran",
"ms": 21400,
"output": {
"report": "3 new customers yesterday."
}
}
],
"output": {
"report": "3 new customers yesterday."
},
"finished_at": "2026-11-05T14:00:31.000Z"
}
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "Too many API requests this minute (120 a minute on your plan). Try again in 12 seconds.",
"code": "rate_limited",
"limit": "api_other_per_minute",
"retry_after": 12
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}Stops a run wherever it is: mid-step, between tries, or waiting at Check with me. What its step runs on the computer is ended, without waking the computer. Steps that already ran stay as they ran; nothing is undone, and a send already under way may still land.
Replace
Path parameters
Headers
Response
The run, as Get a run describes it, with
state stopped.Example
curl -X POST https://www.orgo.ai/api/workflows/morning-report/runs/$RUN_ID/stop \
-H "Authorization: Bearer $ORGO_API_KEY"
import os, requests
r = requests.post(
f"https://www.orgo.ai/api/workflows/morning-report/runs/{run_id}/stop",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
)
print(r.json()["run"]["state"])
await fetch(`https://www.orgo.ai/api/workflows/morning-report/runs/${runId}/stop`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` },
});
$RUN_ID with the run’s run_id.
Errors
| Status | Code | When |
|---|---|---|
401 | No key, or a key Orgo doesn’t know. | |
403 | key_permission | A restricted key without Workflows write. |
404 | not_found | No workflow, or no run, by that id. |
404 | (no body) | Workflows aren’t open to your account. |
409 | run_not_going | The run already ended. The body carries the run. |
429 | rate_limited | Too many requests. Carries Retry-After. |
503 | runs_unavailable | Runs can’t be changed here right now. Retry after a minute. |
503 | Orgo couldn’t verify the key because of a server-side fault. Retry. |
Authorizations
Headers
⌘I
Stop a run
curl --request POST \
--url https://www.orgo.ai/api/workflows/{id}/runs/{runId}/stop \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/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/workflows/{id}/runs/{runId}/stop")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/workflows/{id}/runs/{runId}/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{
"run": {
"run_id": "0d9c6c1e-5b8e-4a59-9d3b-7a1f2c3d4e5f",
"state": "stopped",
"at": 1793887204000,
"by": "Claude Code",
"inputs": {},
"steps": [
{
"id": "a",
"title": "9:00 AM",
"kind": "start",
"how": "ran",
"ms": 4,
"output": {}
},
{
"id": "b",
"title": "Write the report",
"kind": "agent",
"how": "ran",
"ms": 21400,
"output": {
"report": "3 new customers yesterday."
}
}
],
"output": {
"report": "3 new customers yesterday."
},
"finished_at": "2026-11-05T14:00:31.000Z"
}
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "Too many API requests this minute (120 a minute on your plan). Try again in 12 seconds.",
"code": "rate_limited",
"limit": "api_other_per_minute",
"retry_after": 12
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}