Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Apps

List PostHog events

The events the workspace's PostHog project recorded in the last days, busiest first (at most 50), with how often and by how many people. Start here to learn the event names. Read only. Needs PostHog connected.

get/api/v1/apps/posthog/events

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.
Scopesapps:read

Other ways to call it

CLItroopy posthog events
MCP tooltroopy_posthog_events
Rate limit30 calls in 60 seconds, for each key

Query parameters

daysinteger

Days back from today, at most 90

Default 30 · At least 1 · At most 90

searchstring

Part of the event's name

At most 100 characters

Response

200 · application/json
data*array<object>
4 properties
event*string
total*number

Times it happened in the period

users*number

Distinct people who did it (anonymous visitors count until they are identified)

lastSeen*string | null

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
429 rate_limitedWait the number of seconds in Retry-After, then retry.