curl --request POST \
--url https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"cron_expression": "<string>",
"interval_seconds": 1073741973,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"enabled": true,
"parameters": {},
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules"
payload = {
"timezone": "<string>",
"cron_expression": "<string>",
"interval_seconds": 1073741973,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"enabled": True,
"parameters": {},
"name": "<string>",
"description": "<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({
timezone: '<string>',
cron_expression: '<string>',
interval_seconds: 1073741973,
first_fire_at: '2023-11-07T05:31:56Z',
run_at: '2023-11-07T05:31:56Z',
enabled: true,
parameters: {},
name: '<string>',
description: '<string>'
})
};
fetch('https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules', 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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules",
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([
'timezone' => '<string>',
'cron_expression' => '<string>',
'interval_seconds' => 1073741973,
'first_fire_at' => '2023-11-07T05:31:56Z',
'run_at' => '2023-11-07T05:31:56Z',
'enabled' => true,
'parameters' => [
],
'name' => '<string>',
'description' => '<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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules")
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 \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"schedule": {
"workflow_schedule_id": "<string>",
"organization_id": "<string>",
"workflow_permanent_id": "<string>",
"timezone": "<string>",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"interval_seconds": 123,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"dispatch_status": "pending",
"workflow_run_id": "<string>",
"parameters": {},
"temporal_schedule_id": "<string>",
"name": "<string>",
"description": "<string>",
"deleted_at": "2023-11-07T05:31:56Z"
},
"next_runs": [
"2023-11-07T05:31:56Z"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create a schedule for an agent
Create a cron, fixed-interval or one-time schedule that runs the given agent automatically with a fixed set of parameters. An interval schedule first runs at first_fire_at, or one interval after creation. A one-time schedule runs once at run_at. Returns the stored schedule and its next upcoming run times.
curl --request POST \
--url https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"cron_expression": "<string>",
"interval_seconds": 1073741973,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"enabled": true,
"parameters": {},
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules"
payload = {
"timezone": "<string>",
"cron_expression": "<string>",
"interval_seconds": 1073741973,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"enabled": True,
"parameters": {},
"name": "<string>",
"description": "<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({
timezone: '<string>',
cron_expression: '<string>',
interval_seconds: 1073741973,
first_fire_at: '2023-11-07T05:31:56Z',
run_at: '2023-11-07T05:31:56Z',
enabled: true,
parameters: {},
name: '<string>',
description: '<string>'
})
};
fetch('https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules', 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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules",
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([
'timezone' => '<string>',
'cron_expression' => '<string>',
'interval_seconds' => 1073741973,
'first_fire_at' => '2023-11-07T05:31:56Z',
'run_at' => '2023-11-07T05:31:56Z',
'enabled' => true,
'parameters' => [
],
'name' => '<string>',
'description' => '<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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\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.skyvern.com/v1/agents/{workflow_permanent_id}/schedules")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skyvern.com/v1/agents/{workflow_permanent_id}/schedules")
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 \"timezone\": \"<string>\",\n \"cron_expression\": \"<string>\",\n \"interval_seconds\": 1073741973,\n \"first_fire_at\": \"2023-11-07T05:31:56Z\",\n \"run_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"parameters\": {},\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"schedule": {
"workflow_schedule_id": "<string>",
"organization_id": "<string>",
"workflow_permanent_id": "<string>",
"timezone": "<string>",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"cron_expression": "<string>",
"interval_seconds": 123,
"first_fire_at": "2023-11-07T05:31:56Z",
"run_at": "2023-11-07T05:31:56Z",
"dispatch_status": "pending",
"workflow_run_id": "<string>",
"parameters": {},
"temporal_schedule_id": "<string>",
"name": "<string>",
"description": "<string>",
"deleted_at": "2023-11-07T05:31:56Z"
},
"next_runs": [
"2023-11-07T05:31:56Z"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.
Path Parameters
Body
Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
300 <= x <= 2147483647First run of an interval schedule; later runs follow every interval_seconds from it. Must be in the future when changed. Defaults to one interval after creation.
Run the agent once at this instant, ISO 8601 with a UTC offset, at least 60 seconds in the future. Mutually exclusive with cron_expression and interval_seconds; the schedule can be edited or canceled only until it fires.

