Register a new user
curl --request POST \
--url https://api.16tms.com/api/v1/external/users \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"externalId": "user_123",
"displayName": "John Doe",
"email": "user@example.com"
}
'import requests
url = "https://api.16tms.com/api/v1/external/users"
payload = {
"externalId": "user_123",
"displayName": "John Doe",
"email": "user@example.com"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: 'user_123', displayName: 'John Doe', email: 'user@example.com'})
};
fetch('https://api.16tms.com/api/v1/external/users', 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.16tms.com/api/v1/external/users",
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([
'externalId' => 'user_123',
'displayName' => 'John Doe',
'email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.16tms.com/api/v1/external/users"
payload := strings.NewReader("{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://api.16tms.com/api/v1/external/users")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.16tms.com/api/v1/external/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User registered successfully",
"data": {
"userId": "72241a59-3638-4c7c-8105-81774de2c900",
"externalId": "user_123",
"isNewUser": true,
"username": "user_123"
},
"meta": {
"traceId": "00-0b9a33deb55060719389707d91fe66e4-39ac3a60dea035aa-00",
"elapsedMs": 8.42,
"serverTimestamp": "2026-02-09T06:07:53.9323654Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}API Reference
Register a new user
Creates or updates a user in the 16TMS platform using an external identifier. If the user already exists, their information will be updated.
POST
/
external
/
users
Register a new user
curl --request POST \
--url https://api.16tms.com/api/v1/external/users \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"externalId": "user_123",
"displayName": "John Doe",
"email": "user@example.com"
}
'import requests
url = "https://api.16tms.com/api/v1/external/users"
payload = {
"externalId": "user_123",
"displayName": "John Doe",
"email": "user@example.com"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: 'user_123', displayName: 'John Doe', email: 'user@example.com'})
};
fetch('https://api.16tms.com/api/v1/external/users', 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.16tms.com/api/v1/external/users",
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([
'externalId' => 'user_123',
'displayName' => 'John Doe',
'email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.16tms.com/api/v1/external/users"
payload := strings.NewReader("{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://api.16tms.com/api/v1/external/users")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.16tms.com/api/v1/external/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"user_123\",\n \"displayName\": \"John Doe\",\n \"email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User registered successfully",
"data": {
"userId": "72241a59-3638-4c7c-8105-81774de2c900",
"externalId": "user_123",
"isNewUser": true,
"username": "user_123"
},
"meta": {
"traceId": "00-0b9a33deb55060719389707d91fe66e4-39ac3a60dea035aa-00",
"elapsedMs": 8.42,
"serverTimestamp": "2026-02-09T06:07:53.9323654Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Invalid API key",
"errors": [
{
"field": "externalId",
"message": "This field is required"
}
],
"meta": {
"traceId": "<string>",
"serverTimestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
API key for authentication. You can generate this from the 16TMS console.
Body
application/json
The unique identifier for the user from your external system.
Example:
"user_123"
The display name for the user.
Example:
"John Doe"
The username for the user.
Example:
"johndoe"
The email address of the user.
Example:
"user@example.com"
The phone number of the user.
Example:
"+1234567890"
The country code for the phone number.
Example:
"+1"
URL to the user's profile image.
Example:
"https://example.com/images/profile.jpg"
URL to the user's cover image.
Example:
"https://example.com/images/cover.jpg"
⌘I