Intempt Docs
Developer DocsAPI Reference

Track Data

Ingest tracking events into Intempt via HTTP — real-time ingestion pipeline for processing, identity resolution, and analytics.

Track Data

POST/{orgName}/projects/{projectName}/sources/{sourceId}/track

Ingests one or more tracking events in a single request. Use this endpoint to track events from backend or server-side systems, environments without Intempt SDK availability, or custom backends syncing behavioral, transactional, or lifecycle data.


Path Parameters

ParameterTypeRequiredDescription
orgNamestringYesOrganization name
projectNamestringYesProject name
sourceIdintegerYesSource identifier — represents the event data origin (web, backend, or integration)

Query Parameters

ParameterTypeRequiredDescription
apiKeystringYesAPI key used to authenticate the request and identify the source

Request Body

Content-Type: application/json

Schema

{
  "track": [
    {
      "name": "string",
      "payload": [
        {
          "eventId": "string",
          "userId": "string",
          "timestamp": 1714631904000,
          "accountId": "string",
          "sessionId": "string",
          "pageId": "string",
          "anotherUserId": "string",
          "anotherAccountId": "string",
          "data": {},
          "userAttributes": {},
          "accountAttributes": {}
        }
      ]
    }
  ]
}

Top-level Fields

FieldTypeRequiredDescription
trackarrayYesList of event groups — each group has a name and payload

Event Group Fields

FieldTypeRequiredDescription
namestringYesLogical event name (e.g. Purchase, Signup, Subscription Updated)
payloadarrayNoArray of individual event occurrences

Payload Object Fields

FieldTypeDescription
eventIdstringOptional auto-generated UUID. For session/page events must match sessionId/pageId.
userIdstringUnique user identifier (email, phone, or external ID). Required when profileId is null.
timestampintegerEvent timestamp in milliseconds. Defaults to current time if omitted.
accountIdstringAccount/group identifier (company name, domain, or external ID).
sessionIdstringGroups multiple events within a single session. For session events, value should match eventId.
pageIdstringGroups multiple events within a single page. For page events, value should match eventId.
anotherUserIdstringSecondary user ID for merging profiles across different identifier types.
anotherAccountIdstringSecondary account ID for merging accounts across different identifier types.
dataobjectCustom event attributes — no restrictions on types (e.g. purchaseAmount, locationLatitude).
userAttributesobjectCustom user attributes.
accountAttributesobjectCustom account attributes.

Examples

Single Event — Purchase

{
  "track": [
    {
      "name": "Purchase",
      "payload": [
        {
          "eventId": "generated-event-id",
          "userId": "custom@intempt.com",
          "timestamp": 1714631904000,
          "accountId": "Intempt",
          "sessionId": "generated-session-id",
          "pageId": "generated-page-id",
          "anotherUserId": "+111111111",
          "anotherAccountId": "no-reply@intempt.com",
          "data": {
            "amount": 150,
            "productName": "Wine",
            "quantity": 4,
            "locationLatitude": 51.509865
          },
          "userAttributes": {
            "location": "USA"
          },
          "accountAttributes": {
            "founded": 2000
          }
        }
      ]
    }
  ]
}

Batch Events — Multiple Purchases

{
  "track": [
    {
      "name": "Purchase",
      "payload": [
        {
          "eventId": "evt_purchase_001",
          "userId": "user1@example.com",
          "timestamp": 1714631904000,
          "sessionId": "sess_001",
          "pageId": "checkout_page",
          "data": {
            "amount": 200,
            "productName": "Whiskey",
            "quantity": 2
          }
        },
        {
          "eventId": "evt_purchase_002",
          "userId": "user2@example.com",
          "timestamp": 1714631910000,
          "sessionId": "sess_002",
          "pageId": "checkout_page",
          "data": {
            "amount": 90,
            "productName": "Beer",
            "quantity": 6
          }
        }
      ]
    }
  ]
}

Multiple events of the same type in one request reduces network overhead and suits high-volume systems (orders, payments, imports). Each payload object is processed independently.

Multiple Event Types — Signup + Purchase

{
  "track": [
    {
      "name": "Signup",
      "payload": [
        {
          "eventId": "evt_signup_001",
          "userId": "newuser@example.com",
          "timestamp": 1714631800000,
          "data": { "signupMethod": "email" },
          "userAttributes": { "plan": "trial", "country": "IN" }
        }
      ]
    },
    {
      "name": "Purchase",
      "payload": [
        {
          "eventId": "evt_purchase_003",
          "userId": "newuser@example.com",
          "timestamp": 1714631904000,
          "data": { "amount": 120, "productName": "Vodka", "quantity": 1 }
        }
      ]
    }
  ]
}

The track array can contain multiple groups with different names in a single request. Ideal for signup flows and onboarding pipelines.


Responses

200 OK

Event ingestion accepted.

{}

400 Bad Request

Invalid request parameters or malformed payload.

{}

Notes

  • Authentication via apiKey query parameter on every request
  • Partial validation is handled internally — the API may still return 200 OK for some validation issues

On this page