curl --request PATCH \
--url https://api.getoneprofile.ai/workspace-settings/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"timezone": "<string>",
"timezone_source": "person"
}
'import requests
url = "https://api.getoneprofile.ai/workspace-settings/"
payload = {
"timezone": "<string>",
"timezone_source": "person"
}
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({timezone: '<string>', timezone_source: 'person'})
};
fetch('https://api.getoneprofile.ai/workspace-settings/', 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.getoneprofile.ai/workspace-settings/",
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([
'timezone' => '<string>',
'timezone_source' => 'person'
]),
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.getoneprofile.ai/workspace-settings/"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\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.getoneprofile.ai/workspace-settings/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/workspace-settings/")
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 \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\n}"
response = http.request(request)
puts response.read_body{
"timezone": "<string>",
"timezone_source": "browser"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Change the workspace's timezone
Sets the workspace’s timezone. “Today” in every table filter (is today, within the last 7 days) starts at its midnight from now on, and senders set to “Same as workspace” move to it, their daily limits finishing the day they were counting in. With timezone_source browser it only fills a workspace that has no timezone yet, as the dashboard does from the first admin’s browser. Only a workspace admin can change it.
curl --request PATCH \
--url https://api.getoneprofile.ai/workspace-settings/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"timezone": "<string>",
"timezone_source": "person"
}
'import requests
url = "https://api.getoneprofile.ai/workspace-settings/"
payload = {
"timezone": "<string>",
"timezone_source": "person"
}
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({timezone: '<string>', timezone_source: 'person'})
};
fetch('https://api.getoneprofile.ai/workspace-settings/', 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.getoneprofile.ai/workspace-settings/",
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([
'timezone' => '<string>',
'timezone_source' => 'person'
]),
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.getoneprofile.ai/workspace-settings/"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\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.getoneprofile.ai/workspace-settings/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/workspace-settings/")
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 \"timezone\": \"<string>\",\n \"timezone_source\": \"person\"\n}"
response = http.request(request)
puts response.read_body{
"timezone": "<string>",
"timezone_source": "browser"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Body
person (the default): someone chose it, and it replaces whatever the workspace held. browser: the dashboard reporting an admin's browser timezone, which fills only a workspace that has none; a timezone the workspace has is never moved this way, and one the server does not know is ignored.
browser, person Response
Successful Response
The workspace's IANA timezone, such as America/New_York. "Today" in a table filter (is today, within the last 7 days) starts at its midnight for everyone in the workspace, and senders set to "Same as workspace" send in it. Null until an admin's browser fills it or a person picks one; read as UTC meanwhile.
Was this page helpful?