Log Event

The Log Event route is the API endpoint for pushing your events to SaasHound. You can use it to log any event in your app, service, or system. Your events will be stored by your project and your specified channels.

SaasHound Events

Endpoint Url

POST
https://api.saashound.co/log-event

This endpoint allows you to send log events to SaasHound.

Request Headers

Parameter Type Description Required
Content-Type * string application/json Required
Authorization * string Bearer <TOKEN> Required

Request Params

Parameter Type Description Required
project * string Project name. Required
channel * string Channel name. Required
title * string Event name. Required
description string Event description or long description. Optional
icon string Event icon (emoji). It has to be a single emoji. Optional
color string Icon background color. Optional
userId string The unique identifier of the user. This is the same one used to identify the user. Optional
tags Tags Event tags. A record of key-value pairs where the key is a string and the value can be a string, number or boolean. Optional
notify boolean | "all" | "email" | "sms" | "push" Send push notifications. Optional
milestone boolean Event is a milestone event. Optional

Response

{
success: true,
statusCode: 200,
}

Example Code

Terminal window
curl --location --request POST 'https://api.saashound.com/log-event' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"project": "my-website",
"channel": "billing",
"title": "Payment Received",
"message": "A payment has been received for an invoice.",
"icon": "💸",
"notify": true,
"tags": {
"invoiceId": "123"
}
}'

Historical Data

You may add historical logs to SaasHound by adding a timestamp parameter to your logs. The timestamp parameter should be a unix timestamp in seconds. Remember that you will not receive a push notification for historical logs.