---
updatedAt: 2025-03-10T16:47:04.000Z
agentTools:
  projectIndex: https://docs.gamesight.io/llms.txt
---

# /events

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "measurement-api-1",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.ingest.marketing.gamesight.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/events": {
      "post": {
        "summary": "/events",
        "description": "",
        "operationId": "measurement-api-events",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "user_id",
                  "identifiers"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "A name for this type of event. More details [here](https://docs.gamesight.io/docs/additional-events)",
                    "default": "game_launch"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "A unique identifier for this user. More details [here](https://docs.gamesight.io/docs/rest-api-quick-start#step-2-determine-user-id-value)",
                    "default": "user123"
                  },
                  "identifiers": {
                    "type": "object",
                    "description": "Details about the device the user is using",
                    "required": [
                      "ip"
                    ],
                    "properties": {
                      "ip": {
                        "type": "string",
                        "description": "User's public IP address",
                        "default": "172.123.245.14"
                      },
                      "os": {
                        "type": "string",
                        "description": "User's operating system version. More details [here](#section-os)",
                        "default": "Windows 7"
                      },
                      "resolution": {
                        "type": "string",
                        "description": "User's screen resolution. More details [here](#section-screen-resolution)",
                        "default": "1920x1080"
                      },
                      "language": {
                        "type": "string",
                        "description": "User's ISO 639-1 language string optionally including region. More details [here](#section-language).",
                        "default": "en"
                      },
                      "timezone": {
                        "type": "integer",
                        "description": "User's timezone as an offset from UTC in minutes. More details [here](#section-timezone).",
                        "format": "int32"
                      },
                      "sku": {
                        "type": "string",
                        "description": "A custom identifier used to differentiate different distributions of the game"
                      },
                      "platform": {
                        "type": "string",
                        "description": "The platform that the game is running on. More details [here](#section-platform)"
                      },
                      "platform_device_id": {
                        "type": "string",
                        "description": "Device ID for the platform this event was measured on"
                      },
                      "gsid": {
                        "type": "string",
                        "description": "Gamesight GSID value pulled from the Web SDK"
                      },
                      "useragent": {
                        "type": "string",
                        "description": "Browser useragent for events that were sourced from a web browser (not expected for desktop/console events)"
                      },
                      "country": {
                        "type": "string",
                        "description": "Country location for the user (used if you are not providing the IP value)"
                      }
                    }
                  },
                  "revenue_currency": {
                    "type": "string",
                    "description": "Currency revenue is being reported in",
                    "default": "USD"
                  },
                  "revenue_amount": {
                    "type": "number",
                    "description": "Amount of revenue being reported. You must pass a revenue_currency together with this field. Can be provided as an Integer, Float or String.",
                    "default": 0,
                    "format": "float"
                  },
                  "external_ids": {
                    "type": "array",
                    "description": "List of external account ids",
                    "items": {
                      "properties": {
                        "external_id_type": {
                          "type": "string",
                          "description": "Type of external id. Full listing here: https://docs.gamesight.io/reference/measurement-api-events#user-account-ids"
                        },
                        "external_id": {
                          "type": "string",
                          "description": "The ID from the external platform"
                        },
                        "scope_type": {
                          "type": "string",
                          "description": "Allowed values: ['game', 'org']. Default value of 'game' restricts this ID to only be used for attribution within this game."
                        },
                        "scope_id": {
                          "type": "string",
                          "description": "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": {
                          "type": "string",
                          "description": "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."
                        }
                      },
                      "required": [
                        "external_id_type",
                        "external_id"
                      ],
                      "type": "object"
                    }
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "Explicitly set the timestamp for the event (optional - 2020-01-01T00:00:00)",
                    "format": "date-time"
                  },
                  "transaction_id": {
                    "type": "string",
                    "description": "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": {
                    "type": "string",
                    "description": "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": {
                    "type": "string",
                    "description": "Arbitrary metadata to attach to the event. Must be less than 1KB when JSON encoded.",
                    "format": "json"
                  },
                  "attribution": {
                    "type": "array",
                    "description": "Attribution override to force this event to be attributed to a particular Tracker. Used when working with referral codes",
                    "items": {
                      "properties": {
                        "referral_code": {
                          "type": "string",
                          "description": "Referral code used to look up tracker details for attribution"
                        },
                        "touchpoint_type": {
                          "type": "string",
                          "description": "Whether to count this touchpoint as a click or impression",
                          "default": "click",
                          "enum": [
                            "click",
                            "impression"
                          ]
                        },
                        "team_id": {
                          "type": "integer",
                          "description": "Team hierarchy parameter to associate with this event (required if not providing referral_code)",
                          "format": "int32"
                        },
                        "network": {
                          "type": "string",
                          "description": "Network hierarchy parameter to associate with this event (required if not providing referral_code)"
                        },
                        "campaign": {
                          "type": "string",
                          "description": "Campaign hierarchy parameter to associate with this event"
                        },
                        "ad_group": {
                          "type": "string",
                          "description": "Ad Group hierarchy parameter to associate with this event"
                        },
                        "ad": {
                          "type": "string",
                          "description": "Ad hierarchy parameter to associate with this event"
                        },
                        "ad_type": {
                          "type": "string",
                          "description": "Ad type reporting parameter to associate with this event"
                        },
                        "placement": {
                          "type": "string",
                          "description": "Placement reporting parameter to associate with this event"
                        },
                        "keyword": {
                          "type": "string",
                          "description": "Keyword reporting parameter to associate with this event"
                        },
                        "creative": {
                          "type": "string",
                          "description": "Creative reporting parameter to associate with this event"
                        },
                        "site_id": {
                          "type": "string",
                          "description": "Site ID reporting parameter to associate with this event"
                        },
                        "sub_site_id": {
                          "type": "string",
                          "description": "Sub Site ID reporting parameter to associate with this event"
                        },
                        "requested_at": {
                          "type": "string",
                          "description": "Time to count the touchpoint at (defaults to 1 second before event time)",
                          "format": "date"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "consent_scopes": {
                    "type": "object",
                    "description": "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.",
                    "properties": {
                      "processing": {
                        "type": "boolean",
                        "description": "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": {
                        "type": "boolean",
                        "description": "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": {
                        "type": "boolean",
                        "description": "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."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"event\": {\n    \"created_at\": \"2120-01-02T13:34:56\", \n    \"identifiers\": \"7efa773c803a0..2fbf9a22\", \n    \"type\": \"game_launch\", \n    \"user_id\": \"b91f8k5r\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "event": {
                      "type": "object",
                      "properties": {
                        "created_at": {
                          "type": "string",
                          "example": "2120-01-02T13:34:56"
                        },
                        "identifiers": {
                          "type": "string",
                          "example": "7efa773c803a0..2fbf9a22"
                        },
                        "type": {
                          "type": "string",
                          "example": "game_launch"
                        },
                        "user_id": {
                          "type": "string",
                          "example": "b91f8k5r"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"extra\": null, \n  \"message\": \"The provided API Key is invalid\", \n  \"status_code\": 403, \n  \"type\": \"InvalidApiKeyException\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "extra": {},
                    "message": {
                      "type": "string",
                      "example": "The provided API Key is invalid"
                    },
                    "status_code": {
                      "type": "integer",
                      "example": 403,
                      "default": 0
                    },
                    "type": {
                      "type": "string",
                      "example": "InvalidApiKeyException"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"extra\": {\n    \"type\": \"required field\", \n    \"fake_field\": \"unknown field\"\n  }, \n  \"message\": \"Input failed validation\", \n  \"status_code\": 422, \n  \"type\": \"ValidationException\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "extra": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "required field"
                        },
                        "fake_field": {
                          "type": "string",
                          "example": "unknown field"
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Input failed validation"
                    },
                    "status_code": {
                      "type": "integer",
                      "example": 422,
                      "default": 0
                    },
                    "type": {
                      "type": "string",
                      "example": "ValidationException"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Api-Version",
        "value": "1.1.0"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```