What are Integrator Events?
Integrator Events let you stream customer activity from your own system into AIQ. Any event you track (orders, subscriptions, check-ins, custom actions) becomes a targetable trait you can use to build flows.
For example, an order event like this:
{
"order_type": "coffee",
"order_total": 24.50,
"store_id": "store_1"
}
Lets you build audiences such as:
Customers who have had more than 10 coffee orders in the past 90 days
Customers who had an order with a total greater than $20 from May 1 to May 31
Customers who have orders at both store_1 and store_2
Why use Integrator Events?
Bring your own signals. Any customer activity your system tracks becomes a targetable trait inside AIQ.
No schema setup. AIQ infers the queryable shape of each event automatically from the payloads you send. The first time AIQ sees a field, it becomes available as a trait in the audience builder.
Ingest Endpoint
POST /api/v2/integrators/events/ingest
Headers
Header | Required | Value |
| Yes | The AIQ REST API key for the merchant account. |
| Yes |
|
The X-APIKEY both authenticates the request and determines which AIQ account the event is written to. Use the key belonging to the merchant the customer event is tied to.
Request Body
Field | Type | Required | Notes |
| string | Yes | Your integrator slug, issued by AIQ. |
| string | Yes | Lowercase slug matching (a–z, 0–9, underscore). |
| string | No | Human-friendly label shown in the AIQ UI. Defaults to |
| int64 | Yes | Unix time in seconds for when the event occurred. |
| object | Yes | The event payload. Must be a JSON object. |
| string | One of these four | Contact phone. Normalized by AIQ. |
| string | One of these four | Contact email. Normalized by AIQ. |
| string | One of these four | AIQ contact ID. |
| string | One of these four | Third-party customer identifier (usually tied to POS). |
At least one of phone, email, contactID, or srcID is required so AIQ can resolve the event to a contact.
Limits
Max request body size: 64 KB
Max 20 distinct event names per integrator
Payloads are flattened to a max nesting depth of 3 and a max of 100 fields per payload
JSON keys must be alphanumeric/underscore only
Example Request
curl -X POST https://lab.alpineiq.com/api/v2/integrators/events/ingest \
-H "X-APIKEY: <merchant-api-key>" \
-H "Content-Type: application/json" \
-d '{
"integratorSlug": "acme_rewards",
"eventName": "subscription_renewed",
"eventDisplayName": "Subscription Renewed",
"timestamp": 1764709020,
"email": "[email protected]",
"event": {
"plan": { "tier": "gold", "monthly_price": 49.99 },
"auto_renew": true,
"promo_codes": ["WELCOME10"]
}
}'
Responses
Success
A 200 OK with an empty data object means the event was stored cleanly:
{
"code": 200,
"success": true,
"data": {}
}
Warnings
These flags appear inside data when relevant. If present, some fields may not be queryable in the audience builder.
Flag | Meaning | What to do |
| This event already has 100 distinct schema fields; new fields won't become queryable. | Trim the payload to a stable set of meaningful fields. Avoid dynamic or unbounded keys. |
| This payload contained more than 100 fields; the overflow wasn't added to the schema. | Reduce the number of fields per event. |
| The payload nested deeper than 3 levels; deeper fields weren't made filterable. | Flatten nested structures you want to make queryable. |
| One or more keys contained characters outside | Rename keys to use only letters, digits, and underscores. |
Errors
Errors use the standard AIQ evvelope:
{
"code": 400,
"success": false,
"errors": [{ "message": "invalid integratorSlug" }]
}Status | Example message | Cause |
|
| Missing or unknown slug. |
|
| No customer identifier supplied. |
|
| Missing or malformed event name. |
|
| Missing or zero timestamp. |
|
| Empty payload or a non-object (array/scalar) |
|
| Body isn't valid JSON. |
|
| Too many distinct event names. |
|
| Auth failure. |
|
| Body over 64 KB.
|
|
| Transient server-side issue. Retry the request. |
Event Payloads
The event field is the heart of the request. Rules:
Must be a JSON object (
{ ... }). Top-level arrays or scalars are rejected.All keys must be alphanumeric/underscore. Non-conforming keys are skipped from the schema.
nullvalues are ignored.Nested fields are allowed up to depth 3; deeper levels are dropped from the schema.
Up to 100 fields per payload are added to the schema.
Audience Builder
Once AIQ has received your events, they will show up as traits in the audience builder. Note that these traits are availabe per-account. Traits will only be available in the merchant account once events for that account has been ingested.
You can filter on:
Field values — any field discovered from your payloads becomes a
selectable filter pathEvent count — match contacts by how many matching events they have (e.g. exactly 3, more than 5, less than 2).
Time window — a rolling window (e.g. the last 24 hours) or a fixed start/end date
range, evaluated against the eventtimestampyou sent.
Getting Set Up
Adding a new integrator and getting your integratorSlug must be done by AIQ. To onboard, get in touch with AIQ.