Get User
curl --request GET \
--url https://api.example.com/api/v1/entities/users/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/entities/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/entities/users/{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://api.example.com/api/v1/entities/users/{id}",
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.example.com/api/v1/entities/users/{id}"
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.example.com/api/v1/entities/users/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/entities/users/{id}")
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{
"id": "user_abc123def456",
"firstName": "John",
"lastName": "Doe",
"username": null,
"primaryEmailAddressId": "idn_xyz789",
"primaryEmailAddress": {
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
},
"emailAddresses": [
{
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
}
],
"primaryPhoneNumberId": null,
"phoneNumbers": [],
"imageUrl": "https://img.clerk.com/user_abc123def456",
"hasImage": true,
"externalId": null,
"publicMetadata": {},
"privateMetadata": {
"bullhornUserId": 12345
},
"unsafeMetadata": {},
"createdAt": 1704067200000,
"updatedAt": 1704153600000,
"lastSignInAt": 1704153600000,
"twoFactorEnabled": false,
"banned": false,
"locked": false
}
{
"error": {
"code": "NOT_FOUND",
"message": "User with id user_abc123def456 not found"
}
}
Users
Get User
Retrieves a user by their Clerk user ID
GET
/
api
/
v1
/
entities
/
users
/
{id}
Get User
curl --request GET \
--url https://api.example.com/api/v1/entities/users/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/entities/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/entities/users/{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://api.example.com/api/v1/entities/users/{id}",
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.example.com/api/v1/entities/users/{id}"
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.example.com/api/v1/entities/users/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/entities/users/{id}")
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{
"id": "user_abc123def456",
"firstName": "John",
"lastName": "Doe",
"username": null,
"primaryEmailAddressId": "idn_xyz789",
"primaryEmailAddress": {
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
},
"emailAddresses": [
{
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
}
],
"primaryPhoneNumberId": null,
"phoneNumbers": [],
"imageUrl": "https://img.clerk.com/user_abc123def456",
"hasImage": true,
"externalId": null,
"publicMetadata": {},
"privateMetadata": {
"bullhornUserId": 12345
},
"unsafeMetadata": {},
"createdAt": 1704067200000,
"updatedAt": 1704153600000,
"lastSignInAt": 1704153600000,
"twoFactorEnabled": false,
"banned": false,
"locked": false
}
{
"error": {
"code": "NOT_FOUND",
"message": "User with id user_abc123def456 not found"
}
}
Retrieves the full details of a user by their Clerk user ID. This endpoint returns user profile information including contact details, profile picture, and metadata.
User management (creation, updates, deletion) is handled directly through
Clerk. This endpoint provides read-only access to user data.
Authentication
This endpoint requires authentication. The user must be signed in.Request
string
required
The Clerk user ID of the user to retrieve (e.g.,
user_abc123).Response
Returns the complete Clerk user object.string
required
Unique Clerk user identifier.
string | null
required
The user’s first name. May be
null if not set.string | null
required
The user’s last name. May be
null if not set.string | null
required
The user’s username. May be
null if not set.string | null
required
ID of the user’s primary email address.
object | null
array
required
Array of all email addresses associated with this user.
string | null
required
ID of the user’s primary phone number. May be
null if not set.array
required
Array of all phone numbers associated with this user.
string
required
URL to the user’s profile image.
boolean
required
Whether the user has uploaded a custom profile image.
string | null
required
External identifier for the user if set. May be
null.object
required
Public metadata object for the user. Accessible from frontend.
object
required
Private metadata object for the user. Only accessible from backend.
Show Private metadata properties
Show Private metadata properties
number | null
The user’s associated Bullhorn CRM user ID if connected.
object
required
Unsafe metadata object that can be modified from frontend.
number
required
Unix timestamp (milliseconds) of when the user was created.
number
required
Unix timestamp (milliseconds) of when the user was last updated.
number | null
required
Unix timestamp (milliseconds) of the user’s last sign-in. May be
null if
never signed in.boolean
required
Whether the user has two-factor authentication enabled.
boolean
required
Whether the user is banned from the organization.
boolean
required
Whether the user account is locked.
Response Examples
{
"id": "user_abc123def456",
"firstName": "John",
"lastName": "Doe",
"username": null,
"primaryEmailAddressId": "idn_xyz789",
"primaryEmailAddress": {
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
},
"emailAddresses": [
{
"id": "idn_xyz789",
"emailAddress": "john.doe@example.com",
"verification": {
"status": "verified"
}
}
],
"primaryPhoneNumberId": null,
"phoneNumbers": [],
"imageUrl": "https://img.clerk.com/user_abc123def456",
"hasImage": true,
"externalId": null,
"publicMetadata": {},
"privateMetadata": {
"bullhornUserId": 12345
},
"unsafeMetadata": {},
"createdAt": 1704067200000,
"updatedAt": 1704153600000,
"lastSignInAt": 1704153600000,
"twoFactorEnabled": false,
"banned": false,
"locked": false
}
{
"error": {
"code": "NOT_FOUND",
"message": "User with id user_abc123def456 not found"
}
}
Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | User is not authenticated. Ensure a valid session exists. |
| 404 | NOT_FOUND | No user exists with the specified Clerk ID. |
| 500 | INTERNAL_ERROR | An unexpected server error occurred. |