Update Schedule
curl --request PUT \
--url https://analyst.heyhumm.ai/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron_expression": "<string>",
"timezone": "<string>",
"enabled": true,
"name": "<string>",
"run_mode": "<string>"
}
'import requests
url = "https://analyst.heyhumm.ai/schedules/{schedule_id}"
payload = {
"cron_expression": "<string>",
"timezone": "<string>",
"enabled": True,
"name": "<string>",
"run_mode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron_expression: '<string>',
timezone: '<string>',
enabled: true,
name: '<string>',
run_mode: '<string>'
})
};
fetch('https://analyst.heyhumm.ai/schedules/{schedule_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://analyst.heyhumm.ai/schedules/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cron_expression' => '<string>',
'timezone' => '<string>',
'enabled' => true,
'name' => '<string>',
'run_mode' => '<string>'
]),
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://analyst.heyhumm.ai/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://analyst.heyhumm.ai/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://analyst.heyhumm.ai/schedules/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"command_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cron_expression": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"next_run_time": "2023-11-07T05:31:56Z",
"last_run_time": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timezone": "UTC",
"enabled": true,
"name": "<string>",
"run_mode": "per_subscriber",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Schedule
Update a schedule’s settings.
PUT
/
schedules
/
{schedule_id}
Update Schedule
curl --request PUT \
--url https://analyst.heyhumm.ai/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron_expression": "<string>",
"timezone": "<string>",
"enabled": true,
"name": "<string>",
"run_mode": "<string>"
}
'import requests
url = "https://analyst.heyhumm.ai/schedules/{schedule_id}"
payload = {
"cron_expression": "<string>",
"timezone": "<string>",
"enabled": True,
"name": "<string>",
"run_mode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron_expression: '<string>',
timezone: '<string>',
enabled: true,
name: '<string>',
run_mode: '<string>'
})
};
fetch('https://analyst.heyhumm.ai/schedules/{schedule_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://analyst.heyhumm.ai/schedules/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cron_expression' => '<string>',
'timezone' => '<string>',
'enabled' => true,
'name' => '<string>',
'run_mode' => '<string>'
]),
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://analyst.heyhumm.ai/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://analyst.heyhumm.ai/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://analyst.heyhumm.ai/schedules/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron_expression\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"name\": \"<string>\",\n \"run_mode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"command_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cron_expression": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"next_run_time": "2023-11-07T05:31:56Z",
"last_run_time": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timezone": "UTC",
"enabled": true,
"name": "<string>",
"run_mode": "per_subscriber",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Schedule ID
Query Parameters
Body
application/json
Response
Successful Response
Response model for command schedule.
ID of the command to execute
Organization ID
Cron expression (e.g., '0 9 * * 1' for Monday 9am)
Timezone for cron evaluation
Whether the schedule is active
⌘I