Server-to-Server - SESSION Endpoint API Reference

SESSION Endpoint API Reference

Track user sessions and enable attribution for app installs, re-engagement, and retention metrics through Singular's REST API using server-to-server integration as an alternative to SDK implementation.


Overview

Server-to-Server Use Case

Singular REST API enables direct server-to-server integration where apps forward device-specific data to your backend, which transmits to Singular's servers for attribution processing and analytics reporting.

Supported Capabilities:

  • Install Attribution: First-touch attribution to marketing campaigns
  • Re-engagement Attribution: Multi-touch attribution for returning users
  • Retention Metrics: Session-based engagement tracking
  • Event Tracking: Custom in-app event measurement

Data Flow Architecture

Server-to-server integration follows a four-step data transmission process.

  1. Client Collection: App collects required device and application data
  2. Server Transmission: App forwards collected data to your backend server
  3. Singular API Call: Your server sends data to Singular REST API endpoint
  4. Response Handling: Your server receives and processes Singular's response

Session Data Flow Diagram


Key Considerations

Critical Requirements:

  • Real-time Processing: Requests processed individually—no batch support
  • Sequential Order: Events must be sent chronologically
  • No Deduplication: Singular does not deduplicate data—implement server-side deduplication
  • Data Permanence: Device-level data cannot be deleted after ingestion—validate before sending
  • Session First: Session must be established before any event tracking

Integration Benefits:

  • Flexibility: Complete control over data collection and transmission timing
  • Feature Parity: Supports all SDK functionality when proper data provided
  • Custom Implementation: Adapt integration to specific backend architecture

Session Management

SESSION endpoint notifies Singular of app open events to initialize user sessions for attribution and tracking.

When to Send Sessions

Session Triggers

Send SESSION requests for these app lifecycle events:

  • Fresh Installations: First app launch after install
  • Terminated State Launch: App opens from fully closed state
  • Background to Foreground: App returns to foreground after timeout period (recommended: 60 seconds)

Session Timeout Logic

Implement session timeout to prevent excessive SESSION requests during brief app backgrounding.

Recommended Implementation:

  • Timeout Duration: 60 seconds (1 minute)
  • Foreground < Timeout: Do not send SESSION if app returns to foreground within timeout period
  • Foreground > Timeout: Send SESSION if app remains backgrounded beyond timeout period
  • App Lifecycle Tracking: Use app lifecycle events and timers to manage session state

Deep Link Support: Always send SESSION for app opens via deep links, Universal Links, or App Links with the openuri parameter populated, regardless of timeout status.


Attribution Processing

Session-Based Attribution

Singular processes SESSION requests to determine attribution type and trigger appropriate workflows.

Session Type Singular Processing Attribution Result
First Session (New Install) Install attribution process triggered Attributes install to marketing campaign
Re-engagement Qualified Re-engagement attribution process triggered Attributes user return to campaign or deep link
Standard Session Session recorded for retention tracking Counts toward user activity and engagement metrics

Learn more: Re-engagement Attribution FAQ


Event Order Requirements

Session and event timing directly impacts attribution accuracy and data quality.

Critical Ordering Rules:

  1. Session Before Events: Single SESSION must be received before any events for that session
  2. Real-time Event Transmission: In-app events must be sent in real-time after their respective session
  3. Sequential Processing: Invalid session order results in data inconsistencies and attribution errors

Advanced Options

Extended Functionality

Singular S2S integration supports advanced capabilities requiring additional SESSION parameters.

Advanced Features: Review Advanced S2S Options for deep linking, SKAdNetwork, and cross-device tracking requirements.


API Endpoint Specification

SESSION endpoint accepts GET requests with query parameters containing device, application, and attribution data.

Endpoint URL

Base URL and Method

GET https://s2s.singular.net/api/v1/launch

Request Format:

GET /api/v1/launch?param1=value1&param2=value2

Request Body: Do not provide request body—all parameters must be sent as URL query parameters using GET method.


Required Parameters

All SESSION requests must include these required parameters with proper values and formatting.

API Authentication

SDK Key

These are shared S2S parameters defined once in S2S Fundamentals .


Device Identifiers

Platform-Specific Identifiers

These are shared S2S parameters defined once in S2S Fundamentals .


Device Parameters

Device Information

These are shared S2S parameters defined once in S2S Fundamentals .


Application Parameters

App Information

App identifier ( i ), app_v , and att_authorization_status are shared parameters. See Application Parameters in S2S Fundamentals .

Parameter Details
install

boolean

Indicates if session represents first session after install or reinstall.

  • true - First session after fresh install/reinstall
  • false - Subsequent session (app already installed)

Required for: Reinstall tracking capabilities

Example: true

install_time
iOS, Android

integer

Unix timestamp of first app install.

Example: 1510040127

update_time
iOS, Android

integer

Unix timestamp of last app update.

Example: 1510040127


Fraud Prevention Parameters

Install Source Validation

Parameter Details
install_source
Android, PC

string

Install source package name or store identifier.

Android: Install Source Package Name

Android Example: com.android.vending (Google Play Store)

PC Supported Stores:

  • steam
  • epic
  • microsoftstore
  • humblestore
  • gog
  • selfdistributed
install_receipt
iOS

string

Base64-encoded iOS install receipt for fraud validation.

Example (truncated): MIJF9wYJKoZIhvcNAQcCoIJF6DCCReQCAQExCzAJBgUrDgMCGgUAMII1m...


Deep Linking Parameters

Deep Link Support

Parameter Details
openuri
iOS, Android

string

URL-encoded deep link, Universal Link, or App Link that opened the app.

Original URL: myapp://home/page?queryparam1=value1&queryparam2=value2

Encoded Example: myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1%26queryparam2%3Dvalue2

ddl_enabled
iOS, Android

boolean

Indicates if app expects deferred deep link URL in response.

  • true - Expect deferred deep link in response
  • false - Do not expect deferred deep link

Example Response:

{
  "deferred_deeplink": "myapp://deferred-deeplink",
  "status": "ok",
  "deferred_passthrough": "passthroughvalue"
}
singular_link_resolve_required
iOS, Android

boolean

Requests resolution of Singular short link to long link. Must be used with openuri containing Singular short link.

  • true - Return expanded long link
  • false - Do not resolve link

Example Response:

{
  "status":"ok",
  "resolved_singular_link":"https://myapp.sng.link/A59c0/nha7?_dl=myapp%3A%2F%2Fdeeplink&_ddl=myapp%3A%2F%2Fdeferred-deeplink&_p=passthroughvalue"
}

Advanced Attribution Parameters

Platform Attribution Enhancement

Parameter Details
install_ref
Android (Google Play)
Native PC (Google Play Games)

JSON

JSON URL-encoded Google Install Referrer information. Provides most accurate attribution for Android and Google Play Games PC installs.

Android JSON Structure:

{
   "installBeginTimestampSeconds":"1568939453",
   "referrer":"utm_source=google-play&utm_medium=organic",
   "clickTimestampSeconds":"0",
   "referrer_source":"service",
   "current_device_time":"1568944524"
}

Native PC JSON Structure:

{
   "install_time_epoch_seconds":"1568939453",
   "install_referrer":"utm_source=google-play&utm_medium=organic"
}

Required For:

  • Facebook user-level exports
  • Data Destination sharing
  • Postback accuracy

More info:

URL-Encoded Example: %7B%22installBeginTimestampSeconds%22%3A%221568939453%22...

meta_ref
Android (Google Play)

JSON

As of June 18, 2025: Meta Advanced Mobile Measurement (AMM) removes need for Meta Install Referrer implementation. Not recommended if AMM enabled.

JSON URL-encoded Meta Install Referrer for granular user-level attribution data.

JSON Structure:

{
  "install_referrer": {
    "utm_source":"apps.facebook.com",
    "utm_campaign": "fb4a",
    "utm_content": {
      "source":{
        "data":"c7e6b890bf18a059c2185650bdb1af3dced7...",
        "nonce":"24859720343e2381daee9f39ae61"
        },
      "app":533744218636280,
      "t":1731181327
      },
    "is_ct":1,
    "actual_timestamp":1731181444
  }
}

Learn more: Meta Referrer FAQ

attribution_token
iOS

string

Apple Search Ads attribution token from AdServices framework (iOS 14.3+).

Retrieve Using: attributionToken() on first app launch after install/reinstall.

Example (truncated): KztLg%2FIkNsWDMuBMOU%2BySnkPU5myJb4OFmeaMUE%2BTqQJP...


Optional Parameters

Optional parameters enhance tracking capabilities and support advanced features.

Timestamp Parameters

Parameter Details
utime

integer

10-digit Unix timestamp of session.

Example: 1483228800

umilisec

integer

13-digit Unix timestamp with milliseconds.

Example: 1483228800000


Network & Location Parameters

These are shared S2S parameters defined once in S2S Fundamentals .


Custom Properties

Parameter Details
global_properties

JSON

URL-encoded JSON object with custom key-value pairs.

Limits:

  • Maximum 5 key-value pairs
  • Maximum 200 characters per key and value

JSON: {"key1":"value1","key2":"value2"}

URL-Encoded: %7B%22key1%22%3A%22value1%22%2C%22key2%22%3A%22value2%22%7D


Uninstall Tracking Support

Parameter Details
apns_token
iOS

string

Hex-encoded Apple Push Notification Service (APNs) device token.

Example: b0adf7c9730763f88e1a048e28c68a9f806ed032fb522debff5bfba010a9b052

fcm
Android

string

Firebase Cloud Messaging device token.

Example: bk3RNwTe3H0CI2k_HHwgIpoDKCIZvvD...MExUdFQ3P1


Data Privacy Parameters

These are shared S2S parameters defined once in S2S Fundamentals .


Cross-Device Support

These are shared S2S parameters defined once in S2S Fundamentals .


SKAdNetwork Support

Parameter Details
skan_conversion_value
iOS

integer

Latest SKAdNetwork conversion value at session time.

Learn more: SKAdNetwork Implementation

Example: 7

skan_first_call_timestamp
iOS

integer

Unix timestamp of first call to SKAdNetwork API.

Example: 1483228800

skan_last_call_timestamp
iOS

integer

Unix timestamp of most recent call to SKAdNetwork API at session time.

Example: 1483228800


Google Ads ICM Support (Beta)

Parameter Details
odm_info
iOS

string

Required for Google Ads Integrated Conversion Measurement (Beta).

Google Ads ICM Documentation

odm_error
iOS

string

Required for Google Ads Integrated Conversion Measurement (Beta).

Google Ads ICM Documentation


Request Examples

Sample code demonstrates SESSION endpoint integration across multiple programming languages.

Example Disclaimer: Code samples may not include all required parameters. Validate complete parameter list before production implementation. Use unique i (app identifier) for development/testing.

PYTHON CURL HTTP JAVA

Python Example

import requests

params = {
    'a': 'sdk_key_here',
    'p': 'Android',
    'i': 'com.singular.app',
    'ip': '10.1.2.3',
    've': '9.2',
    'ma': 'samsung',
    'mo': 'SM-G935F',
    'lc': 'en_US',
    'aifa': '8ecd7512-2864-440c-93f3-a3cabe62525b',
    'asid': 'edee92a2-7b2f-45f4-a509-840f170fc6d9',
    'install': 'true',
    'n': 'MyCoolAppName',
    'bd': 'Build/13D15',
    'app_v': '1.2.3',
    'openuri': 'myapp://home/page?queryparam1=value1',
    'ddl_enabled': 'true',
    'install_source': 'com.android.vending',
    'install_time': 1510040127,
    'update_time': 1510090877
}

response = requests.get('https://s2s.singular.net/api/v1/launch', params=params)
print(response.json())

Response Codes & Errors

SESSION endpoint returns HTTP status codes and JSON responses indicating request success or failure.

Complete error documentation: S2S Response Codes & Error Handling


Testing & Validation

Verify S2S integration before production deployment using Singular SDK Console for real-time data validation.

Testing Procedure

End-to-End Validation

  1. Register Test Device: Obtain device advertising ID and add to Singular SDK Console
  2. Enable Console Logging: Add device identifier in SDK Console to capture test data
  3. Use Development App ID: Override app identifier with development version (e.g., com.singular.app.dev ) to separate test from production data
  4. Launch App: Open app from terminated state to trigger session
  5. Validate Client Data: Confirm app sends all required Singular data points to your server
  6. Verify Server Request: Confirm your server sends SESSION request to https://s2s.singular.net/api/v1/launch with all required parameters
  7. Check SDK Console: Within seconds, SESSION event should appear in SDK Console
  8. Repeat Tests: Validate SESSION triggers on every app entry and foreground operation

SDK Console Session Event

Critical Verification: Confirm SESSION event occurs on app open/foreground BEFORE any EVENT requests. Invalid order causes attribution errors.

Success Indicator: If SESSION appears in SDK Console, you've completed successful end-to-end integration test!


Additional Resources

Testing Documentation

Comprehensive testing guide: S2S Integration Testing Guide