Update Job
curl --request PATCH \
--url https://control-plane.kubiya.ai/api/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": [
"<string>"
],
"integration_ids": [
"<string>"
],
"mcp_servers": {}
}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/jobs/{job_id}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": ["<string>"],
"integration_ids": ["<string>"],
"mcp_servers": {}
}
}
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>',
description: '<string>',
enabled: true,
trigger_type: '<string>',
cron_schedule: '<string>',
cron_timezone: '<string>',
planning_mode: '<string>',
entity_type: '<string>',
entity_id: '<string>',
prompt_template: '<string>',
system_prompt: '<string>',
executor_type: '<string>',
worker_queue_name: '<string>',
environment_name: '<string>',
config: {},
execution_environment: {
env_vars: {},
secrets: ['<string>'],
integration_ids: ['<string>'],
mcp_servers: {}
}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/jobs/{job_id}', 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://control-plane.kubiya.ai/api/v1/jobs/{job_id}",
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>',
'description' => '<string>',
'enabled' => true,
'trigger_type' => '<string>',
'cron_schedule' => '<string>',
'cron_timezone' => '<string>',
'planning_mode' => '<string>',
'entity_type' => '<string>',
'entity_id' => '<string>',
'prompt_template' => '<string>',
'system_prompt' => '<string>',
'executor_type' => '<string>',
'worker_queue_name' => '<string>',
'environment_name' => '<string>',
'config' => [
],
'execution_environment' => [
'env_vars' => [
],
'secrets' => [
'<string>'
],
'integration_ids' => [
'<string>'
],
'mcp_servers' => [
]
]
]),
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://control-plane.kubiya.ai/api/v1/jobs/{job_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\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://control-plane.kubiya.ai/api/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/jobs/{job_id}")
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 \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"status": "<string>",
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"temporal_schedule_id": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"entity_name": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": [
"<string>"
],
"integration_ids": [
"<string>"
],
"mcp_servers": {}
},
"last_execution_id": "<string>",
"last_execution_at": "2023-11-07T05:31:56Z",
"next_execution_at": "2023-11-07T05:31:56Z",
"total_executions": 123,
"successful_executions": 123,
"failed_executions": 123,
"execution_history": [
{}
],
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_triggered_at": "2023-11-07T05:31:56Z",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"created_by_email": "<string>",
"updated_by_email": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Update Job
Update job configuration.
Note: Updating cron_schedule will recreate the Temporal Schedule.
PATCH
/
api
/
v1
/
jobs
/
{job_id}
Update Job
curl --request PATCH \
--url https://control-plane.kubiya.ai/api/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": [
"<string>"
],
"integration_ids": [
"<string>"
],
"mcp_servers": {}
}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/jobs/{job_id}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": ["<string>"],
"integration_ids": ["<string>"],
"mcp_servers": {}
}
}
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>',
description: '<string>',
enabled: true,
trigger_type: '<string>',
cron_schedule: '<string>',
cron_timezone: '<string>',
planning_mode: '<string>',
entity_type: '<string>',
entity_id: '<string>',
prompt_template: '<string>',
system_prompt: '<string>',
executor_type: '<string>',
worker_queue_name: '<string>',
environment_name: '<string>',
config: {},
execution_environment: {
env_vars: {},
secrets: ['<string>'],
integration_ids: ['<string>'],
mcp_servers: {}
}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/jobs/{job_id}', 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://control-plane.kubiya.ai/api/v1/jobs/{job_id}",
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>',
'description' => '<string>',
'enabled' => true,
'trigger_type' => '<string>',
'cron_schedule' => '<string>',
'cron_timezone' => '<string>',
'planning_mode' => '<string>',
'entity_type' => '<string>',
'entity_id' => '<string>',
'prompt_template' => '<string>',
'system_prompt' => '<string>',
'executor_type' => '<string>',
'worker_queue_name' => '<string>',
'environment_name' => '<string>',
'config' => [
],
'execution_environment' => [
'env_vars' => [
],
'secrets' => [
'<string>'
],
'integration_ids' => [
'<string>'
],
'mcp_servers' => [
]
]
]),
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://control-plane.kubiya.ai/api/v1/jobs/{job_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\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://control-plane.kubiya.ai/api/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/jobs/{job_id}")
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 \"description\": \"<string>\",\n \"enabled\": true,\n \"trigger_type\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"planning_mode\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"prompt_template\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"executor_type\": \"<string>\",\n \"worker_queue_name\": \"<string>\",\n \"environment_name\": \"<string>\",\n \"config\": {},\n \"execution_environment\": {\n \"env_vars\": {},\n \"secrets\": [\n \"<string>\"\n ],\n \"integration_ids\": [\n \"<string>\"\n ],\n \"mcp_servers\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"status": "<string>",
"trigger_type": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"temporal_schedule_id": "<string>",
"planning_mode": "<string>",
"entity_type": "<string>",
"entity_id": "<string>",
"entity_name": "<string>",
"prompt_template": "<string>",
"system_prompt": "<string>",
"executor_type": "<string>",
"worker_queue_name": "<string>",
"environment_name": "<string>",
"config": {},
"execution_environment": {
"env_vars": {},
"secrets": [
"<string>"
],
"integration_ids": [
"<string>"
],
"mcp_servers": {}
},
"last_execution_id": "<string>",
"last_execution_at": "2023-11-07T05:31:56Z",
"next_execution_at": "2023-11-07T05:31:56Z",
"total_executions": 123,
"successful_executions": 123,
"failed_executions": 123,
"execution_history": [
{}
],
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_triggered_at": "2023-11-07T05:31:56Z",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"created_by_email": "<string>",
"updated_by_email": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Enter your Kubiya API token (format: Bearer )
Path Parameters
Body
application/json
Schema for updating an existing job
Required string length:
1 - 255Execution environment configuration for jobs
Show child attributes
Show child attributes
Response
Successful Response
Schema for job response
Execution environment configuration for jobs
Show child attributes
Show child attributes
Full webhook URL (generated from webhook_url_path)
Webhook HMAC secret for signature verification
Email of the user who created the job (enriched)
Email of the user who last updated the job (enriched)
Was this page helpful?
⌘I