Skip to main content
POST
/
v1
/
runs
/
{run_id}
/
retry
Retry Run
curl --request POST \
  --url https://api.cyberdesk.io/v1/runs/{run_id}/retry \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input_values": {},
  "sensitive_input_values": {},
  "file_inputs": [
    {
      "filename": "<string>",
      "content": "<string>",
      "target_path": "<string>",
      "cleanup_imports_after_run": false
    }
  ],
  "machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "reuse_session": true,
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "start_session": false,
  "session_alias": "<string>",
  "release_session_after": true
}
'
import requests

url = "https://api.cyberdesk.io/v1/runs/{run_id}/retry"

payload = {
"input_values": {},
"sensitive_input_values": {},
"file_inputs": [
{
"filename": "<string>",
"content": "<string>",
"target_path": "<string>",
"cleanup_imports_after_run": False
}
],
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"reuse_session": True,
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_session": False,
"session_alias": "<string>",
"release_session_after": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input_values: {},
sensitive_input_values: {},
file_inputs: [
{
filename: '<string>',
content: '<string>',
target_path: '<string>',
cleanup_imports_after_run: false
}
],
machine_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
reuse_session: true,
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_session: false,
session_alias: '<string>',
release_session_after: true
})
};

fetch('https://api.cyberdesk.io/v1/runs/{run_id}/retry', 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.cyberdesk.io/v1/runs/{run_id}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input_values' => [

],
'sensitive_input_values' => [

],
'file_inputs' => [
[
'filename' => '<string>',
'content' => '<string>',
'target_path' => '<string>',
'cleanup_imports_after_run' => false
]
],
'machine_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'pool_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'reuse_session' => true,
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_session' => false,
'session_alias' => '<string>',
'release_session_after' => true
]),
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.cyberdesk.io/v1/runs/{run_id}/retry"

payload := strings.NewReader("{\n \"input_values\": {},\n \"sensitive_input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"reuse_session\": true,\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false,\n \"session_alias\": \"<string>\",\n \"release_session_after\": true\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.cyberdesk.io/v1/runs/{run_id}/retry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input_values\": {},\n \"sensitive_input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"reuse_session\": true,\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false,\n \"session_alias\": \"<string>\",\n \"release_session_after\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cyberdesk.io/v1/runs/{run_id}/retry")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_values\": {},\n \"sensitive_input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"reuse_session\": true,\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false,\n \"session_alias\": \"<string>\",\n \"release_session_after\": true\n}"

response = http.request(request)
puts response.read_body
{
  "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "<string>",
  "error": [
    "<string>"
  ],
  "output_data": {},
  "input_attachment_ids": [
    "<string>"
  ],
  "output_attachment_ids": [
    "<string>"
  ],
  "run_message_history": [
    {}
  ],
  "input_values": {},
  "main_prompt": "<string>",
  "model_metadata": {
    "main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "pool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "sensitive_input_aliases": {},
  "usage_metadata": {},
  "post_run_checks": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "post_run_check_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "snapshot_version": 123,
      "name": "<string>",
      "description": "<string>",
      "order": 123,
      "file_names": [
        "<string>"
      ],
      "file_name_regex": "<string>",
      "expected_match_count": 123,
      "expected_match_count_ref": "<string>",
      "loop_input": "<string>",
      "loop_item_filename_template": "<string>",
      "allow_missing_attachments": false,
      "check_prompt": "<string>",
      "model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "started_at": "2023-11-07T05:31:56Z",
      "ended_at": "2023-11-07T05:31:56Z",
      "error_message": "<string>",
      "messages": [
        "<string>"
      ],
      "matched_filenames": [
        "<string>"
      ]
    }
  ],
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "session_alias": "<string>",
  "release_session_after": true,
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Unique key for idempotent requests. If provided, the server ensures the request is processed at most once. Retries with the same key return the original response. SDKs auto-generate this for write requests.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

run_id
string<uuid>
required

Body

application/json

Options for retrying an existing run in-place (same run_id).

Notes:

  • If file_inputs are provided, existing input attachments are replaced.
  • Prior outputs, history, and output attachments are always cleared as part of retry.
  • Retry is only allowed for terminal runs (success, task_failed, error, or cancelled).
input_values
Input Values · object | null

Override input values for workflow variables

sensitive_input_values
Sensitive Input Values · object | null

Provide new sensitive inputs (supports nested objects); stored in vault and mapped to aliases

file_inputs
FileInput · object[] | null

Provide new input files for this retry; replaces existing input attachments

machine_id
string<uuid> | null

Override specific machine for this retry

pool_ids
string<uuid>[] | null

Override pool filters if not using a specific machine

reuse_session
boolean | null
default:true

Keep existing session_id. If false and no session_id provided, clears session fields

session_id
string<uuid> | null

Set/override session_id for this retry

start_session
boolean | null
default:false

Start a fresh new session for this retry (creates new session_id)

session_alias
string | null

Set/override session_alias for this retry (used with start_session or session_id)

release_session_after
boolean | null

Override release_session_after behavior for this retry

Response

Successful Response

Run response schema

workflow_id
string<uuid>
required
machine_id
string<uuid> | null
required
id
string<uuid>
required
status
enum<string>
required
Available options:
scheduling,
running,
running_checks,
success,
cancelled,
task_failed,
error
created_at
string<date-time>
required
user_id
string<uuid> | null
organization_id
string | null
error
string[] | null
output_data
Output Data · object | null
input_attachment_ids
string[] | null
output_attachment_ids
string[] | null
run_message_history
Run Message History · object[] | null
input_values
Input Values · object | null
main_prompt
string | null

Per-run prompt override used for execution. Null means the run falls back to the workflow's current main_prompt.

model_metadata
WorkflowModelMetadata · object | null

Per-run model metadata overrides used for execution. Null means the run falls back to the workflow's model_metadata.

pool_ids
string<uuid>[] | null
sensitive_input_aliases
Sensitive Input Aliases · object | null
usage_metadata
Usage Metadata · object | null

Arbitrary usage/billing metadata captured during a run (schema is flexible)

post_run_checks
RunPostRunCheckSnapshot · object[] | null

Version-tolerant snapshot/results for the run's post-run checks.

session_id
string<uuid> | null
session_alias
string | null
release_session_after
boolean | null
started_at
string<date-time> | null
ended_at
string<date-time> | null