If your team tracks product usage in PostHog, PostHog can send its people and events to Kirora as they happen, through a destination in PostHog’s data pipeline. Contacts and events arrive as Kirora data, ready for segments and journeys.
Add the destination
In PostHog, open Data pipeline → Destinations, create a HTTP Webhook destination and set:
| Setting | Value |
|---|---|
| Webhook URL | https://api.kirora.io/segment/v1/track |
| Method | POST |
| Headers | Authorization: Bearer <your Kirora API key> and Content-Type: application/json |
| Filters | The events you want in Kirora, and person property email is set |
Use this JSON body:
{
"type": "track",
"event": "{event.event}",
"userId": "{event.distinct_id}",
"messageId": "{event.uuid}",
"timestamp": "{event.timestamp}",
"properties": "{event.properties}",
"context": { "traits": { "email": "{person.properties.email}" } }
}To keep contacts’ details up to date, add a second destination filtered to $identify,
posting to https://api.kirora.io/segment/v1/identify with this body:
{
"type": "identify",
"userId": "{event.distinct_id}",
"messageId": "{event.uuid}",
"timestamp": "{event.timestamp}",
"traits": {
"email": "{person.properties.email}",
"firstName": "{person.properties.first_name}",
"lastName": "{person.properties.last_name}"
}
}These are Segment’s tracking API paths and format, which Kirora reads as Segment’s own libraries send them. How each call becomes Kirora data is in Sending data from Segment.
How PostHog data becomes Kirora data
- The contact: PostHog’s
distinct_idbecomes the contact’sexternalId, so it should be your own ID for the user (what you pass toposthog.identify()). The email finds a contact you imported by email instead of creating a second one. - Events keep their PostHog name and properties. Pick the events journeys and
segments need; PostHog’s own events (
$pageview,$autocapture) are rarely worth sending, and a workspace tracks at most 1,000 distinct event names. - Anonymous users are skipped: Kirora keeps no anonymous contacts. The filter on
emailsends only people you can message. - Consent is never read from PostHog: a contact it creates has no marketing consent until your app records it through the contacts API or a form.
- Retries: PostHog’s event
uuidis the call’smessageId, so a retried event is recorded once.
Requirements
- The key: make it from Integrations → PostHog in Kirora (or with
source: "posthog"), withcontacts:writeandevents:write. Its events are then labelledposthog, and the PostHog card shows its last activity. - Plan: the integrations feature (Starter and above). On Free, each call is refused
with 403
PLAN_FEATURE_UNAVAILABLE. Each tracked event counts against the plan’s monthly event allowance. - Limits: 32 KB a call; event properties up to 16 KB.
{event.properties}includes what PostHog adds itself ($geoip_*,$browser, and$setand$set_oncecopies), which can make up most of an event. To keep only your own, list them instead:"properties": { "plan": "{event.properties.plan}", "seats": "{event.properties.seats}" }.