agents
Resume Agent Run
Resume a paused agent run.
Resumes a paused agent run, allowing it to continue processing.
Note: Setup commands agents are automatically routed to their dedicated resume function.
POST
/
v1
/
organizations
/
{org_id}
/
agent
/
run
/
resume
Resume Agent Run
curl --request POST \
--url https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume \
--header 'Content-Type: application/json' \
--data '
{
"agent_run_id": 123,
"prompt": "<string>",
"images": [
"<string>"
]
}
'import requests
url = "https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume"
payload = {
"agent_run_id": 123,
"prompt": "<string>",
"images": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({agent_run_id: 123, prompt: '<string>', images: ['<string>']})
};
fetch('https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume', 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.codegen.com/v1/organizations/{org_id}/agent/run/resume",
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([
'agent_run_id' => 123,
'prompt' => '<string>',
'images' => [
'<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.codegen.com/v1/organizations/{org_id}/agent/run/resume"
payload := strings.NewReader("{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume")
.header("Content-Type", "application/json")
.body("{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"organization_id": 123,
"status": "<string>",
"created_at": "<string>",
"web_url": "<string>",
"result": "<string>",
"summary": "<string>",
"github_pull_requests": [
{
"id": 123,
"created_at": "<string>",
"title": "<string>",
"url": "<string>",
"head_branch_name": "<string>"
}
],
"metadata": {}
}{
"message": "You do not have access to this organization.",
"status_code": 403
}{
"message": "Agent run not found.",
"status_code": 404
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}Headers
Path Parameters
Body
application/json
Response
Successful Response
Represents an agent run in API responses
Available options:
LOCAL, SLACK, GITHUB, GITHUB_CHECK_SUITE, GITHUB_PR_REVIEW, LINEAR, API, CHAT, JIRA, CLICKUP, MONDAY, SETUP_COMMANDS Show child attributes
Show child attributes
Was this page helpful?
Previous
Ban All Checks For Agent RunBan all checks for a PR and stop all related agents.
This endpoint:
1. Flags the PR to prevent future CI/CD check suite events from being processed
2. Stops all current agents for that PR
Next
⌘I
Resume Agent Run
curl --request POST \
--url https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume \
--header 'Content-Type: application/json' \
--data '
{
"agent_run_id": 123,
"prompt": "<string>",
"images": [
"<string>"
]
}
'import requests
url = "https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume"
payload = {
"agent_run_id": 123,
"prompt": "<string>",
"images": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({agent_run_id: 123, prompt: '<string>', images: ['<string>']})
};
fetch('https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume', 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.codegen.com/v1/organizations/{org_id}/agent/run/resume",
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([
'agent_run_id' => 123,
'prompt' => '<string>',
'images' => [
'<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.codegen.com/v1/organizations/{org_id}/agent/run/resume"
payload := strings.NewReader("{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume")
.header("Content-Type", "application/json")
.body("{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_run_id\": 123,\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"organization_id": 123,
"status": "<string>",
"created_at": "<string>",
"web_url": "<string>",
"result": "<string>",
"summary": "<string>",
"github_pull_requests": [
{
"id": 123,
"created_at": "<string>",
"title": "<string>",
"url": "<string>",
"head_branch_name": "<string>"
}
],
"metadata": {}
}{
"message": "You do not have access to this organization.",
"status_code": 403
}{
"message": "Agent run not found.",
"status_code": 404
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}