Server-to-Server - EVENT Endpoint API Reference

EVENT Endpoint API Reference

Track in-app events and revenue for attribution analysis and campaign optimization using Singular's REST API through server-to-server integration as an alternative to SDK implementation.


Overview

Server-to-Server Use Case

EVENT API enables in-app event tracking where apps forward user interaction data to your backend, which transmits to Singular's servers for event attribution and revenue analytics reporting.

Supported Capabilities:

  • Event Attribution: Connect user actions to marketing campaigns
  • Revenue Tracking: Measure and attribute in-app purchases and transactions
  • Custom Events: Track any user interaction from registrations to level completions
  • Event Properties: Attach contextual data to events for deeper analysis

Data Flow Architecture

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

  1. Client Collection: App collects event data and device identifiers
  2. Server Transmission: App forwards event data to your backend server
  3. Device Graph Query: Server retrieves or updates device details from Singular device graph
  4. Event API Call: Server sends event to Singular REST API endpoint

Event Data Flow Diagram


Critical Requirements

Prerequisites:

  • Session Before Events: SESSION must be established before any event tracking
  • Sequential Order: Invalid session order results in data inconsistencies and attribution errors

Integration Constraints:

  • Real-time Processing: Requests processed individually—no batch support
  • Chronological Events: Events must be sent in order they occurred
  • No Deduplication: Singular does not deduplicate data—implement server-side deduplication to prevent duplicates
  • Data Permanence: Device-level data cannot be deleted after ingestion—validate before sending

Event Tracking Guidelines

Implement event tracking following Singular's best practices for naming conventions and data structure.

Event Definition

Defining Events

Before implementing S2S integration, define the complete list of events your organization wants to track for campaign performance analysis.

Event planning guide: Defining In-App Events

Event Naming Impact: Event names passed to Singular directly determine how events appear in reports, exports, and postbacks.


Standard Event Naming

Best Practices:


Character Limitations

Length Restrictions:

  • Event Names: Maximum 32 ASCII characters (32 bytes when converted to UTF-8 for non-ASCII)
  • Event Attributes: Maximum 500 ASCII characters per attribute key and value

API Endpoint Selection

Singular provides two EVENT endpoint versions optimized for different integration architectures.

Endpoint Selection: Choose endpoint based on your integration architecture and device identifier strategy. Use-case determines correct endpoint.

Event Endpoint V1

V1 Use Cases

Use Event Endpoint V1 for integrations relying on platform-specific device identifiers (IDFA, IDFV, AIFA, ASID, etc.).

Recommended For:

  • Pure Server-Side: Server-side integrations without Singular SDK implementation
  • Hybrid (Non-SDID): Hybrid integrations where Singular SDK does not use Singular Device ID (SDID)

Endpoint URL:

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

Event Endpoint V2

V2 Use Cases

Use Event Endpoint V2 for hybrid integrations where Singular SDK tracks sessions using SDID and server sends events using same SDID.

Recommended For:

  • Hybrid (SDID-Based): Singular SDK tracks sessions with SDID and server-side events use same SDID
  • Simplified Identifiers: Implementations avoiding platform-specific device identifiers (IDFA, AIFA, etc.)

Endpoint URL:

GET https://s2s.singular.net/api/v2/evt

Account Enablement: V2 endpoint requires Singular account configuration for SDID usage. Contact your Solution Engineer or CSM for enablement.


Web (p=Web) Variant

Web integrations use this same EVENT endpoint with p=Web . There is no web SESSION call: the first __PAGE_VISIT__ event with conversion_event=true establishes the attribution touchpoint in place of a launch.

Full guide: For the complete browser-assisted pattern (SDID persistence, __PAGE_VISIT__ sequencing, web-to-app, and clipboard deferred deep linking), see the Web S2S Implementation Guide .

Web-Specific Parameters

These parameters apply when p=Web . Shared parameters ( a , i , ip , sdid , custom_user_id ) are defined in S2S Fundamentals .

Parameter Details
conversion_event

boolean

Set true only on the __PAGE_VISIT__ attribution event; false on all other web events. A non-conversion event arriving before its conversion event is deferred briefly to await a match.

Example: true

attribution_data

JSON

URL-encoded JSON of campaign data parsed from the landing URL, sent on the __PAGE_VISIT__ event. See attribution_data and web click IDs for the field mappings.

Example: %7B%22partner_name%22%3A%22Snapchat%22%2C%22is_attributed%22%3A%22true%22%7D

web_url

string

The campaign landing URL that contained marketing params (UTM / wp* / pc* ). Used for attribution (touchpoint creation).

Example: http://my.landing.page/?utm_campaign=test&utm_source=test

web_page_referrer

string

The referrer ( document.referrer ). Used for organic source/type classification.

Example: https://www.google.com/

Web click IDs: pass partner click IDs ( ScCid , ttclid , gclid / gbraid / wbraid , dclid , fbclid , rdt_uuid ) inside the event e parameter.


Required Device Identifiers

Device identifier requirements vary by endpoint version and platform. Review platform-specific requirements below.

V1 Endpoint Identifiers

Platform-Specific Identifiers

Event Endpoint V1 requires platform-specific advertising identifiers based on device operating system and app distribution method.

These are shared S2S parameters defined once in S2S Fundamentals .


V2 Endpoint Identifiers

SDID-Only Requirement

Event Endpoint V2 requires only Singular Device ID (SDID) for all platforms, simplifying device identification.

Parameter Details
sdid

Platforms: iOS, Android, Web, PC, Xbox, PlayStation, Nintendo, MetaQuest, CTV

Singular Device ID obtained from Singular SDK or generated client-side.

  • iOS/Android: Requires account enablement for SDID usage—SDK callback method provides SDID after initialization
  • Identifier Simplification: Eliminates need for AIFA, ASID, IDFA, IDFV parameters
  • Web: Retrieved from Singular Web SDK
  • PC/Console/CTV: Client-generated UUIDv4 representing unique app install
  • Retrieve SDID

Example: 40009df0-d618-4d81-9da1-cbb3337b8dec


Required Parameters

All EVENT requests must include these required parameters in addition to device identifiers.

Parameter Format: All parameters must be passed as URL query parameters using GET method. Do not send parameters in JSON request body.

API Authentication

These are shared S2S parameters defined once in S2S Fundamentals .


Device Parameters

These are shared S2S parameters defined once in S2S Fundamentals .


Application Parameters

These are shared S2S parameters defined once in S2S Fundamentals .


Event Parameters

Parameter Details
n

string

Name of the event being tracked.

Example: sng_add_to_cart


Optional Parameters

Optional parameters enhance event tracking with additional context and functionality.

Timestamp Parameters

Parameter Details
utime

integer

10-digit Unix timestamp of event.

Example: 1483228800

umilisec

integer

13-digit Unix timestamp with milliseconds.

Example: 1483228800000


Event Attributes

Partner Conversion API support: To forward these events to ad network partners through Singular's Conversion API integrations, include the standard optional event attributes (hashed first-party data such as eventId and ehash). See Standard Event Attributes for Conversion API Integrations.

Parameter Details
e

JSON

JSON URL-encoded string specifying custom event attributes.

JSON Structure:

{
  "sng_attr_content_id": 5581,
  "sng_attr_content": "XBox",
  "sng_attr_content_type": "electronics"
}

URL-Encoded Example:

%7B%22sng_attr_content_id%22%3A5581%2C%22sng_attr_content%22%3A%22XBox%22%2C%22sng_attr_content_type%22%3A%22electronics%22%7D
global_properties

JSON

JSON URL-encoded object containing custom key-value pairs applied globally to event.

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


Network Parameters

These are shared S2S parameters defined once in S2S Fundamentals .


Data Privacy

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 event 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 event time.

Example: 1483228800


Revenue Tracking

Track in-app purchases and revenue events with proper validation and currency handling.

Required Revenue Parameters

Basic Revenue Tracking

Minimum required parameters for revenue event tracking when performing your own revenue validation.

Best Practice: Validate revenue events with App Stores on your server-side before sending event request to Singular. If performing own validation, only these parameters required.

Parameter Details
is_revenue_event

boolean

Specifies whether event is revenue event.

  • Can be omitted if event name is __iap__ or non-zero amt provided

Example: true

amt

number

Currency amount of transaction.

  • Use in conjunction with cur parameter

Example: 2.51

cur

string

ISO 4217 three-letter uppercase currency code.

  • Use in conjunction with amt parameter

Example: USD


Revenue Validation Parameters

Singular-Validated Revenue

Optional parameters for Singular to perform server-side revenue validation with App Stores.

Validation Requirements:

  • Required if relying on Singular for revenue validation with App Stores
  • Confirm correct syntax of purchase receipt and signature values
  • Incorrect formatting causes Singular to block revenue and generate __iapinvalid__ event
Parameter Details
purchase_receipt
iOS, Android

JSON

Receipt received from purchase transaction.

Example (iOS):

MIISqwYJKoZI...cNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==

Example (Android, URL-encoded):

%7B%22orderId%22%3A%22GPA.1234%22%2C%22packageName%22%3A%22com.example%22%2C%22productId%22%3A%22com.example.product%22...
receipt_signature
Android

string

Signature used to sign purchase receipt (Android only).

Example:

TyVJfHg8OAoW7W4wuJt...5agEDMnNXvhfrw==
purchase_product_id

string

Product SKU identifier.

Example: com.example.product

purchase_transaction_id

string

Transaction identifier.

Example (iOS): 380000123004321

Example (Android): GPA.1234-1234-1234-12345


Request Examples

Sample code demonstrates EVENT 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',
    'bd': 'Build/13D15',
    'aifa': '8ecd7512-2864-440c-93f3-a3cabe62525b',
    'asid': 'edee92a2-7b2f-45f4-a509-840f170fc6d9',
    'n': 'sng_add_to_cart'
}

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

Response Codes & Errors

EVENT 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 event 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. Build and Launch: Build or open app from terminated state
  5. Validate Client Data: Confirm app sends all required Singular data points to your server
  6. Verify Session: Confirm your server sends SESSION request to https://s2s.singular.net/api/v1/launch with all required parameters
  7. Check SDK Console (Session): Within seconds, SESSION event should appear in SDK Console

SDK Console Session Event


Event Testing

  1. Trigger Event: Proceed to triggering an event in the app
  2. Validate Event Data: Confirm event sent to your server with all required Singular data points
  3. Verify Server Request: Confirm your server sends EVENT request to https://s2s.singular.net/api/v1/evt with all required parameters
  4. Check SDK Console (Event): Within seconds, EVENT should appear in SDK Console
  5. Repeat Tests: Validate all events sent with expected values

SDK Console Event

Critical Verifications:

  • Confirm SESSION event occurs on app open/foreground BEFORE EVENT received
  • Confirm EVENT required data points match SESSION data points

Success Indicator: If events appear in SDK Console, you've completed successful end-to-end event integration test!


Additional Resources

Testing Documentation

Comprehensive testing guide: S2S Integration Testing Guide