Skip to main content
POST
https://sandbox.finhub.cloud
/
api
/
v2.1
/
customer
/
individual
/
{customerId}
/
users
/
{userId}
/
sessions
Individual Sessions API
curl --request POST \
  --url https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/users/{userId}/sessions \
  --header 'Content-Type: <content-type>' \
  --header 'User-Agent: <user-agent>' \
  --header 'X-Forwarded-For: <x-forwarded-for>' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "username": "<string>",
  "password": "<string>",
  "tenantKey": "<string>",
  "tenantSecret": "<string>"
}
'
{
  "code": 200,
  "message": "Success",
  "data": {
    "sessionId": "4a511e37-d2d8-4f2f-99ad-92ff5ddea020",
    "userId": "6r1k1hw6npq",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJiZmYiLCJhdWQiOiJiZmYtY2xpZW50cyIsInN1YiI6IjZyMWsxaHc2bnBxIiwiZXhwIjoxNzY4MzAyMjIyLCJpYXQiOjE3NjgyOTg2MjIsInRlbmFudElkIjoiZDFlMmYzYTQtYjVjNi00N2Q4LTllMGYtMWEyYjNjNGQ1ZTZmIiwiY3VzdG9tZXJJZCI6ImZmNzJhMTk2LTQyNmEtNGFiMy1hMmQzLWU0YzU4M2E5YmM4OCIsInVzZXJJZCI6IjZyMWsxaHc2bnBxIiwidXNlclR5cGUiOiJDT05TVU1FUiIsInJvbGVzIjpbIlVTRVIiXSwianRpIjoiMWZjYjU5YjMtMzhlOS00YWUxLWFhZTUtNmRhMDBkMDE0M2I0In0.yHXQl_MDoxDEMV9l_0iVIzy0bBkCJ3SwS557-mI9er0",
    "refreshToken": "39915084-484f-46e5-bd8d-aaf7366787da-6r1k1hw6npq-cvK_9XDw",
    "expiresAt": "2026-01-14T10:03:42.197811165",
    "success": true,
    "message": "Session created successfully",
    "errorType": "NONE"
  }
}

Individual Sessions API

Create, update, and manage authentication sessions for individual customers.
Base URL: https://sandbox.finhub.cloud

Available Operations

Create

POST - Login

Get

GET - View session

Update

PUT - Refresh

Delete

DELETE - Logout

Create Session

Creates a new authentication session for customer login.

Request

For complete details on authentication, compliance headers, and SDK implementation examples, refer to the Standard HTTP Headers reference documentation.
customerId
string
required
Customer identifier
userId
string
required
User identifier
X-Tenant-ID
string
required
Tenant identifierExample: tenant_cloudvault
Content-Type
string
required
Must be application/json
X-Forwarded-For
string
required
Required for Compliance & SecurityClient’s originating IP address for session tracking and fraud detectionExample: 192.168.1.100
User-Agent
string
required
Required for Compliance & SecurityClient application identifier for device fingerprintingExample: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

Request Body

username
string
required
Customer username or emailExample: [email protected]
password
string
required
Customer password
Never log or expose passwords in client-side code
tenantKey
string
required
Your tenant API keyExample: cvK_9XDw5g_Y_8aUtRQgPyX4aTBbObtain from Admin Portal → API Settings
tenantSecret
string
required
Your tenant API secret
Keep this secret secure! Never expose in client-side code.

Code Examples

curl -X POST "https://sandbox.finhub.cloud/api/v2.1/customer/individual/ff72a196-426a-4ab3-a2d3-e4c583a9bc88/users/56305c2b-f13a-48e4-b462-ba55460b2ad9/sessions" \
  -H "X-Tenant-ID: tenant_cloudvault" \
  -H "Content-Type: application/json" \
  -H "X-Forwarded-For: 192.168.1.100" \
  -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" \
  -d '{
    "username": "[email protected]",
    "password": "your_secure_password",
    "tenantKey": "cvK_9XDw5g_Y_8aUtRQgPyX4aTBb",
    "tenantSecret": "your_tenant_secret"
  }'
{
  "code": 200,
  "message": "Success",
  "data": {
    "sessionId": "4a511e37-d2d8-4f2f-99ad-92ff5ddea020",
    "userId": "6r1k1hw6npq",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJiZmYiLCJhdWQiOiJiZmYtY2xpZW50cyIsInN1YiI6IjZyMWsxaHc2bnBxIiwiZXhwIjoxNzY4MzAyMjIyLCJpYXQiOjE3NjgyOTg2MjIsInRlbmFudElkIjoiZDFlMmYzYTQtYjVjNi00N2Q4LTllMGYtMWEyYjNjNGQ1ZTZmIiwiY3VzdG9tZXJJZCI6ImZmNzJhMTk2LTQyNmEtNGFiMy1hMmQzLWU0YzU4M2E5YmM4OCIsInVzZXJJZCI6IjZyMWsxaHc2bnBxIiwidXNlclR5cGUiOiJDT05TVU1FUiIsInJvbGVzIjpbIlVTRVIiXSwianRpIjoiMWZjYjU5YjMtMzhlOS00YWUxLWFhZTUtNmRhMDBkMDE0M2I0In0.yHXQl_MDoxDEMV9l_0iVIzy0bBkCJ3SwS557-mI9er0",
    "refreshToken": "39915084-484f-46e5-bd8d-aaf7366787da-6r1k1hw6npq-cvK_9XDw",
    "expiresAt": "2026-01-14T10:03:42.197811165",
    "success": true,
    "message": "Session created successfully",
    "errorType": "NONE"
  }
}

Delete Session (Logout)

Terminates an active session, logging the user out.

Code Examples

curl -X DELETE "https://sandbox.finhub.cloud/api/v2.1/customer/individual/cust_12345/users/user_67890/sessions/sess_abc123" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "sessionId": "sess_abc123",
    "status": "TERMINATED",
    "terminatedAt": "2024-01-15T11:00:00Z"
  }
}

Response Codes

CodeDescription
200Session operation successful
201Session created successfully
400Invalid request
401Unauthorized
404Session or customer not found
500Internal server error

API Schema Reference

For the complete OpenAPI schema specification of this endpoint, including all request and response structures, see the API Schema Mapping document.