Individual Sessions API
Create, update, and manage authentication sessions for individual customers.
Base URL: https://sandbox.finhub.cloud
Available Operations
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.
Tenant identifier Example: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd
Response format (optional — defaults to application/json) Example: application/json, text/plain, */*
Source identifier for request origin tracking Example: e2e-test
Client application identifier — required by the global request filter Example: YourApp/1.0 or Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Client platform identifier. Also accepted as sec-ch-ua-platform Example: web
Unique device identifier for session tracking. Also accepted as X-Device-Id or device-id Example: 356938035643809
Browser client hint for OS platform (accepted alias for platform) Example: "Windows"
Request Body
Customer username or email Example: marcus.jensen@example.com
Customer password Never log or expose passwords in client-side code
Your tenant API key Example: cvK_9XDw5g_Y_8aUtRQgPyX4aTBb Obtain from Admin Portal → API Settings
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 "Accept: application/json, text/plain, */*" \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "X-Forwarded-From: e2e-test" \
-H "platform: web" \
-H "deviceId: 356938035643809" \
-d '{
"username": "marcus.jensen@example.com",
"password": "your_secure_password",
"tenantKey": "cvK_9XDw5g_Y_8aUtRQgPyX4aTBb",
"tenantSecret": "your_tenant_secret"
}'
200 - Success
401 - Invalid Credentials
403 - Invalid Tenant Keys
{
"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 "Accept: application/json, text/plain, */*" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "X-Forwarded-From: e2e-test" \
-H "platform: web" \
-H "deviceId: 356938035643809"
{
"success" : true ,
"data" : {
"sessionId" : "sess_abc123" ,
"status" : "TERMINATED" ,
"terminatedAt" : "2024-01-15T11:00:00Z"
}
}
Response Codes
Code Description 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.
Client/application Ip address
Client/application identifier for request source tracking
Example: "97e7ff29-15f3-49ef-9681-3bbfcce4f6cd"
Client platform identifier. Also accepted as sec-ch-ua-platform
Bearer token from admin or customer session creation
Individual customer identifier (UUID)
Example: "ff72a196-426a-4ab3-a2d3-e4c583a9bc88"
Example: "56305c2b-f13a-48e4-b462-ba55460b2ad9"
Example: "marcus.jensen.1773494532320.cmcdd1@mediumrisk-example.com"
Example: "z6B8H1XAeYSxZbuIlAT1NIRh6Aga"
Example: "zb9anCFp2f2UJNWlGhtB8brsgAca"
Example: "marcus.jensen.1773494532320.cmcdd1@mediumrisk-example.com"
Example: "97e7ff29-15f3-49ef-9681-3bbfcce4f6cd"