Skip to main content
Every posthog.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Events

aliasCreate

events.aliasCreate Create an alias linking two distinct user IDs Risk: write
await corsair.posthog.api.events.aliasCreate({});
Input
NameTypeRequiredDescription
distinct_idstringYes
aliasstringYes
Output: object
number | string | {
  status?: number | string,
  message?: string
} | any

eventCreate

events.eventCreate Ingest an analytics event Risk: write
await corsair.posthog.api.events.eventCreate({});
Input
NameTypeRequiredDescription
distinct_idstringYes
eventstringYes
propertiesobjectNo
timestampstringNo
uuidstringNo
{
}
Output: object
number | string | {
  status?: number | string,
  message?: string
} | any

identityCreate

events.identityCreate Associate properties with a user identity Risk: write
await corsair.posthog.api.events.identityCreate({});
Input
NameTypeRequiredDescription
distinct_idstringYes
propertiesobjectNo
{
}
Output: object
number | string | {
  status?: number | string,
  message?: string
} | any

trackPage

events.trackPage Track a page view event Risk: write
await corsair.posthog.api.events.trackPage({});
Input
NameTypeRequiredDescription
distinct_idstringYes
urlstringYes
propertiesobjectNo
timestampstringNo
uuidstringNo
{
}
Output: object
number | string | {
  status?: number | string,
  message?: string
} | any

trackScreen

events.trackScreen Track a screen view event Risk: write
await corsair.posthog.api.events.trackScreen({});
Input
NameTypeRequiredDescription
distinct_idstringYes
screen_namestringYes
propertiesobjectNo
timestampstringNo
uuidstringNo
{
}
Output: object
number | string | {
  status?: number | string,
  message?: string
} | any