curl --request PUT \
--url https://api.statisfy.com/v1/integrations/{key}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedules": [
{
"cadence": "<string>",
"subtype": "<string>",
"day": 3,
"enabled": true,
"hour": 11,
"minute": 29,
"timezone": "<string>",
"week_start_day": 3
}
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/{key}/schedule"
payload = { "schedules": [
{
"cadence": "<string>",
"subtype": "<string>",
"day": 3,
"enabled": True,
"hour": 11,
"minute": 29,
"timezone": "<string>",
"week_start_day": 3
}
] }
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({
schedules: [
{
cadence: '<string>',
subtype: '<string>',
day: 3,
enabled: true,
hour: 11,
minute: 29,
timezone: '<string>',
week_start_day: 3
}
]
})
};
fetch('https://api.statisfy.com/v1/integrations/{key}/schedule', 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.statisfy.com/v1/integrations/{key}/schedule",
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([
'schedules' => [
[
'cadence' => '<string>',
'subtype' => '<string>',
'day' => 3,
'enabled' => true,
'hour' => 11,
'minute' => 29,
'timezone' => '<string>',
'week_start_day' => 3
]
]
]),
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://api.statisfy.com/v1/integrations/{key}/schedule"
payload := strings.NewReader("{\n \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\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://api.statisfy.com/v1/integrations/{key}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/{key}/schedule")
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 \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schedules": [
{
"cadence": "<string>",
"day": 123,
"enabled": true,
"hour": 123,
"minute": 123,
"subtype": "<string>",
"timezone": "<string>",
"week_start_day": 123
}
]
}Set an integration's schedule (a SQL warehouse or Pendo)
Sets the schedule of each subtype you send, as the app’s Schedule tab does; subtypes you leave out keep theirs. enabled false stops a subtype’s scheduled runs. Weekly takes day, hour, minute and timezone together. product_usage takes daily, weekly or monthly only: a usage widget cannot show a sub-day period. Pendo has no default cadence: a subtype with no schedule entry never runs, so set one for each subtype you use. The subtype follows the query: an account custom_field query runs as account_custom_fields, a people custom_field query as people_custom_fields, product_usage as product_usage, custom_object as custom_objects. The NPS survey job is the subtype surveys.
curl --request PUT \
--url https://api.statisfy.com/v1/integrations/{key}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedules": [
{
"cadence": "<string>",
"subtype": "<string>",
"day": 3,
"enabled": true,
"hour": 11,
"minute": 29,
"timezone": "<string>",
"week_start_day": 3
}
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/{key}/schedule"
payload = { "schedules": [
{
"cadence": "<string>",
"subtype": "<string>",
"day": 3,
"enabled": True,
"hour": 11,
"minute": 29,
"timezone": "<string>",
"week_start_day": 3
}
] }
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({
schedules: [
{
cadence: '<string>',
subtype: '<string>',
day: 3,
enabled: true,
hour: 11,
minute: 29,
timezone: '<string>',
week_start_day: 3
}
]
})
};
fetch('https://api.statisfy.com/v1/integrations/{key}/schedule', 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.statisfy.com/v1/integrations/{key}/schedule",
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([
'schedules' => [
[
'cadence' => '<string>',
'subtype' => '<string>',
'day' => 3,
'enabled' => true,
'hour' => 11,
'minute' => 29,
'timezone' => '<string>',
'week_start_day' => 3
]
]
]),
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://api.statisfy.com/v1/integrations/{key}/schedule"
payload := strings.NewReader("{\n \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\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://api.statisfy.com/v1/integrations/{key}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/{key}/schedule")
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 \"schedules\": [\n {\n \"cadence\": \"<string>\",\n \"subtype\": \"<string>\",\n \"day\": 3,\n \"enabled\": true,\n \"hour\": 11,\n \"minute\": 29,\n \"timezone\": \"<string>\",\n \"week_start_day\": 3\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schedules": [
{
"cadence": "<string>",
"day": 123,
"enabled": true,
"hour": 123,
"minute": 123,
"subtype": "<string>",
"timezone": "<string>",
"week_start_day": 123
}
]
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Was this page helpful?