If the user is logged in and has agreed to tracking in the app, check if a tracking session is active. This could be a stored cookie or the session token __Secure-jay_tracking. The session identifier should be stored in the app to be send with each request to the Playout-API. If the session is not present or expired, a new tracking session needs to be created.
If the user has agreed to tracking, the tracking session should be created with the optional parameter user_id to associate the session with a logged-in user of the streaming platform. So the user_id needs to be provided by the implementing app.

If the session ist still active, the response will be 200 OK with the session details.
{
    "sessionId":"550e8400-e29b-41d4-a716-446655440000",
    "startTime":"2023-01-15T14:30:24.123456",
    "source":"jay.api.playout.1.0.0",
    "userId":"user-123456"
}If the session is not active or the cookie is not present, the response will be 400 Not Found.
{
  "error": {
    "code": "1001",
    "message": "No tracking session found or session data is invalid",
    "details": "TRACKING_NOT_VALID"
  }
}If no active session is found, a new tracking session needs to be created.
The user_id parameter should be an encrypted or hashed value to ensure user privacy.