Update schedule
curl --request PUT \
--url https://{instance}.omniapp.co/api/v1/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weekly Sales Report",
"schedule": "0 9 * * MON",
"timezone": "America/New_York",
"format": "pdf",
"destinationType": "email",
"recipients": [
"blob.ross@blobsrus.com"
],
"subject": "Weekly Sales Dashboard",
"paperFormat": "letter",
"paperOrientation": "landscape"
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}"
payload = {
"name": "Weekly Sales Report",
"schedule": "0 9 * * MON",
"timezone": "America/New_York",
"format": "pdf",
"destinationType": "email",
"recipients": ["blob.ross@blobsrus.com"],
"subject": "Weekly Sales Dashboard",
"paperFormat": "letter",
"paperOrientation": "landscape"
}
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({
name: 'Weekly Sales Report',
schedule: '0 9 * * MON',
timezone: 'America/New_York',
format: 'pdf',
destinationType: 'email',
recipients: ['blob.ross@blobsrus.com'],
subject: 'Weekly Sales Dashboard',
paperFormat: 'letter',
paperOrientation: 'landscape'
})
};
fetch('https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}', 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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}",
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([
'name' => 'Weekly Sales Report',
'schedule' => '0 9 * * MON',
'timezone' => 'America/New_York',
'format' => 'pdf',
'destinationType' => 'email',
'recipients' => [
'blob.ross@blobsrus.com'
],
'subject' => 'Weekly Sales Dashboard',
'paperFormat' => 'letter',
'paperOrientation' => 'landscape'
]),
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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}"
payload := strings.NewReader("{\n \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}")
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 \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"scheduledTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Schedule APIs
Update schedule
Update the specified task. Changes to the schedule are applied to future runs. Currently running jobs are not affected.
Only properties included in the request are updated. Omitted properties will retain their current values.
PUT
/
v1
/
schedules
/
{scheduleId}
Update schedule
curl --request PUT \
--url https://{instance}.omniapp.co/api/v1/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weekly Sales Report",
"schedule": "0 9 * * MON",
"timezone": "America/New_York",
"format": "pdf",
"destinationType": "email",
"recipients": [
"blob.ross@blobsrus.com"
],
"subject": "Weekly Sales Dashboard",
"paperFormat": "letter",
"paperOrientation": "landscape"
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}"
payload = {
"name": "Weekly Sales Report",
"schedule": "0 9 * * MON",
"timezone": "America/New_York",
"format": "pdf",
"destinationType": "email",
"recipients": ["blob.ross@blobsrus.com"],
"subject": "Weekly Sales Dashboard",
"paperFormat": "letter",
"paperOrientation": "landscape"
}
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({
name: 'Weekly Sales Report',
schedule: '0 9 * * MON',
timezone: 'America/New_York',
format: 'pdf',
destinationType: 'email',
recipients: ['blob.ross@blobsrus.com'],
subject: 'Weekly Sales Dashboard',
paperFormat: 'letter',
paperOrientation: 'landscape'
})
};
fetch('https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}', 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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}",
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([
'name' => 'Weekly Sales Report',
'schedule' => '0 9 * * MON',
'timezone' => 'America/New_York',
'format' => 'pdf',
'destinationType' => 'email',
'recipients' => [
'blob.ross@blobsrus.com'
],
'subject' => 'Weekly Sales Dashboard',
'paperFormat' => 'letter',
'paperOrientation' => 'landscape'
]),
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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}"
payload := strings.NewReader("{\n \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\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://{instance}.omniapp.co/api/v1/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/schedules/{scheduleId}")
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 \"name\": \"Weekly Sales Report\",\n \"schedule\": \"0 9 * * MON\",\n \"timezone\": \"America/New_York\",\n \"format\": \"pdf\",\n \"destinationType\": \"email\",\n \"recipients\": [\n \"blob.ross@blobsrus.com\"\n ],\n \"subject\": \"Weekly Sales Dashboard\",\n \"paperFormat\": \"letter\",\n \"paperOrientation\": \"landscape\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"scheduledTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The ID of the schedule. To find a schedule's ID:
- Navigate to the dashboard of a document.
- Click File > Deliveries & Alerts.
- Next to a schedule, click Edit.
The schedule's ID is in the page's URL, after /schedules/. For example, the schedule ID in this URL is 123e4567-e89b-12d3-a456-426614174000:
https://blobsrus.omniapp.co/dashboards/e23ebaa0/schedules/123e4567-e89b-12d3-a456-426614174000
Body
application/json
Same properties as Create schedule. All properties are optional - only included properties will be updated.
Was this page helpful?
⌘I

