Get a user
Returns one user with counts of what they own (scopes, teams, tokens) and their organizations. You may read yourself, or members of an organization you administer (not site administrators).
Requires a signed-in user token (Authorization: Bearer cliq_tok_…). Results are limited to what that user can see.
POST
/
v1
/
users
/
get_by_id
Get a user
curl --request POST \
--url https://{host}/v1/users/get_by_id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
}
'import requests
url = "https://{host}/v1/users/get_by_id"
payload = { "user_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e'})
};
fetch('https://{host}/v1/users/get_by_id', 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://{host}/v1/users/get_by_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e'
]),
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://{host}/v1/users/get_by_id"
payload := strings.NewReader("{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{host}/v1/users/get_by_id")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/users/get_by_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"username": "jdoe",
"display_name": "Jane Doe",
"email": "[email protected]",
"role": "user",
"suspended_at": null,
"suspended_reason": null,
"created_at": "2026-10-07T10:00:00Z",
"scope_count": 0,
"team_count": 2,
"token_count": 1,
"orgs": [
{
"slug": "acme",
"role": "member"
}
]
}
}
Authorizations
User PAT (cliq_tok_…, including session-scoped) or realm token (cliq_dt_…).
Body
application/json
⌘I
Get a user
curl --request POST \
--url https://{host}/v1/users/get_by_id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"
}
'import requests
url = "https://{host}/v1/users/get_by_id"
payload = { "user_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e'})
};
fetch('https://{host}/v1/users/get_by_id', 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://{host}/v1/users/get_by_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e'
]),
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://{host}/v1/users/get_by_id"
payload := strings.NewReader("{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{host}/v1/users/get_by_id")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/users/get_by_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"username": "jdoe",
"display_name": "Jane Doe",
"email": "[email protected]",
"role": "user",
"suspended_at": null,
"suspended_reason": null,
"created_at": "2026-10-07T10:00:00Z",
"scope_count": 0,
"team_count": 2,
"token_count": 1,
"orgs": [
{
"slug": "acme",
"role": "member"
}
]
}
}