Replace {subdomain} in the endpoint below with your Vitally subdomain.
You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io
Create a product event
POST https://{subdomain}.api.vitally.io/analytics/v1/track
This endpoint will create a product event in Vitally based on the (optional) messageId parameter.
Headers
| Name | Type | Description | 
| Authorization* | string | Set to  | 
| Content-Type* | string | Set to  | 
Request Body
| Name | Type | Description | 
| userId | string | Required if  | 
| accountId | string | Required if neither  | 
| event* | string | The name of the product event (e.g. "Button Clicked", "Integration Enabled", etc) | 
| properties* | object | A JSON object containing the properties of the event. Required but can be left empty if no properties needed. | 
| timestamp | string | Required if  | 
| messageId | string | Required if  | 
| organizationId | string | Required if neither  | 
200 Cake successfully retrieved.
{"message":"Success."}
Example
An example curl request describing a product event would look like:
curl -X POST https://{subdomain}.api.vitally.io/analytics/v1/track \
  -H "Authorization: Basic [your token]" \
  -H "Content-Type: application/json" \
  -d '{
  "userId": "32",
  "event": "view-customer-events",
  "properties": {
    "accountId": "123456",
    "eventId": "43212"
  },
  "messageId": "7ac1c682-a54b-4d0d-9f56-d6d3618f4915",
  "timestamp": "2018-05-15T12:31:12.123Z"
}'
