Events are processed asynchronously (typically within thirty seconds). Events and their properties can be used for Segmentation, Goals, Launcher item completed etc. Events tracked for users that have not yet been seen by Chameleon will be created first and then the event tracked to them
Create an Event
HTTP Request
POST
POST
HTTP Response
Event properties
All other properties will be added to the Event and will be made available for creating Custom Events.Normalized Event naming
By default, Events are grouped by their case insensitive and normalized name value. The following are all counted as the Same Event- “Imported Leads” =>
imported_leads - “ImporteD leads” =>
imported_leads - “imported-leads” =>
imported_leads
Bulk Create Events
- When sending a bulk create, send an array of Event objects as the
eventsparameter - Every Event carries its own identifier, so one request can track Events for many different Users.
- For each Event, send the User ID as
uid, thenameof the Event, and any other properties pertinent to that Event. - Instead of the
uidyou may use the Chameleon ID asidor the Email address asemail. When more than one is given they are tried in order —idfirst, thenuid, thenemail— and the User Profile matched by the first of them wins. An identifier that matches no User Profile falls through to the next one you supplied. idmust be a 24-character hexadecimal string, the form Chameleon returns it in (for example5f3c4232c712de665632a2a3). A value of any other form — a JSON number, or a string of a different length or carrying non-hex characters — is ignored rather than reported, and the item falls through touidand thenemailas though noidhad been sent. An item whose only identifier was such a value is reported as having no identifier.- The
id,uid,emailandnamekeys address the item; every other key is added to the Event as a property, except for the reserved names below. - These key names are reserved for Chameleon’s own use. Sending one as an Event property removes it from the item — no error is raised and no
errorsentry is returned, so the property is simply absent from the tracked Event:source,at,now,created_at,updated_at,percent,integration,ip,agent,options,uid_hash,user_id,profile_id,company_id,company_uid,chameleon_tag_ids,entered_campaign_options,account_id,account_token,account_secret,controller,action,format,last_seen_at,last_request_at,last_campaign_at,last_campaign_id,last_campaign_state,last_seen_session_count,last_cleared_at, and any key beginning with an underscore. Acompanykey is kept only when its value is a string, and dropped the same silent way when it is not. Otherlast_names, such aslast_login_method, are not reserved and are tracked normally. - Where one of your property names collides with a reserved name, rename it before sending — for example send
sourceasevent_sourceandactionasevent_action. There is no response field to detect the collision from, so a property you never rename stays missing from every Event you send.
HTTP Request
POST
POST
events must be present and must be a non-empty array. A request that omits events, sends it as something other than an array, or sends an empty array is rejected in full with a 422 (Unprocessable) — no Events are tracked and no per-item errors are returned.
HTTP Response
count is the number of Events accepted for processing.
{} — with no events key at all. Read count defensively (for example body.events?.count ?? 0) rather than dereferencing events directly.
HTTP Response error
An invalid item never rejects its valid neighbours; the valid Events are still tracked and every invalid item is reported with its zero-basedindex.
When the 2nd item had no value for the id, uid or email keys
Note: The status code will be the normal 202 for (Accepted for processing)
name value.
When no Events at all are accepted for processing, the status code is 200 (OK) rather than 202 and count is 0. That covers every item being invalid, and also every item being well-formed but addressed to a User Profile that could not be found.
Where each item produced an error, the body carries one errors entry per item.
on_model_missing=ignore an item whose User Profile is not found is skipped without an errors entry, so count reflects only the Events accepted — compare it to the number you sent to see how many were skipped. When none are found the response is a 200 with "count": 0 and no errors key at all.
- An item reported as not being an object, as having no Event
name, or as having no identifier is malformed. Correct it before sending it again — retrying it unchanged fails the same way. - An item reported as “No User Profile was found” is a lookup miss rather than malformed input. Send it again unchanged and it is tracked, as soon as the User Profile it addresses exists.
- A 200 carrying
"count": 0and noerrorskey is the same lookup miss, with the per-item reporting suppressed byon_model_missing=ignore. The same batch can succeed on a later retry, once the User Profiles it addresses exist. - A 200 whose body is an empty
{}, with noeventskey at all, is not a lookup miss — your Account is on the Events suppression list, so nothing in the batch was tracked. Retrying it unchanged, now or later, returns the same empty body. Contact support rather than retrying.
Missing User Profiles
- With
on_model_missing=create(the default), an item whoseuidhas not been seen by Chameleon creates the User Profile first and then tracks the Event to it, exactly as a Single Event does. - A User Profile can only be created from a
uid. An unrecognized item addressed solely byemailoridis not tracked, and gets anerrorsentry reading “No User Profile was found for the 2nd item; passuidto create it”. - With
on_model_missing=ignore, an item whose User Profile is not found is skipped: no User Profile is created, no Event is tracked, and noerrorsentry is returned for it.
Limits
- Each batch request is limited to 1,000 Events; split larger workloads across several requests.
- A batch counts as one request against rate limiting, however many Events it carries.
- As with a Single Event, Event properties are subject to the Normalization limits.
HTTP Response error
When the request carried more than 1,000 Events. The status code will be 422 (Unprocessable)Details: entry; the surrounding entries are the standard 422 envelope described on the Errors page. Request Id echoes the X-Request-Id header of your request — quote it when contacting support. The same shape is returned for the events validation failures described above.
