You can use the Custom Events API to send raw events into Coho. Before you can do so, contact [email protected] and provide us the following information:
A sample event (in JSON format).
The names of the properties in the event that contain the following information:
User ID (required)
Client Timestamp (required)
Account ID
User sign-up time
User email
Account creation time
Account plan
After providing that information, the support team will enable the endpoint and provide you with your unique Tenant ID, which you should use to send events.
To send events, send an HTTP POST request to the following endpoint:
https://app.coho.ai/api/raw-data/custom
The headers should contain the following:
X-Coho-TenantId: <Your Tenant ID>
X-Coho-UserId-Key: <The property key of the userID field in the each of the events>
Accept: application/json
Content-Type: application/json
The body should be a JSON object in the following format:
{
"events": [...] // Each event is a JSON Object
}
Please make sure you set the X-Coho-UserId-Key
header correctly. For example, assuming your events have the following structure:
{
"myUserIdKey": "user123",
"timestamp": ...,
...
}
The header value should be: myUserIdKey
.