Sending events

The write endpoints, every field they take, and what comes back.

Every request is JSON, sent with two headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

The key names the project, so project is optional in every body. If you send it, it must be the project’s slug.

Events

POST https://api.snekot.co/v1/log

Field Type
channel string Required. Lowercase letters, digits and dashes, up to 64 characters.
event string Required. The event’s name, up to 200 characters.
description string Up to 4,000 characters.
icon string One emoji, or a shortcode such as :moneybag:.
notify boolean Send it as a push notification. Off unless set.
tags object Keys are lowercase letters, digits and dashes. Values are strings, numbers or booleans. Up to 50, and a text value up to 1,000 characters.
ip, user_agent string From a server only: the address and user agent of the person who did it. They tie the event to that visitor’s page views for funnels, and are not stored. Events sent from a web page are tied to their visitor without them.
user_id string The person this event is about.
parser "markdown" or "text" With markdown, the description renders bold, italic, inline code and links.
timestamp number Unix seconds. Stores the event at that time. See below.

The answer is 201 with the stored event, including its id and created_at.

Dry run

Add "dry_run": true to the body, or ?dry_run=1 to the address, to check a call without sending it. The key, the project, the channel and every field are checked as usual, and a mistake gets the same refusal. A correct call gets 200:

{ "dry_run": true, "project": "acme-store", "key": "public", "channel": "orders", "event": "Order placed", "message": "This event is valid. Nothing was stored." }

Nothing is stored, counted towards the plan, announced or forwarded. A dry run does not check whether the month’s allowance is used up.

Backfilling

An event sent with a timestamp is a backfill. It is stored at that moment and takes its place in the feed and charts, but it is not announced on the live feed and never sends a push notification. A public key can set a timestamp only within the last 7 days, which is what an app does when it was offline; anything older or in the future gets a 403. With any key, a timestamp more than five minutes ahead of now gets a 400.

Insights

An insight is a single value with a title, shown as a tile: MRR, signups today, orders in transit.

POST https://api.snekot.co/v1/insight sets it:

{ "title": "MRR", "value": "$1,289", "icon": "📈" }

PATCH https://api.snekot.co/v1/insight adds to it, starting from 0 if it does not exist. Use a negative number to subtract:

{ "title": "Orders in transit", "value": { "$inc": 1 } }

An insight holding text, such as "$1,289", cannot be incremented; the request is refused and says so. Insights need a private key.

People

A person is a user_id of your choosing: your own id for someone, usually the one in your database. They appear under People, in the Known list, the first time an event or a page view carries their id, or when you identify them.

POST https://api.snekot.co/v1/identify says who a person is: a name, an email, and any properties you keep about them.

{
  "user_id": "user-123",
  "properties": { "name": "Jane Park", "email": "[email protected]", "plan": "pro", "paying": true, "paying-since": "2026-03-01", "came-from": "Partner referral" }
}
Property
name Kept as text and cut to 200 characters. It becomes the person’s heading in the app, in place of their id.
email Shown under the name, or as the heading when there is no name, when it is one email address. Anything else sent here is kept and listed like any other property.
anything else Yours to name: a string, number or boolean under a key of lowercase letters, digits and dashes. Their page lists each one, a boolean as yes or no and a date such as 2026-03-01 as a date.

Keys sent again replace their old values and the rest are kept, so a later call can change the plan and leave the name alone. A key sent as null is removed when the call is made with a private key; a public key can add and change but not remove, so a null from one is ignored. A person keeps up to 100 properties; see Limits. Someone who has done nothing yet can be identified, so a person can be on the list before their first event.

People can be searched by id and by the value of any property, so a name, an email or a plan all find them.

What is kept about a person is your choice

A person has no name, no email and no properties unless you send them, and an id only when you set one. What Snekot records without being told is on their page views: the country and city, the device and the browser, as for any visitor. Everything in a person’s details is something your product chose to send with identify, and you decide what that is. Send what you are happy to keep and are allowed to; an id alone is enough to follow what someone did.

You can take it back. With a private key, null removes one property, and this removes everything said about a person, their groups included:

curl -X DELETE https://api.snekot.co/v1/users/user-123 -H "Authorization: Bearer $SNEKOT_TOKEN"

It needs a private key. Their events and page views stay, under the id alone; 404 means nothing was kept about them.

Groups

POST https://api.snekot.co/v1/group describes a group, such as a company or a team, and puts a user in it when user_id is given.

{ "group_id": "acme", "user_id": "user-123", "properties": { "name": "Acme", "seats": 12 } }

Newsletter signups

POST https://api.snekot.co/v1/subscribe puts an address on the project’s list of subscribers. See Newsletter signups.

{ "email": "[email protected]", "name": "Jane Park", "source": "/blog/launch" }

Page views

POST https://api.snekot.co/v1/page records a page view. The browser script sends these by itself; you rarely call it by hand. Page views are not counted against a plan’s events.

{ "user_id": "user-123", "payload": { "path": "/pricing", "title": "Pricing", "referrer": "https://example.com" } }