Users
Create or update clients by your client id (external_id), read them back and pause / resume their trading. The same external_id always maps to the same client in your company.
#A user by your client id
Scope clients:read.
Path parameters
Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.
Responses
The user.
not_found / user_not_found / account_not_found / symbol_not_found.
curl "https://api.your-brand.com/api/external/v1/users/cust_10042" \
-H "X-Api-Key: $OCTOLIT_PARTNER_KEY"const res = await fetch("https://api.your-brand.com/api/external/v1/users/cust_10042", {
method: "GET",
headers: {
"X-Api-Key": process.env.OCTOLIT_PARTNER_KEY,
},
});
if (!res.ok) throw new Error(`GET failed: ${res.status} ${await res.text()}`);
const data = await res.json();
console.log(data);import os, requests
r = requests.request(
"GET",
"https://api.your-brand.com/api/external/v1/users/cust_10042",
headers={"X-Api-Key": os.environ["OCTOLIT_PARTNER_KEY"]},
timeout=10,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init("https://api.your-brand.com/api/external/v1/users/cust_10042");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: " . getenv("OCTOLIT_PARTNER_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Get, "https://api.your-brand.com/api/external/v1/users/cust_10042");
req.Headers.Add("X-Api-Key", Environment.GetEnvironmentVariable("OCTOLIT_PARTNER_KEY"));
using var res = await http.SendAsync(req);
res.EnsureSuccessStatusCode();
Console.WriteLine(await res.Content.ReadAsStringAsync());var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create("https://api.your-brand.com/api/external/v1/users/cust_10042"))
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());var body io.Reader
req, err := http.NewRequest("GET", "https://api.your-brand.com/api/external/v1/users/cust_10042", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Api-Key", os.Getenv("OCTOLIT_PARTNER_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))var req = URLRequest(url: URL(string: "https://api.your-brand.com/api/external/v1/users/cust_10042")!)
req.httpMethod = "GET"
req.setValue(ProcessInfo.processInfo.environment["OCTOLIT_PARTNER_KEY"], forHTTPHeaderField: "X-Api-Key")
let (data, response) = try await URLSession.shared.data(for: req)
print((response as! HTTPURLResponse).statusCode, String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val req = Request.Builder()
.url("https://api.your-brand.com/api/external/v1/users/cust_10042")
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.get()
.build()
client.newCall(req).execute().use { res ->
println("${res.code} ${res.body?.string()}")
} {
"user": {
"id": 1042,
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"emails": [
"ana.ortiz@example.com"
],
"phone": "+357 99 123456",
"phones": [
"+357 99 123456"
],
"brand": {
"id": 1042,
"name": "Main"
},
"desk": {
"id": 1042,
"name": "Main"
},
"sales_status": "string",
"sales_status_changed_at": "2026-11-11T09:30:00Z",
"kyc": {
"id_status": "string",
"billing_status": "string"
},
"active": true,
"is_lead": true,
"deleted": true,
"country": "CY",
"external_user_id": "abc123",
"agents": [
{
"id": 1042,
"name": "Main"
}
],
"created_at": "2026-11-11T09:30:00.000000Z",
"updated_at": "2026-11-11T09:31:12.000000Z",
"first_deposit_date": "2026-11-11T09:30:00Z",
"comments": [
null
],
"custom_fields": {},
"external_id": "cust_10042",
"login_enabled": true,
"trading_enabled": true,
"accounts": 1
}
}#Create or update a user by your client id
Scope users:write. Send any subset of the fields: a user that does not exist yet is created (201) in the brand named by brand_id (default: the company's first active brand); an existing user is updated (200). A user never moves between brands (409 brand_fixed); an e-mail that belongs to another client of the company is refused (409 email_taken). Names, e-mail and phone are added, never removed.
Path parameters
Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.
Request body (optional) · application/json
0-120 characters.
0-120 characters.
0-120 characters.
0-254 characters.
With the country code
ISO 3166-1 alpha-2. 2-2 characters.
Only read when the user is created.
Responses
The user.
The user.
insufficient_scope, ip_not_allowed, api_disabled, company_inactive, brand_disabled, sso_disabled, trending_disabled (trading on behalf also: brand_inactive, client_inactive, trading_inactive, trading_denied).
email_taken, brand_fixed, limit_reached, already_linked, no_brand, no_app_domain.
invalid_request with details.errors = { field: reason }.
curl -X PUT "https://api.your-brand.com/api/external/v1/users/cust_10042" \
-H "X-Api-Key: $OCTOLIT_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}'const res = await fetch("https://api.your-brand.com/api/external/v1/users/cust_10042", {
method: "PUT",
headers: {
"X-Api-Key": process.env.OCTOLIT_PARTNER_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}),
});
if (!res.ok) throw new Error(`PUT failed: ${res.status} ${await res.text()}`);
const data = await res.json();
console.log(data);import os, requests
r = requests.request(
"PUT",
"https://api.your-brand.com/api/external/v1/users/cust_10042",
headers={"X-Api-Key": os.environ["OCTOLIT_PARTNER_KEY"]},
json={
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13,
},
timeout=10,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init("https://api.your-brand.com/api/external/v1/users/cust_10042");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: " . getenv("OCTOLIT_PARTNER_KEY"),
"Content-Type: " . "application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"first_name" => "Ana",
"last_name" => "Ortiz",
"full_name" => "Ana Ortiz",
"email" => "ana.ortiz@example.com",
"phone" => "+357 99 123456",
"country" => "CY",
"brand_id" => 13,
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Put, "https://api.your-brand.com/api/external/v1/users/cust_10042");
req.Headers.Add("X-Api-Key", Environment.GetEnvironmentVariable("OCTOLIT_PARTNER_KEY"));
req.Content = new StringContent("""
{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}
""", Encoding.UTF8, "application/json");
using var res = await http.SendAsync(req);
res.EnsureSuccessStatusCode();
Console.WriteLine(await res.Content.ReadAsStringAsync());var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create("https://api.your-brand.com/api/external/v1/users/cust_10042"))
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}
"""))
.build();
var res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());body := strings.NewReader(`{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}`)
req, err := http.NewRequest("PUT", "https://api.your-brand.com/api/external/v1/users/cust_10042", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Api-Key", os.Getenv("OCTOLIT_PARTNER_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))var req = URLRequest(url: URL(string: "https://api.your-brand.com/api/external/v1/users/cust_10042")!)
req.httpMethod = "PUT"
req.setValue(ProcessInfo.processInfo.environment["OCTOLIT_PARTNER_KEY"], forHTTPHeaderField: "X-Api-Key")
req.setValue("application/json", forHTTPHeaderField: "Content-Type")
req.httpBody = """
{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}
""".data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: req)
print((response as! HTTPURLResponse).statusCode, String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val req = Request.Builder()
.url("https://api.your-brand.com/api/external/v1/users/cust_10042")
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("PUT", """{
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"phone": "+357 99 123456",
"country": "CY",
"brand_id": 13
}""".toRequestBody("application/json".toMediaType()))
.build()
client.newCall(req).execute().use { res ->
println("${res.code} ${res.body?.string()}")
} {
"user": {
"id": 1042,
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"emails": [
"ana.ortiz@example.com"
],
"phone": "+357 99 123456",
"phones": [
"+357 99 123456"
],
"brand": {
"id": 1042,
"name": "Main"
},
"desk": {
"id": 1042,
"name": "Main"
},
"sales_status": "string",
"sales_status_changed_at": "2026-11-11T09:30:00Z",
"kyc": {
"id_status": "string",
"billing_status": "string"
},
"active": true,
"is_lead": true,
"deleted": true,
"country": "CY",
"external_user_id": "abc123",
"agents": [
{
"id": 1042,
"name": "Main"
}
],
"created_at": "2026-11-11T09:30:00.000000Z",
"updated_at": "2026-11-11T09:31:12.000000Z",
"first_deposit_date": "2026-11-11T09:30:00Z",
"comments": [
null
],
"custom_fields": {},
"external_id": "cust_10042",
"login_enabled": true,
"trading_enabled": true,
"accounts": 1
}
}{
"user": {
"id": 1042,
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"emails": [
"ana.ortiz@example.com"
],
"phone": "+357 99 123456",
"phones": [
"+357 99 123456"
],
"brand": {
"id": 1042,
"name": "Main"
},
"desk": {
"id": 1042,
"name": "Main"
},
"sales_status": "string",
"sales_status_changed_at": "2026-11-11T09:30:00Z",
"kyc": {
"id_status": "string",
"billing_status": "string"
},
"active": true,
"is_lead": true,
"deleted": true,
"country": "CY",
"external_user_id": "abc123",
"agents": [
{
"id": 1042,
"name": "Main"
}
],
"created_at": "2026-11-11T09:30:00.000000Z",
"updated_at": "2026-11-11T09:31:12.000000Z",
"first_deposit_date": "2026-11-11T09:30:00Z",
"comments": [
null
],
"custom_fields": {},
"external_id": "cust_10042",
"login_enabled": true,
"trading_enabled": true,
"accounts": 1
}
}#Pause trading for a user
Scope trading:control. New positions, balance changes and transfers are refused for the user until trading/enable; open positions stay open and are still managed (stop loss, take profit, stop-out).
Path parameters
Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.
Responses
The user.
insufficient_scope, ip_not_allowed, api_disabled, company_inactive, brand_disabled, sso_disabled, trending_disabled (trading on behalf also: brand_inactive, client_inactive, trading_inactive, trading_denied).
not_found / user_not_found / account_not_found / symbol_not_found.
curl -X POST "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable" \
-H "X-Api-Key: $OCTOLIT_PARTNER_KEY"const res = await fetch("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable", {
method: "POST",
headers: {
"X-Api-Key": process.env.OCTOLIT_PARTNER_KEY,
},
});
if (!res.ok) throw new Error(`POST failed: ${res.status} ${await res.text()}`);
const data = await res.json();
console.log(data);import os, requests
r = requests.request(
"POST",
"https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable",
headers={"X-Api-Key": os.environ["OCTOLIT_PARTNER_KEY"]},
timeout=10,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: " . getenv("OCTOLIT_PARTNER_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Post, "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable");
req.Headers.Add("X-Api-Key", Environment.GetEnvironmentVariable("OCTOLIT_PARTNER_KEY"));
using var res = await http.SendAsync(req);
res.EnsureSuccessStatusCode();
Console.WriteLine(await res.Content.ReadAsStringAsync());var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable"))
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());var body io.Reader
req, err := http.NewRequest("POST", "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Api-Key", os.Getenv("OCTOLIT_PARTNER_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))var req = URLRequest(url: URL(string: "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable")!)
req.httpMethod = "POST"
req.setValue(ProcessInfo.processInfo.environment["OCTOLIT_PARTNER_KEY"], forHTTPHeaderField: "X-Api-Key")
let (data, response) = try await URLSession.shared.data(for: req)
print((response as! HTTPURLResponse).statusCode, String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val req = Request.Builder()
.url("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/disable")
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("POST", null)
.build()
client.newCall(req).execute().use { res ->
println("${res.code} ${res.body?.string()}")
} {
"user": {
"id": 1042,
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"emails": [
"ana.ortiz@example.com"
],
"phone": "+357 99 123456",
"phones": [
"+357 99 123456"
],
"brand": {
"id": 1042,
"name": "Main"
},
"desk": {
"id": 1042,
"name": "Main"
},
"sales_status": "string",
"sales_status_changed_at": "2026-11-11T09:30:00Z",
"kyc": {
"id_status": "string",
"billing_status": "string"
},
"active": true,
"is_lead": true,
"deleted": true,
"country": "CY",
"external_user_id": "abc123",
"agents": [
{
"id": 1042,
"name": "Main"
}
],
"created_at": "2026-11-11T09:30:00.000000Z",
"updated_at": "2026-11-11T09:31:12.000000Z",
"first_deposit_date": "2026-11-11T09:30:00Z",
"comments": [
null
],
"custom_fields": {},
"external_id": "cust_10042",
"login_enabled": true,
"trading_enabled": true,
"accounts": 1
}
}#Resume trading for a user
Scope trading:control.
Path parameters
Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.
Responses
The user.
insufficient_scope, ip_not_allowed, api_disabled, company_inactive, brand_disabled, sso_disabled, trending_disabled (trading on behalf also: brand_inactive, client_inactive, trading_inactive, trading_denied).
not_found / user_not_found / account_not_found / symbol_not_found.
curl -X POST "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable" \
-H "X-Api-Key: $OCTOLIT_PARTNER_KEY"const res = await fetch("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable", {
method: "POST",
headers: {
"X-Api-Key": process.env.OCTOLIT_PARTNER_KEY,
},
});
if (!res.ok) throw new Error(`POST failed: ${res.status} ${await res.text()}`);
const data = await res.json();
console.log(data);import os, requests
r = requests.request(
"POST",
"https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable",
headers={"X-Api-Key": os.environ["OCTOLIT_PARTNER_KEY"]},
timeout=10,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: " . getenv("OCTOLIT_PARTNER_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Post, "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable");
req.Headers.Add("X-Api-Key", Environment.GetEnvironmentVariable("OCTOLIT_PARTNER_KEY"));
using var res = await http.SendAsync(req);
res.EnsureSuccessStatusCode();
Console.WriteLine(await res.Content.ReadAsStringAsync());var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder(URI.create("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable"))
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());var body io.Reader
req, err := http.NewRequest("POST", "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Api-Key", os.Getenv("OCTOLIT_PARTNER_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))var req = URLRequest(url: URL(string: "https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable")!)
req.httpMethod = "POST"
req.setValue(ProcessInfo.processInfo.environment["OCTOLIT_PARTNER_KEY"], forHTTPHeaderField: "X-Api-Key")
let (data, response) = try await URLSession.shared.data(for: req)
print((response as! HTTPURLResponse).statusCode, String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val req = Request.Builder()
.url("https://api.your-brand.com/api/external/v1/users/cust_10042/trading/enable")
.header("X-Api-Key", System.getenv("OCTOLIT_PARTNER_KEY"))
.method("POST", null)
.build()
client.newCall(req).execute().use { res ->
println("${res.code} ${res.body?.string()}")
} {
"user": {
"id": 1042,
"first_name": "Ana",
"last_name": "Ortiz",
"full_name": "Ana Ortiz",
"email": "ana.ortiz@example.com",
"emails": [
"ana.ortiz@example.com"
],
"phone": "+357 99 123456",
"phones": [
"+357 99 123456"
],
"brand": {
"id": 1042,
"name": "Main"
},
"desk": {
"id": 1042,
"name": "Main"
},
"sales_status": "string",
"sales_status_changed_at": "2026-11-11T09:30:00Z",
"kyc": {
"id_status": "string",
"billing_status": "string"
},
"active": true,
"is_lead": true,
"deleted": true,
"country": "CY",
"external_user_id": "abc123",
"agents": [
{
"id": 1042,
"name": "Main"
}
],
"created_at": "2026-11-11T09:30:00.000000Z",
"updated_at": "2026-11-11T09:31:12.000000Z",
"first_deposit_date": "2026-11-11T09:30:00Z",
"comments": [
null
],
"custom_fields": {},
"external_id": "cust_10042",
"login_enabled": true,
"trading_enabled": true,
"accounts": 1
}
}