Skip to main content
This guide walks you through ingesting Client Sessions - records that capture device fingerprints, IP addresses, and geolocation data for each client interaction with your platform. Full API reference is available in the API Reference.
Before ingesting sessions, make sure the related clients have already been ingested. See the Ingesting Clients guide.

Overview

Sessions allow Corsa to track client device activity for fraud detection and behavioral analysis. Each session captures:
  • IP address - automatically resolved to geolocation by Corsa
  • Device fingerprint - unique hash identifying the device
  • Device metadata - browser, OS, screen resolution, timezone, etc.

Step 1: Create a Session

Endpoint: POST /v1/sessions
POST /v1/sessions
Content-Type: application/json

{
  "clientId": "123e4567-e89b-12d3-a456-426614174000",
  "referenceId": "sess_abc123",
  "ipAddress": "203.0.113.42",
  "device": {
    "fingerprint": "a1b2c3d4e5f6g7h8i9j0",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
    "browser": "Chrome",
    "browserVersion": "120.0.6099.109",
    "os": "macOS",
    "osVersion": "14.2.1",
    "deviceType": "DESKTOP",
    "screenResolution": "1920x1080",
    "language": "en-US",
    "timezone": "America/New_York"
  },
  "startedAt": "2024-01-15T10:30:00Z"
}

Key Fields

FieldRequiredDescription
clientIdYesCorsa client ID or referenceId of the client
ipAddressYesIPv4 or IPv6 address (auto-resolved to geolocation)
deviceYesDevice information object
device.fingerprintYesUnique device fingerprint hash
referenceIdNoYour external session reference ID
startedAtNoSession start time (defaults to current time)

Device Type Values

TypeDescription
DESKTOPDesktop computer
MOBILEMobile phone
TABLETTablet device
UNKNOWNUnidentified device type
Corsa automatically resolves the IP address to geolocation data (country, city, coordinates). You do not need to provide geolocation separately.

Step 2: Retrieve Sessions for a Client

Endpoint: GET /v1/clients/{clientId}/sessions View all sessions associated with a specific client to analyze login patterns and device usage.
GET /v1/clients/123e4567-e89b-12d3-a456-426614174000/sessions

Step 3: End a Session

Endpoint: PUT /v1/sessions/{id} Mark a session as ended by providing the endedAt timestamp.
PUT /v1/sessions/session-uuid
Content-Type: application/json

{
  "endedAt": "2024-01-15T12:00:00Z"
}

What’s Next?

Ingest Operations

Ingest deposits, withdrawals, and trades for your clients.

Manage Attachments

Upload and manage files across entities.