Skip to main content
All CollectionsIntegrationsInbound Integrations
Sending Events to Coho with HTTP API
Sending Events to Coho with HTTP API

This document describes how to send events to Coho using the HTTP API

Updated over a month ago

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:

  1. A sample event (in JSON format).

  2. The names of the properties in the event that contain the following information:

    1. User ID (required)

    2. Client Timestamp (required)

    3. Account ID

    4. User sign-up time

    5. User email

    6. Account creation time

    7. 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.

Did this answer your question?