Skip to main content

Events

Endpoint: POST /v1/events Event ingestion API - Track events to Gameramp from client devices using Api calls / S2S
  • Used to track player related events captured by API
  • The body schema will be mostly same but what is to be tracked is TBD

Headers

  • Authorization: Bearer <JWT_TOKEN>
  • Content-Type: application/json
  • X-Tenant-ID: <Tenant_ID>

Body

Events are batched, body contains array of events There are some common properties with every event as well as event related properties also:
  • Event Type - eventType - mandatory (string type, like click, impression, purchase etc(TBD))
  • Event Timestamp - eventTimestamp - Mandatory
  • Session Id - sessionId - Mandatory
  • Player Id - playerId
  • Platform - platform
  • SDK version - sdkVersion
  • App version - appVersion
  • Event Properties - properties
    • Custom event properties
    • This is an object may varies with event types
[
  {
    "eventType": "session_start",
    "timestamp": "2025-07-23T10:13:56.000Z",
    "payload": {
      // Any payload key/value pair
    },
    "metadata": {
      // Any metadata key/value pair
    }
  },
  // Additional events...
]

Example

curl --location 'https://api.gameramp.com/v1/events' \
--header 'Authorization: Bearer <JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant-ID: test_tenant_1752523421' \
--data '[
  {
    "eventType": "Ad_Impression",
    "timestamp": "2025-07-23T10:13:56.000Z",
    "payload": {
      "userId": "66317bbb_23057fc5",
      "sessionId": "4824583f-067b-4a33-b5f4-4c540487b79a",
      "adId": "demo_ad_001",
      "campaignId": "demo_campaign_001"
    },
    "metadata": {
      "deviceType": "Pixel 8",
      "osName": "Android",
      "osVersion": "14"
    }
  },
  {
    "eventType": "Ad_Impression",
    "timestamp": "2025-07-23T10:13:56.000Z",
    "payload": {
      "userId": "66317bbb_23057fc5",
      "sessionId": "4824583f-067b-4a33-b5f4-4c540487b79a",
      "adId": "demo_ad_001",
      "campaignId": "demo_campaign_001"
    },
    "metadata": {
      "deviceType": "Pixel 8",
      "osName": "Android",
      "osVersion": "14"
    }
  }
]'