Skip to main content
POST
/
events
Ingest product events
curl --request POST \
  --url https://app.gaintrace.com/api/v1/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    {
      "event_name": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "account_id": "<string>",
      "user_id": "<string>",
      "anonymous_id": "<string>",
      "session_id": "<string>",
      "event_category": "<string>",
      "feature_name": "<string>",
      "source": "<string>",
      "source_event_id": "<string>",
      "value": 123,
      "unit": "<string>",
      "is_programmatic": true,
      "properties": {}
    }
  ]
}
'
{
  "data": {
    "inserted": 123,
    "duplicates": 123,
    "linked": 123,
    "errors": 123
  },
  "validation_errors": [
    {
      "index": 123,
      "error": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer API key. Secret server keys start with gt_live_; client-safe browser keys start with gt_pub_ (write-only, origin-pinned). Create and scope keys in Settings → API Keys.

Body

application/json
events
object[]
required
Required array length: 1 - 1000 elements

Response

Events accepted.

data
object
validation_errors
object[]
Last modified on July 6, 2026