curl --request PATCH \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"locale": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"tz": "<string>"
}
'import requests
url = "https://api.hq.zone/v1/api/me"
payload = {
"display_name": "<string>",
"locale": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"tz": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
locale: '<string>',
time_format: '<string>',
time_zone: '<string>',
tz: '<string>'
})
};
fetch('https://api.hq.zone/v1/api/me', 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.hq.zone/v1/api/me",
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([
'display_name' => '<string>',
'locale' => '<string>',
'time_format' => '<string>',
'time_zone' => '<string>',
'tz' => '<string>'
]),
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.hq.zone/v1/api/me"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.hq.zone/v1/api/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUpdate my profile
PATCH /v1/api/me - update the caller’s own profile preferences (clock
format + timezone). Self-scoped: the caller is resolved from the session
headers (the same pair me reads), so it can only ever write its own row.
Either field may be omitted; only the supplied ones change.
curl --request PATCH \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"locale": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"tz": "<string>"
}
'import requests
url = "https://api.hq.zone/v1/api/me"
payload = {
"display_name": "<string>",
"locale": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"tz": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
locale: '<string>',
time_format: '<string>',
time_zone: '<string>',
tz: '<string>'
})
};
fetch('https://api.hq.zone/v1/api/me', 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.hq.zone/v1/api/me",
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([
'display_name' => '<string>',
'locale' => '<string>',
'time_format' => '<string>',
'time_zone' => '<string>',
'tz' => '<string>'
]),
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.hq.zone/v1/api/me"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.hq.zone/v1/api/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"locale\": \"<string>\",\n \"time_format\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"tz\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Body
Self-edited display name. EMAIL-ORIGIN users only (connector users get this from Slack/Teams); a connector user supplying it gets a 403.
Self-edited BCP-47 locale (e.g. sv-SE). Email-origin only.
auto / 12h / 24h - the web-UI clock preference (migration 0169).
auto / profile - the web-UI timezone preference (migration 0170).
Self-edited IANA timezone (e.g. Europe/Stockholm). Email-origin only.
Response
Preferences updated