Print Friendly, PDF & Email

Using CoolaData’s REST API enables customers to send data to CoolaData. All API calls are HTTPS based, and require an app-key, provided by CoolaData. REST API data is sent in POST method.
Each call should be sent as an array of JSONs – one JSON per event. We only support flat JSON files – nested JSON is not supported. A single call may include as many as 300 events in a batch. To achieve better throughput, and if you are having many events per second, you should send ONLY in batch (and not one after the other).

For each call CoolaData responds with a “200 ok” status.
Note: As we accept events in JSON format, avoid using escape characters in the data sent to CoolaData. See a list of all escape chars here: As a best practice we recommend sending events in the event payload url encoded.



Content-Type: application/x-www-form-urlencoded


The payload must be in JSON format, and URL encoded (to avoid escape characters).
The JSON structure is:


The following mandatory parameters must be sent with all events (events without these mandatory fields will be invalid and will not be saved in CoolaData):

event_nameStringYesThe name of the event to report.
user_idStringYesThe id (possibly anonymous) of the user who generated the event
event_timestamp_epochNumberYes**Must be sent if the project is NOT set to override event time-stamp with server time.
Format is milliseconds (13 digits) only. If the project is defined to override event time-stamp with server time, any time-stamp sent with the event will be ignored.
Supported time stamp formats:
Epoch in milliseconds
Days and months can also be sent in 3 letter format, such as: Mon, Tue, etc. or Jan, Feb, etc.
custom propertiesString/NumberNoSee more information here






Auto Resolution

By default, CoolaData server resolves several properties such as IP and DUA to enrich the event with additional data

DUA Resolution:

User information such as browser, os other technology information is resolved based on the  session_dua property.

When one users a REST API, the users session_dua is best be send with every event to enable CoolaData to enrich the event with additional user agent info.

IP Resolution:

Geographic data such as city, country and state according is resolved based on the session_ip property.
When one uses a Rest API, the IP is determined according to your server, hence in such case, the geographical data won’t represent correctly your users’ geographical data. In case you would like to resolve this, send the actual session_ip as part of the event JSON, and if it’s not available set it to be 0 so we won’t override it with the server ip. For example:

curl -X POST -d
'{"events":[{"session_ip":"0","event_name":"Add Item","user_id":"uid_123456"}]}'
Print Friendly, PDF & Email