SessionKit DOCS
Get Started
API Reference Session Created
EVENTsessions.createdkafka

sessions.created

Published to Kafka when a new browser session is successfully created and ready.

The newly created session ID. Organization that owns the session. Proxy configuration assigned to this session. `residential`, `datacenter`, or `mobile`. Two-letter country code. Assigned IP address. ISO 8601 timestamp.

Message Schema

{
  "key": "ses_k8m2n4p6",
  "headers": {
    "event-type": "sessions.created",
    "content-type": "application/json",
    "trace-id": "abc-123-def-456"
  },
  "value": {
    "session_id": "ses_k8m2n4p6",
    "org_id": "org_x1y2z3",
    "proxy": {
      "type": "residential",
      "country": "US",
      "ip": "203.0.113.42"
    },
    "created_at": "2026-06-23T15:00:00Z"
  }
}

Consumer Example

consumer.subscribe({ topic: 'sessions.created' });

await consumer.run({
  eachMessage: async ({ message }) => {
    const event = JSON.parse(message.value.toString());
    console.log(`New session: ${event.session_id} for ${event.org_id}`);
  }
});
⌘I
AI Assistant

Ask me anything about the documentation.

ESC