Change the settings for members' agents
curl --request PUT \
--url https://api.openworklabs.com/v1/org/workbot-settings/proactive \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": true,
"leadMinutes": 0,
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"destination": "workbot_dm",
"responsibilities": {
"morning_brief": true,
"meeting_prep": true,
"calendar_changes": true,
"waiting_on_you": true
},
"instructions": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/org/workbot-settings/proactive"
payload = {
"enabled": True,
"leadMinutes": 0,
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"destination": "workbot_dm",
"responsibilities": {
"morning_brief": True,
"meeting_prep": True,
"calendar_changes": True,
"waiting_on_you": True
},
"instructions": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
leadMinutes: 0,
startHour: 11,
endHour: 12,
dailyCap: 5,
destination: 'workbot_dm',
responsibilities: {
morning_brief: true,
meeting_prep: true,
calendar_changes: true,
waiting_on_you: true
},
instructions: '<string>'
})
};
fetch('https://api.openworklabs.com/v1/org/workbot-settings/proactive', 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.openworklabs.com/v1/org/workbot-settings/proactive",
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([
'enabled' => true,
'leadMinutes' => 0,
'startHour' => 11,
'endHour' => 12,
'dailyCap' => 5,
'destination' => 'workbot_dm',
'responsibilities' => [
'morning_brief' => true,
'meeting_prep' => true,
'calendar_changes' => true,
'waiting_on_you' => true
],
'instructions' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.openworklabs.com/v1/org/workbot-settings/proactive"
payload := strings.NewReader("{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.openworklabs.com/v1/org/workbot-settings/proactive")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/workbot-settings/proactive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"settings": {
"enabled": true,
"leadMinutes": 0,
"workingDays": "weekdays",
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"membersStart": "opted_in",
"destination": "workbot_dm"
},
"template": {
"responsibilities": {
"morning_brief": true,
"meeting_prep": true,
"calendar_changes": true,
"waiting_on_you": true
},
"instructions": "<string>",
"versionId": "<string>",
"version": 4503599627370496
},
"slackReady": true,
"runnerReady": true
}{
"error": "invalid_working_hours",
"message": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "feature_disabled",
"feature": "<string>"
}Organizations
Change the settings for members' agents
Changes any subset of how members’ agents work. Policy fields (on/off, working hours, daily limit, members’ starting choice, default destination: a Workbot DM or nowhere, never a channel) apply from the next pass; members’ own choices (muted, snoozed, turned off, their own destination) are kept. A change to responsibilities or instructions saves a new version of the organization’s “Your agent” template. Agents only read members’ email and calendar and never act for them. Requires the workbotProactive feature, Workbot on this deployment and Manage OpenWork Models.
PUT
/
v1
/
org
/
workbot-settings
/
proactive
Change the settings for members' agents
curl --request PUT \
--url https://api.openworklabs.com/v1/org/workbot-settings/proactive \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": true,
"leadMinutes": 0,
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"destination": "workbot_dm",
"responsibilities": {
"morning_brief": true,
"meeting_prep": true,
"calendar_changes": true,
"waiting_on_you": true
},
"instructions": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/org/workbot-settings/proactive"
payload = {
"enabled": True,
"leadMinutes": 0,
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"destination": "workbot_dm",
"responsibilities": {
"morning_brief": True,
"meeting_prep": True,
"calendar_changes": True,
"waiting_on_you": True
},
"instructions": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
leadMinutes: 0,
startHour: 11,
endHour: 12,
dailyCap: 5,
destination: 'workbot_dm',
responsibilities: {
morning_brief: true,
meeting_prep: true,
calendar_changes: true,
waiting_on_you: true
},
instructions: '<string>'
})
};
fetch('https://api.openworklabs.com/v1/org/workbot-settings/proactive', 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.openworklabs.com/v1/org/workbot-settings/proactive",
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([
'enabled' => true,
'leadMinutes' => 0,
'startHour' => 11,
'endHour' => 12,
'dailyCap' => 5,
'destination' => 'workbot_dm',
'responsibilities' => [
'morning_brief' => true,
'meeting_prep' => true,
'calendar_changes' => true,
'waiting_on_you' => true
],
'instructions' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.openworklabs.com/v1/org/workbot-settings/proactive"
payload := strings.NewReader("{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.openworklabs.com/v1/org/workbot-settings/proactive")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/org/workbot-settings/proactive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"leadMinutes\": 0,\n \"startHour\": 11,\n \"endHour\": 12,\n \"dailyCap\": 5,\n \"destination\": \"workbot_dm\",\n \"responsibilities\": {\n \"morning_brief\": true,\n \"meeting_prep\": true,\n \"calendar_changes\": true,\n \"waiting_on_you\": true\n },\n \"instructions\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"settings": {
"enabled": true,
"leadMinutes": 0,
"workingDays": "weekdays",
"startHour": 11,
"endHour": 12,
"dailyCap": 5,
"membersStart": "opted_in",
"destination": "workbot_dm"
},
"template": {
"responsibilities": {
"morning_brief": true,
"meeting_prep": true,
"calendar_changes": true,
"waiting_on_you": true
},
"instructions": "<string>",
"versionId": "<string>",
"version": 4503599627370496
},
"slackReady": true,
"runnerReady": true
}{
"error": "invalid_working_hours",
"message": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "feature_disabled",
"feature": "<string>"
}Authorizations
denApiKeybearerAuth
Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.
Body
application/json
Required range:
-9007199254740991 <= x <= 9007199254740991Available options:
weekdays, everyday Required range:
0 <= x <= 23Required range:
1 <= x <= 24Required range:
1 <= x <= 10Available options:
opted_in, opted_out Available options:
workbot_dm Show child attributes
Show child attributes
Maximum string length:
600Was this page helpful?