Skip to content

RevoSurge Server Events API

Audience: Engineers, technical integrators, Admin teams

Overview

The Server Events API allows partners to securely send user events and user activities directly from their servers to the DataPulse platform.

This API is designed for high-throughput scenarios and requires strict authentication via API Keys.

Base URL

EnvironmentBase URL
Productionhttps://datapulse-api.revosurge.com/

Authentication

All requests to the Server Events API must include an API Key in the request header X-API-Key.

Required Headers

Header NameDescription
X-API-KeyAPI Key for authentication

Ingestion Endpoints

1. Single Ingest Event

PathMethodContent-Type
/v2/s2s/eventPOSTapplication/json

1.1 Request Body Schema

The request body accepts a JSON object with the following fields:

FieldTypeRequiredDescription
client_user_idStringYesUnique identifier of the user in your system.
click_idStringYesUnique ID for the ad click.
Suggested.
event_nameStringYesName of the event (e.g., "register", "login", "deposit").
timestampIntegerYesUnix timestamp (in seconds) when the event occurred.
ip_addressStringYesIP address of the user (IPv4/IPv6).
user_agentStringNoUser agent string of the browser or device.
game_typeStringNoType of the game (e.g., "slot", "casino").
game_providerStringNoProvider of the game (e.g., "EA", "GGP").
transaction_idStringYes*Unique ID for the transaction (e.g., purchase ID).
amountFloatYes*Monetary value of the transaction (e.g., deposit amount).
currencyStringYes*3-letter ISO currency code (e.g., USD, EUR) for fiat currency, or any specific code for crypto.
is_cryptoBooleanNoSet to true if the transaction is crypto-based, otherwise false.
<<any_prop>>StringNoAdditional custom properties as key-value pairs.

PS: The transaction_id, amount, currency is not required in non-financial events (eg. login).

1.2 Example Request (curl)

bash
curl -X POST "https://<<our-url>>/v2/s2s/event" 
    -H "Content-Type: application/json" 
    -H "X-API-KEY: dp_test_key_123"
    -d '{
        "client_user_id": "user_001", 
        "click_id": "clk_998877",
        "ip_address": "203.0.113.1", 
        "event_name":"deposit",      
        "transaction_id": "tx_554433",   
        "timestamp": 1702963200,   
        "amount": 50.00,          
        "currency": "USD"  
        }'

2. Batch Ingest Event

PathMethodContent-Type
/v2/s2s/batchPOSTapplication/json

2.1 Request Body Schema

The request body accepts a JSON object of array type. The array item is referenced as defined in section 1.1.

Responses

Status CodeDescription
200 OKEvent successfully queued for processing
400 Bad RequestMissing required fields
401 UnauthorizedInvalid API Key or missing auth headers
429 Too Many RequestsRate limit exceeded
500 Server ErrorInternal processing error. Please retry with backoff

Rate Limit

  • Limits are applied per X-API-KEY.
  • Standard Limit: 60 requests per minute (Default).
  • If you exceed the limit, you will receive a 429 response.
  • Retry Strategy: We recommend implementing an exponential backoff strategy when encountering 429 or 500 errors.

Use Case Scenarios on Request Body Schema

User Register

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "click_id": "<<THE UNIQUE CLICK ID>>",
  "event_name": "register",
  "timestamp": UTC milliseconds,
  "ip_address": "<<THE END USER IP>>",
  "user_agent": "<<THE USER AGENT STRING>>"
}

User Login

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "click_id": "<<THE UNIQUE CLICK ID>>",
  "event_name": "login",
  "timestamp": UTC milliseconds,
  "ip_address": "<<THE END USER IP>>",
  "user_agent": "<<THE USER AGENT STRING>>"
}

User Deposit

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "click_id": "<<THE UNIQUE CLICK ID>>",
  "event_name": "deposit",
  "currency": "<<THE CURRENCY, eg: USD | EUR | BTC>>",
  "amount": 5.00,
  "transaction_id": "<<THE UNIQUE TRANSACTION ID>>",
  "timestamp": UTC milliseconds,
  "ip_address": "<<THE END USER IP>>",
  "is_crypto": true | false
}

User Bet

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "event_name": "bet",
  "game_type": "<<THE GAME TYPE>>",
  "game_provider": "<<THE GAME PROVIDER>>",
  "currency": "<<THE CURRENCY, eg: USD | EUR | BTC>>",
  "amount": 5.00,
  "transaction_id": "<<THE UNIQUE TRANSACTION ID>>",
  "timestamp": UTC milliseconds,
  "is_crypto": true | false,

  "bet_result": "win | loss",
  "bet_result_amount": 1.00
}

User Win/Loss

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "event_name": "win | loss",
  "game_type": "<<THE GAME TYPE>>",
  "game_provider": "<<THE GAME PROVIDER>>",
  "currency": "<<THE CURRENCY, eg: USD | EUR | BTC>>",
  "amount": 5.00,
  "transaction_id": "<<THE UNIQUE TRANSACTION ID>>",
  "parent_transaction_id": "<<THE PARENT BET TRANSACTION ID>>" 
  "timestamp": UTC milliseconds,
  "is_crypto": true | false
}

PS: Could also be sent within bet event using bet_result and bet_result_amount field.

User Withdraw

{
  "client_user_id": "<<THE UNIQUE USER ID>>",
  "event_name": "withdraw",
  "currency": "<<THE CURRENCY, eg: USD | EUR | BTC>>",
  "amount": 5.00,
  "transaction_id": "<<THE UNIQUE TRANSACTION ID>>",
  "timestamp": UTC milliseconds,
  "ip_address": "<<THE END USER IP>>",
  "is_crypto": true | false
}