curl --request GET \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/api/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hq.zone/v1/api/me")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"counts": {
"schedules_owned": 123
},
"identity": {
"default_locale": "<string>",
"discovered_at": "2023-11-07T05:31:56Z",
"external_user_id": "<string>",
"is_admin": true,
"is_bot": true,
"profile_consent": "<string>",
"profile_editable": true,
"slack_connected": true,
"source_kind": "<string>",
"teams_connected": true,
"tenant_slug": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"display_name": "<string>",
"email": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"locale": "<string>",
"real_name": "<string>",
"source_workspace": "<string>",
"title": "<string>",
"tz": "<string>"
},
"is_operator": true,
"onboarding": {
"track": "<string>",
"unread_notifications": 123,
"business_domain": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"domain_confirmed_at": "2023-11-07T05:31:56Z"
},
"out_of_credits": true,
"persona": {
"generated_at": "2023-11-07T05:31:56Z",
"message_count": 123,
"profile": "<unknown>",
"prompt_version": 123,
"last_message_at": "2023-11-07T05:31:56Z",
"model": "<string>"
}
}Get the signed-in user
The caller’s own self-view, scoped to their identity: an identity block
(display name, email, locale, timezone, admin/bot flags, connected-workspace
source, profile-consent state, and clock/timezone display preferences), an
optional persona block summarizing the user’s distilled profile (null if
not yet generated), quick counts such as the number of schedules owned, the
workspace onboarding state, and an out_of_credits flag indicating whether
the workspace has run out of credits.
curl --request GET \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/api/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hq.zone/v1/api/me")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"counts": {
"schedules_owned": 123
},
"identity": {
"default_locale": "<string>",
"discovered_at": "2023-11-07T05:31:56Z",
"external_user_id": "<string>",
"is_admin": true,
"is_bot": true,
"profile_consent": "<string>",
"profile_editable": true,
"slack_connected": true,
"source_kind": "<string>",
"teams_connected": true,
"tenant_slug": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"display_name": "<string>",
"email": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"locale": "<string>",
"real_name": "<string>",
"source_workspace": "<string>",
"title": "<string>",
"tz": "<string>"
},
"is_operator": true,
"onboarding": {
"track": "<string>",
"unread_notifications": 123,
"business_domain": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"domain_confirmed_at": "2023-11-07T05:31:56Z"
},
"out_of_credits": true,
"persona": {
"generated_at": "2023-11-07T05:31:56Z",
"message_count": 123,
"profile": "<unknown>",
"prompt_version": 123,
"last_message_at": "2023-11-07T05:31:56Z",
"model": "<string>"
}
}Authorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Response
The signed-in user's self-view
Show child attributes
Show child attributes
Show child attributes
Show child attributes
True when this caller is an HQ platform operator: an admin of an
is_platform tenant (migration 0182; today tic). Drives whether the
SPA shows the /operator back-office nav + route. Presentation only -
the real boundary is platform_admin::require_operator on /v1/admin/*.
Onboarding v2 state (docs/onboarding-v2.md). The web-ui router reads
this to enforce the hard gate client-side - the same state the API
enforces as a 409 - so /me is the single source of truth.
Show child attributes
Show child attributes
True when the workspace is out of HQ credits. The SPA mirrors the API's 402 hard-block by disabling the New-thread / New-ask actions + composer and showing an "upgrade to continue" prompt. Presentation only - the real boundary is the 402 on the create + send endpoints.
Show child attributes
Show child attributes