---
title: "/events"
method: POST
path: "/events"
---

# /events

`POST /events`

## Request body

- object
  - `type` string, required — A name for this type of event. More details [here](https://docs.gamesight.io/docs/additional-events)
  - `user_id` string, required — A unique identifier for this user. More details [here](https://docs.gamesight.io/docs/rest-api-quick-start#step-2-determine-user-id-value)
  - `identifiers` object, required — Details about the device the user is using
    - `ip` string, required — User's public IP address
    - `os` string — User's operating system version. More details [here](#section-os)
    - `resolution` string — User's screen resolution. More details [here](#section-screen-resolution)
    - `language` string — User's ISO 639-1 language string optionally including region. More details [here](#section-language).
    - `timezone` integer — User's timezone as an offset from UTC in minutes. More details [here](#section-timezone).
    - `sku` string — A custom identifier used to differentiate different distributions of the game
    - `platform` string — The platform that the game is running on. More details [here](#section-platform)
    - `platform_device_id` string — Device ID for the platform this event was measured on
    - `gsid` string — Gamesight GSID value pulled from the Web SDK
    - `useragent` string — Browser useragent for events that were sourced from a web browser (not expected for desktop/console events)
    - `country` string — Country location for the user (used if you are not providing the IP value)
  - `revenue_currency` string — Currency revenue is being reported in
  - `revenue_amount` number, float — Amount of revenue being reported. You must pass a revenue_currency together with this field. Can be provided as an Integer, Float or String.
  - `external_ids` object[] — List of external account ids
    - `external_id_type` string, required — Type of external id. Full listing here: https://docs.gamesight.io/reference/measurement-api-events#user-account-ids
    - `external_id` string, required — The ID from the external platform
    - `scope_type` string — Allowed values: ['game', 'org']. Default value of 'game' restricts this ID to only be used for attribution within this game.
    - `scope_id` string — Scope id property (when using "org" scope type). If you would like to share IDs between multiple games published by your company, provide your Organization ID here.
    - `sha256` string — Allowed values: ['server', 'client', null]. Control to hashing of external ID prior to storage. null: The ID is stored in plain text. server: The ID is hashed on the server-side before being saved. client: The ID is already hashed in this payload.
  - `timestamp` string, date-time — Explicitly set the timestamp for the event (optional - 2020-01-01T00:00:00)
  - `transaction_id` string — Unique transaction ID that is used for deduplicating events, commonly used to ensure idempotency with purchase events. Gamesight enforces that only 1 event will be processed per transaction_id.
  - `gameplay_session_id` string — A unique session ID for the user's current game session. Passing this field enables Gamesight to report on session counts, playtime, and actions within a session.
  - `metadata` string, json — Arbitrary metadata to attach to the event. Must be less than 1KB when JSON encoded.
  - `attribution` object[] — Attribution override to force this event to be attributed to a particular Tracker. Used when working with referral codes
    - `referral_code` string — Referral code used to look up tracker details for attribution
    - `touchpoint_type` 'click' | 'impression' — Whether to count this touchpoint as a click or impression
    - `team_id` integer — Team hierarchy parameter to associate with this event (required if not providing referral_code)
    - `network` string — Network hierarchy parameter to associate with this event (required if not providing referral_code)
    - `campaign` string — Campaign hierarchy parameter to associate with this event
    - `ad_group` string — Ad Group hierarchy parameter to associate with this event
    - `ad` string — Ad hierarchy parameter to associate with this event
    - `ad_type` string — Ad type reporting parameter to associate with this event
    - `placement` string — Placement reporting parameter to associate with this event
    - `keyword` string — Keyword reporting parameter to associate with this event
    - `creative` string — Creative reporting parameter to associate with this event
    - `site_id` string — Site ID reporting parameter to associate with this event
    - `sub_site_id` string — Sub Site ID reporting parameter to associate with this event
    - `requested_at` string, date — Time to count the touchpoint at (defaults to 1 second before event time)
  - `consent_scopes` object — Granular consent settings for these users. Will be merged with consent settings on the Do Not Track endpoint to determine consent settings for this user.
    - `processing` boolean — Represents that this user has consented to data processing. If this is set to `false` then all event payloads for this user will be rejected to prevent any data collection.
    - `attribution` boolean — Represents that this user has consented to attribution. If this is set to `false` then events for this user will still be recorded but they won't be attributed to any touchpoints.
    - `postbacks` boolean — Represents that this user has consented to their data being posted back to your partner Ad Networks. If this is set to `false` then events for this user will never be used to trigger postbacks.

## Response `201`

201

- object
  - `event` object
    - `created_at` string
    - `identifiers` string
    - `type` string
    - `user_id` string

## Other responses

- `403` — 403
- `422` — 422

---

[API](https://skmtc.net/gamesight/apis/measurement-api-1.md) · [All operations](https://skmtc.net/gamesight/apis/measurement-api-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gamesight/measurement-api-1/versions/d0464e63fcda/schema)
