Update feature permissions
curl --request PATCH \
--url https://api.doozy.live/v1/account/permissions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"activity_scheduling_roles": {
"survey": [
"owner",
"manager"
],
"daily_quiz": [
"owner"
]
}
}
'import requests
url = "https://api.doozy.live/v1/account/permissions"
payload = { "activity_scheduling_roles": {
"survey": ["owner", "manager"],
"daily_quiz": ["owner"]
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activity_scheduling_roles: {survey: ['owner', 'manager'], daily_quiz: ['owner']}
})
};
fetch('https://api.doozy.live/v1/account/permissions', 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.doozy.live/v1/account/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'activity_scheduling_roles' => [
'survey' => [
'owner',
'manager'
],
'daily_quiz' => [
'owner'
]
]
]),
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.doozy.live/v1/account/permissions"
payload := strings.NewReader("{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.doozy.live/v1/account/permissions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/account/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "account_permissions",
"activity_scheduling_roles": {
"christmas_countdown": [
"owner"
],
"daily_icebreaker": [
"owner"
],
"daily_quiz": [
"owner"
],
"doozy_roulette": [
"owner"
],
"doozy_matchmaking": [
"owner"
],
"celebrations": [
"owner"
],
"oneOffCelebration": [
"owner"
],
"survey": [
"owner"
],
"time_off": [
"owner"
],
"track": [
"owner"
],
"custom_quiz": [
"owner"
],
"custom_icebreaker": [
"owner"
]
},
"available_activities": [
"christmas_countdown"
]
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Account
Update feature permissions
Set which roles may schedule each activity type. A partial map — only the types you send are changed. Takes effect immediately and does not alter activities already created. Owner only.
PATCH
/
v1
/
account
/
permissions
Update feature permissions
curl --request PATCH \
--url https://api.doozy.live/v1/account/permissions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"activity_scheduling_roles": {
"survey": [
"owner",
"manager"
],
"daily_quiz": [
"owner"
]
}
}
'import requests
url = "https://api.doozy.live/v1/account/permissions"
payload = { "activity_scheduling_roles": {
"survey": ["owner", "manager"],
"daily_quiz": ["owner"]
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activity_scheduling_roles: {survey: ['owner', 'manager'], daily_quiz: ['owner']}
})
};
fetch('https://api.doozy.live/v1/account/permissions', 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.doozy.live/v1/account/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'activity_scheduling_roles' => [
'survey' => [
'owner',
'manager'
],
'daily_quiz' => [
'owner'
]
]
]),
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.doozy.live/v1/account/permissions"
payload := strings.NewReader("{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.doozy.live/v1/account/permissions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/account/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activity_scheduling_roles\": {\n \"survey\": [\n \"owner\",\n \"manager\"\n ],\n \"daily_quiz\": [\n \"owner\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "account_permissions",
"activity_scheduling_roles": {
"christmas_countdown": [
"owner"
],
"daily_icebreaker": [
"owner"
],
"daily_quiz": [
"owner"
],
"doozy_roulette": [
"owner"
],
"doozy_matchmaking": [
"owner"
],
"celebrations": [
"owner"
],
"oneOffCelebration": [
"owner"
],
"survey": [
"owner"
],
"time_off": [
"owner"
],
"track": [
"owner"
],
"custom_quiz": [
"owner"
],
"custom_icebreaker": [
"owner"
]
},
"available_activities": [
"christmas_countdown"
]
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: quiz_abc123",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Authorizations
API key for authentication. Generate keys in the Doozy dashboard.
Body
application/json
Map of activity type to the roles allowed to schedule it. Celebrations, one-off celebrations and time off are always limited to owners and managers and can't be changed.
Show child attributes
Show child attributes
Example:
{ "survey": ["owner", "manager"], "daily_quiz": ["owner"] }
Response
The updated feature permissions
Available options:
account_permissions Example:
"account_permissions"
Show child attributes
Show child attributes
Activity types whose scheduling roles can be changed. Celebrations, one-off celebrations and time off are fixed to owners and managers.
Available options:
christmas_countdown, daily_icebreaker, daily_quiz, doozy_roulette, doozy_matchmaking, celebrations, oneOffCelebration, survey, time_off, track, custom_quiz, custom_icebreaker Was this page helpful?