Users
Secure your API access with a simple, key-based authentication flow.
Overview
The Users API provides secure endpoints to retrieve and manage user data. Start by calling the Users endpoint to find users of interest, then use Get User for complete user details.
Admin Access Required
For administrative operations, use the dedicated admin endpoints with elevated permissions.
Key Features
- JSON formatted responses
- Schema-based validation
- Role-based permissions
- Flexible data attributes
API Endpoints
Get detailed information for a specific user by providing their unique ID. If no ID is provided, returns the authenticated user's details.
Parameters
X-API-Key (header, string, Required) - Your API key for authentication. Handles JWT validation automatically.
userId (query, integer, Required) - User ID to fetch. Must provide a valid user ID.
Test this endpoint
Response Examples
{
"success": true,
"data": {
"userid": 123,
"companyid": 23,
"departmentid": 5,
"emailaddress": "jane.doe@example.com",
"firstname": "Jane",
"lastname": "Doe",
"jobtitle": "Manager",
"landlineno": "01234 567890",
"mobileno": "+447123456789",
"comments": null,
"logincount": 12,
"lastloggedin": "2025-10-01 09:15:00",
"lastupdated": "2025-10-01 09:15:00",
"created": "2024-12-01 10:00:00",
"active": 1
}
}
{
"success": false,
"error": "Missing API key"
}
{
"success": false,
"error": "User not found"
}
Code Examples
curl -X GET "https://developer.traceallglobal.com/api/v1/users/getUser/{id}" \
-H "X-API-Key: YOUR_API_KEY"
fetch('https://developer.traceallglobal.com/api/v1/users/getUser/{id}', {
method: 'GET',
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
import requests
url = "https://developer.traceallglobal.com/api/v1/users/getUser/{id}"
headers = {
"X-API-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://developer.traceallglobal.com/api/v1/users/getUser/{id}"))
.header("X-API-Key", "YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
$url = 'https://developer.traceallglobal.com/api/v1/users/getUser/{id}';
$headers = [
'X-API-Key: YOUR_API_KEY'
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data);
?>
Update a user's details by their unique ID. Only POST method is supported. Requires Editor or higher permission. All fields are optional; only provided fields will be updated.
Parameters
X-API-Key (header, string, Required) - Your API key for authentication. Handles JWT validation automatically.
Content-Type (header, string, Required) - Must be set to "application/json".
id (path, integer, Required) - User ID to update. Must provide a valid user ID in the URL path.
Body (JSON) (object, Optional) - Fields to update. Any combination of the following:
firstname(string)lastname(string)emailaddress(string)landlineno(string)mobileno(string)jobtitle(string)comments(string, optional)
{
"firstname": "Jane",
"lastname": "Doe",
"emailaddress": "jane.doe@example.com",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"jobtitle": "Senior Developer",
"comments": "Full Stack Developer with 5+ years experience"
}
Test this endpoint
Response Examples
{
"success": true,
"message": "User updated successfully"
}
{
"success": false,
"error": "Missing API key"
}
{
"success": false,
"error": "userId must be provided in the URL, e.g., /updateUser/123"
}
Code Examples
curl -X POST "https://developer.traceallglobal.com/api/v1/users/updateUser/{id}" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"firstname": "Jane",
"lastname": "Doe",
"emailaddress": "jane.doe@example.com",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"comments": "Senior Developer - Full Stack"
}'
fetch('https://developer.traceallglobal.com/api/v1/users/updateUser/{id}', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstname: 'Jane',
lastname: 'Doe',
emailaddress: 'jane.doe@example.com',
landlineno: '0141 123 4567',
mobileno: '+44 7123 456789',
comments: 'Senior Developer - Full Stack'
})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
url = "https://developer.traceallglobal.com/api/v1/users/updateUser/{id}"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"firstname": "Jane",
"lastname": "Doe",
"emailaddress": "jane.doe@example.com",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"comments": "Senior Developer - Full Stack"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
String jsonData = """
{
"firstname": "Jane",
"lastname": "Doe",
"emailaddress": "jane.doe@example.com",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"comments": "Senior Developer - Full Stack"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://developer.traceallglobal.com/api/v1/users/updateUser/{id}"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonData))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
$url = 'https://developer.traceallglobal.com/api/v1/users/updateUser/{id}';
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
$data = [
'firstname' => 'Jane',
'lastname' => 'Doe',
'emailaddress' => 'jane.doe@example.com',
'landlineno' => '0141 123 4567',
'mobileno' => '+44 7123 456789',
'comments' => 'Senior Developer - Full Stack'
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data);
?>
Create a new user. Requires Editor, Manager, or Admin permission. All fields are required.
Parameters
X-API-Key (header, string, Required) - Your API key for authentication. Handles JWT validation automatically.
Body (JSON) (object, Required) - All fields are required:
emailaddress(string)password(string)firstname(string)lastname(string)landlineno(string)mobileno(string)companyid(integer)jobtitle(string)accesslevelid(integer)departmentid(integer)comments(string, optional)
{
"emailaddress": "jane.doe@example.com",
"password": "MySecretPassword123!",
"firstname": "Jane",
"lastname": "Doe",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"companyid": 1,
"jobtitle": "Senior Developer",
"accesslevelid": 2,
"departmentid": 1,
"comments": "Full Stack Developer with 5+ years experience"
}
Test this endpoint
Response Examples
{
"success": true,
"message": "User created successfully",
"userid": 123
}
{
"success": false,
"error": "Missing required field: emailaddress"
}
{
"success": false,
"error": "User not added, email already exists"
}
Code Examples
curl -X POST "https://developer.traceallglobal.com/api/v1/users/createUser" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emailaddress": "jane.doe@example.com",
"password": "MySecretPassword123!",
"firstname": "Jane",
"lastname": "Doe",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"companyid": 1,
"jobtitle": "Senior Developer",
"accesslevelid": 2,
"departmentid": 1,
"comments": "Full Stack Developer with 5+ years experience"
}'
fetch('https://developer.traceallglobal.com/api/v1/users/createUser', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emailaddress: 'jane.doe@example.com',
password: 'MySecretPassword123!',
firstname: 'Jane',
lastname: 'Doe',
landlineno: '0141 123 4567',
mobileno: '+44 7123 456789',
companyid: 1,
jobtitle: 'Senior Developer',
accesslevelid: 2,
departmentid: 1,
comments: 'Full Stack Developer with 5+ years experience'
})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
import json
url = "https://developer.traceallglobal.com/api/v1/users/createUser"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"emailaddress": "jane.doe@example.com",
"password": "MySecretPassword123!",
"firstname": "Jane",
"lastname": "Doe",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"companyid": 1,
"jobtitle": "Senior Developer",
"accesslevelid": 2,
"departmentid": 1,
"comments": "Full Stack Developer with 5+ years experience"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
String jsonData = """
{
"emailaddress": "jane.doe@example.com",
"password": "MySecretPassword123!",
"firstname": "Jane",
"lastname": "Doe",
"landlineno": "0141 123 4567",
"mobileno": "+44 7123 456789",
"companyid": 1,
"jobtitle": "Senior Developer",
"accesslevelid": 2,
"departmentid": 1,
"comments": "Full Stack Developer with 5+ years experience"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://developer.traceallglobal.com/api/v1/users/createUser"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonData))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
$url = 'https://developer.traceallglobal.com/api/v1/users/createUser';
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
$data = [
'emailaddress' => 'jane.doe@example.com',
'password' => 'MySecretPassword123!',
'firstname' => 'Jane',
'lastname' => 'Doe',
'landlineno' => '0141 123 4567',
'mobileno' => '+44 7123 456789',
'companyid' => 1,
'jobtitle' => 'Senior Developer',
'accesslevelid' => 2,
'departmentid' => 1,
'comments' => 'Full Stack Developer with 5+ years experience'
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data);
?>
Deactivate a user (soft delete). Requires Manager or Admin permission. Sets active to 0 for the specified id.
Parameters
X-API-Key (header, string, Required) - Your API key for authentication.
Path Parameter (required):
userId(integer, required) - The userId to deactivate. Example:/deleteUser/123
Delete User
Response Examples
{
"success": true,
"message": "User deleted (set to inactive) successfully",
"userId": 123
}
{
"success": false,
"error": "User not found or already inactive"
}
{
"success": false,
"error": "Missing API key"
}
Code Examples
curl -X POST "https://developer.traceallglobal.com/api/v1/users/deleteUser/{id}" \
-H "X-API-Key: YOUR_API_KEY"
fetch('https://developer.traceallglobal.com/api/v1/users/deleteUser/{id}', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
import requests
url = "https://developer.traceallglobal.com/api/v1/users/deleteUser/{id}"
headers = {
"X-API-Key": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers)
result = response.json()
print(result)
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://developer.traceallglobal.com/api/v1/users/deleteUser/{id}"))
.header("X-API-Key", "YOUR_API_KEY")
.POST(HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
<?php
$url = 'https://developer.traceallglobal.com/api/v1/users/deleteUser/{id}';
$headers = [
'X-API-Key: YOUR_API_KEY'
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $headers,
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data);
?>