api reference
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request POST \
--url https://staging.terminal3.io/v1/user/create \
--header 'Content-Type: application/json' \
--header 'x-api-token: <x-api-token>' \
--data '
{
"profile": {
"first_name": "<string>",
"last_name": "<string>",
"email_address": "jsmith@example.com",
"middle_name": "<string>",
"user_name": "<string>",
"mobile_number": 1,
"mobile_country_code": "<string>",
"avatar": "<string>",
"language_others": [
"<string>"
],
"residence_country": "<string>",
"residence_province": "<string>",
"residence_city": "<string>",
"date_of_birth": "<string>",
"language_primary": "<string>",
"employment_industry": 123
}
}
'
Python
import requests
url = "https://staging.terminal3.io/v1/user/create"
payload = { "profile": {
"first_name": "<string>",
"last_name": "<string>",
"email_address": "jsmith@example.com",
"middle_name": "<string>",
"user_name": "<string>",
"mobile_number": 1,
"mobile_country_code": "<string>",
"avatar": "<string>",
"language_others": ["<string>"],
"residence_country": "<string>",
"residence_province": "<string>",
"residence_city": "<string>",
"date_of_birth": "<string>",
"language_primary": "<string>",
"employment_industry": 123
} }
headers = {
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript (Fetch API)
const options = {
method: 'POST',
headers: {'x-api-token': '<x-api-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile: {
first_name: '<string>',
last_name: '<string>',
email_address: 'jsmith@example.com',
middle_name: '<string>',
user_name: '<string>',
mobile_number: 1,
mobile_country_code: '<string>',
avatar: '<string>',
language_others: ['<string>'],
residence_country: '<string>',
residence_province: '<string>',
residence_city: '<string>',
date_of_birth: '<string>',
language_primary: '<string>',
employment_industry: 123
}
})
};
fetch('https://staging.terminal3.io/v1/user/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.terminal3.io/v1/user/create",
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([
'profile' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email_address' => 'jsmith@example.com',
'middle_name' => '<string>',
'user_name' => '<string>',
'mobile_number' => 1,
'mobile_country_code' => '<string>',
'avatar' => '<string>',
'language_others' => ['<string>'],
'residence_country' => '<string>',
'residence_province' => '<string>',
'residence_city' => '<string>',
'date_of_birth' => '<string>',
'language_primary' => '<string>',
'employment_industry' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.terminal3.io/v1/user/create"
payload := strings.NewReader("{\n \"profile\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email_address\": \"jsmith@example.com\",\n \"middle_name\": \"<string>\",\n \"user_name\": \"<string>\",\n \"mobile_number\": 1,\n \"mobile_country_code\": \"<string>\",\n \"avatar\": \"<string>\",\n \"language_others\": [\n \"<string>\"\n ],\n \"residence_country\": \"<string>\",\n \"residence_province\": \"<string>\",\n \"residence_city\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"language_primary\": \"<string>\",\n \"employment_industry\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<x-api-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))
}
Unirest (Java)
HttpResponse<String> response = Unirest.post("https://staging.terminal3.io/v1/user/create")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"profile\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email_address\": \"jsmith@example.com\",\n \"middle_name\": \"<string>\",\n \"user_name\": \"<string>\",\n \"mobile_number\": 1,\n \"mobile_country_code\": \"<string>\",\n \"avatar\": \"<string>\",\n \"language_others\": [\n \"<string>\"\n ],\n \"residence_country\": \"<string>\",\n \"residence_province\": \"<string>\",\n \"residence_city\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"language_primary\": \"<string>\",\n \"employment_industry\": 123\n }\n}")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://staging.terminal3.io/v1/user/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email_address\": \"jsmith@example.com\",\n \"middle_name\": \"<string>\",\n \"user_name\": \"<string>\",\n \"mobile_number\": 1,\n \"mobile_country_code\": \"<string>\",\n \"avatar\": \"<string>\",\n \"language_others\": [\n \"<string>\"\n ],\n \"residence_country\": \"<string>\",\n \"residence_province\": \"<string>\",\n \"residence_city\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"language_primary\": \"<string>\",\n \"employment_industry\": 123\n }\n}"
response = http.request(request)
puts response.read_body
Responses
- 200: Success
{ "data": { "user_id": 123 } } - 400: Bad Request
{ "code": "<string>", "message": "<string>" } - 403: Forbidden
{ "code": "<string>", "message": "<string>" } - 422: Unprocessable Entity
{ "code": "<string>", "message": "<string>" }
Headers
- x-api-token: string, required
- x-api-subclient-id: string, optional
Body
- profile: object, required