curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions \
--header 'Content-Type: application/json' \
--header 'X-Forwarded-For: <x-forwarded-for>' \
--header 'X-Forwarded-From: <x-forwarded-from>' \
--header 'X-Tenant-ID: <x-tenant-id>' \
--header 'deviceId: <deviceid>' \
--header 'platform: <platform>' \
--data '
{
"username": "customer.login.123456@example.test",
"password": "SecurePass123!",
"tenantKey": "a1B2c3D4e5F6g7H8i9J0kLmNopQr",
"tenantSecret": "s3Cr3tKeyXyZpQwErTyUiOpAsDfGh",
"credentialType": "PASSWORD",
"value": "customer.login.123456@example.test",
"tenantId": "11111111-2222-4333-8444-555555555555"
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions"
payload = {
"username": "customer.login.123456@example.test",
"password": "SecurePass123!",
"tenantKey": "a1B2c3D4e5F6g7H8i9J0kLmNopQr",
"tenantSecret": "s3Cr3tKeyXyZpQwErTyUiOpAsDfGh",
"credentialType": "PASSWORD",
"value": "customer.login.123456@example.test",
"tenantId": "11111111-2222-4333-8444-555555555555"
}
headers = {
"X-Forwarded-For": "<x-forwarded-for>",
"X-Tenant-ID": "<x-tenant-id>",
"X-Forwarded-From": "<x-forwarded-from>",
"platform": "<platform>",
"deviceId": "<deviceid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Forwarded-For': '<x-forwarded-for>',
'X-Tenant-ID': '<x-tenant-id>',
'X-Forwarded-From': '<x-forwarded-from>',
platform: '<platform>',
deviceId: '<deviceid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'customer.login.123456@example.test',
password: 'SecurePass123!',
tenantKey: 'a1B2c3D4e5F6g7H8i9J0kLmNopQr',
tenantSecret: 's3Cr3tKeyXyZpQwErTyUiOpAsDfGh',
credentialType: 'PASSWORD',
value: 'customer.login.123456@example.test',
tenantId: '11111111-2222-4333-8444-555555555555'
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions', 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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions",
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([
'username' => 'customer.login.123456@example.test',
'password' => 'SecurePass123!',
'tenantKey' => 'a1B2c3D4e5F6g7H8i9J0kLmNopQr',
'tenantSecret' => 's3Cr3tKeyXyZpQwErTyUiOpAsDfGh',
'credentialType' => 'PASSWORD',
'value' => 'customer.login.123456@example.test',
'tenantId' => '11111111-2222-4333-8444-555555555555'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Forwarded-For: <x-forwarded-for>",
"X-Forwarded-From: <x-forwarded-from>",
"X-Tenant-ID: <x-tenant-id>",
"deviceId: <deviceid>",
"platform: <platform>"
],
]);
$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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions"
payload := strings.NewReader("{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Forwarded-For", "<x-forwarded-for>")
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Forwarded-From", "<x-forwarded-from>")
req.Header.Add("platform", "<platform>")
req.Header.Add("deviceId", "<deviceid>")
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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions")
.header("X-Forwarded-For", "<x-forwarded-for>")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Forwarded-From", "<x-forwarded-from>")
.header("platform", "<platform>")
.header("deviceId", "<deviceid>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Forwarded-For"] = '<x-forwarded-for>'
request["X-Tenant-ID"] = '<x-tenant-id>'
request["X-Forwarded-From"] = '<x-forwarded-from>'
request["platform"] = '<platform>'
request["deviceId"] = '<deviceid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"success": true,
"message": "Session created successfully",
"token": "eyJhbGciOi...",
"refreshToken": "eyJhbGciOi...",
"sessionId": "3c13a5ab-5e26-4372-9a85-1b2eb323c592",
"expiresAt": "2026-03-16T20:49:32.000Z",
"expiresIn": 123,
"errorType": "<string>",
"user": {
"id": "<string>",
"customerId": "<string>",
"customerStatus": "<string>",
"email": "<string>",
"fullName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationId": "<string>",
"role": "<string>",
"phoneNumber": "<string>",
"isActive": true,
"lastLogin": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"tenantId": "<string>",
"gender": "<string>",
"phones": [
{
"phoneType": "<string>",
"encoding": "<string>",
"number": "<string>"
}
]
}
},
"message": "Success"
}Create customer session
Creates a new session for an individual customer user after registration.
curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions \
--header 'Content-Type: application/json' \
--header 'X-Forwarded-For: <x-forwarded-for>' \
--header 'X-Forwarded-From: <x-forwarded-from>' \
--header 'X-Tenant-ID: <x-tenant-id>' \
--header 'deviceId: <deviceid>' \
--header 'platform: <platform>' \
--data '
{
"username": "customer.login.123456@example.test",
"password": "SecurePass123!",
"tenantKey": "a1B2c3D4e5F6g7H8i9J0kLmNopQr",
"tenantSecret": "s3Cr3tKeyXyZpQwErTyUiOpAsDfGh",
"credentialType": "PASSWORD",
"value": "customer.login.123456@example.test",
"tenantId": "11111111-2222-4333-8444-555555555555"
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions"
payload = {
"username": "customer.login.123456@example.test",
"password": "SecurePass123!",
"tenantKey": "a1B2c3D4e5F6g7H8i9J0kLmNopQr",
"tenantSecret": "s3Cr3tKeyXyZpQwErTyUiOpAsDfGh",
"credentialType": "PASSWORD",
"value": "customer.login.123456@example.test",
"tenantId": "11111111-2222-4333-8444-555555555555"
}
headers = {
"X-Forwarded-For": "<x-forwarded-for>",
"X-Tenant-ID": "<x-tenant-id>",
"X-Forwarded-From": "<x-forwarded-from>",
"platform": "<platform>",
"deviceId": "<deviceid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Forwarded-For': '<x-forwarded-for>',
'X-Tenant-ID': '<x-tenant-id>',
'X-Forwarded-From': '<x-forwarded-from>',
platform: '<platform>',
deviceId: '<deviceid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'customer.login.123456@example.test',
password: 'SecurePass123!',
tenantKey: 'a1B2c3D4e5F6g7H8i9J0kLmNopQr',
tenantSecret: 's3Cr3tKeyXyZpQwErTyUiOpAsDfGh',
credentialType: 'PASSWORD',
value: 'customer.login.123456@example.test',
tenantId: '11111111-2222-4333-8444-555555555555'
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions', 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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions",
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([
'username' => 'customer.login.123456@example.test',
'password' => 'SecurePass123!',
'tenantKey' => 'a1B2c3D4e5F6g7H8i9J0kLmNopQr',
'tenantSecret' => 's3Cr3tKeyXyZpQwErTyUiOpAsDfGh',
'credentialType' => 'PASSWORD',
'value' => 'customer.login.123456@example.test',
'tenantId' => '11111111-2222-4333-8444-555555555555'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Forwarded-For: <x-forwarded-for>",
"X-Forwarded-From: <x-forwarded-from>",
"X-Tenant-ID: <x-tenant-id>",
"deviceId: <deviceid>",
"platform: <platform>"
],
]);
$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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions"
payload := strings.NewReader("{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Forwarded-For", "<x-forwarded-for>")
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Forwarded-From", "<x-forwarded-from>")
req.Header.Add("platform", "<platform>")
req.Header.Add("deviceId", "<deviceid>")
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://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions")
.header("X-Forwarded-For", "<x-forwarded-for>")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Forwarded-From", "<x-forwarded-from>")
.header("platform", "<platform>")
.header("deviceId", "<deviceid>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Forwarded-For"] = '<x-forwarded-for>'
request["X-Tenant-ID"] = '<x-tenant-id>'
request["X-Forwarded-From"] = '<x-forwarded-from>'
request["platform"] = '<platform>'
request["deviceId"] = '<deviceid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"customer.login.123456@example.test\",\n \"password\": \"SecurePass123!\",\n \"tenantKey\": \"a1B2c3D4e5F6g7H8i9J0kLmNopQr\",\n \"tenantSecret\": \"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh\",\n \"credentialType\": \"PASSWORD\",\n \"value\": \"customer.login.123456@example.test\",\n \"tenantId\": \"11111111-2222-4333-8444-555555555555\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"success": true,
"message": "Session created successfully",
"token": "eyJhbGciOi...",
"refreshToken": "eyJhbGciOi...",
"sessionId": "3c13a5ab-5e26-4372-9a85-1b2eb323c592",
"expiresAt": "2026-03-16T20:49:32.000Z",
"expiresIn": 123,
"errorType": "<string>",
"user": {
"id": "<string>",
"customerId": "<string>",
"customerStatus": "<string>",
"email": "<string>",
"fullName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"organizationId": "<string>",
"role": "<string>",
"phoneNumber": "<string>",
"isActive": true,
"lastLogin": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"tenantId": "<string>",
"gender": "<string>",
"phones": [
{
"phoneType": "<string>",
"encoding": "<string>",
"number": "<string>"
}
]
}
},
"message": "Success"
}Headers
"127.0.0.1"
"tenant-demo-001"
Client source identifier
"client-app"
Client platform
"mobile"
Device identifier
"device-demo-001"
Path Parameters
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
Body
Create individual session request
Username used for customer login
"customer.login.123456@example.test"
Customer password for session creation
"SecurePass123!"
Tenant key credential used by auth service
"a1B2c3D4e5F6g7H8i9J0kLmNopQr"
Tenant secret credential used by auth service
"s3Cr3tKeyXyZpQwErTyUiOpAsDfGh"
Credential type for alternative auth flows
"PASSWORD"
Credential value used with credentialType-based auth
"customer.login.123456@example.test"
Tenant UUID for session context
"11111111-2222-4333-8444-555555555555"