---
title: "@togohq/sdk-node changelog"
canonical: https://www.togohq.ai/changelog/sdk-node
entries: 5
---

# @togohq/sdk-node changelog

## @togohq/sdk-node 1.3.1 — Version 1.3.1 corrects the 1.3.0 changelog

Released November 5, 2026 · Node.js SDK
Permalink: https://www.togohq.ai/changelog/sdk-node/1.3.1

### Fixed

- The 1.3.0 entry in this changelog now describes the Node SDK's changes: `withFlush()`, `flushIntervalSeconds` replacing `flushIntervalMs`, the `batchSize` range and the `flush()` retry. It had listed browser-only session changes.

## @togohq/sdk-node 1.3.0 — Version 1.3.0 adds withFlush() for serverless handlers and takes the flush interval in seconds

Released November 5, 2026 · Node.js SDK
Permalink: https://www.togohq.ai/changelog/sdk-node/1.3.0

### Breaking

- `flushIntervalSeconds` (10 to 60, default 10) replaces `flushIntervalMs`. A `flushIntervalMs` passed to `init()` is ignored, with a warning naming the replacement.

### New

- `withFlush(handler)` wraps a serverless handler so the queue is sent after it returns or throws, with its result passed through unchanged.

### Improved

- `batchSize` accepts 100 to 500. A value outside that range is moved into it, with a warning.
- `flush()` retries a network failure or a server error within a 2-second budget before it resolves, and never retries a `429`.

### Migration

Replace `flushIntervalMs` with `flushIntervalSeconds`, and wrap serverless handlers in `withFlush()`.

Before:

```ts
const analytics = init({ writeKey, flushIntervalMs: 10_000 });
```

After:

```ts
const analytics = init({ writeKey, flushIntervalSeconds: 10 });
export const handler = analytics.withFlush(async (event) => {
  analytics.track('order_paid', {}, { userId: event.userId });
});
```

The old form stops working in @togohq/sdk-node 1.3.0.

## @togohq/sdk-node 1.2.0 — This version introduces event ID returns and updates terminology for event definitions

Released November 4, 2026 · Node.js SDK
Permalink: https://www.togohq.ai/changelog/sdk-node/1.2.0

### Breaking

- Terminology updated: "declare" and "contract" are now "define" and "definition" across the SDK, aligning with internal naming conventions.

### New

- `track()`, `identify()`, and `setPersonProperties()` now return the `eventId` of the event they queued, or `undefined` when no event is sent.

### Migration

Update code to use the new terminology for event definitions.

Before:

```js
declareEvent(); // uses 'declare' terminology
```

After:

```js
defineEvent(); // uses 'define' terminology
```

The old form stops working in @togohq/sdk-node 1.2.0.

## @togohq/sdk-node 1.1.0 — This version introduces default properties and fixes an event value handling issue

Released October 29, 2026 · Node.js SDK
Permalink: https://www.togohq.ai/changelog/sdk-node/1.1.0

### New

- `init({ defaultProperties })` now supports default properties, fixed at initialization and stamped on every `track()` call.

### Fixed

- An undefined event value no longer erases a default property, ensuring consistent property handling.

## @togohq/sdk-node 1.0.0 — The first stable release

Released October 24, 2026 · Node.js SDK
Permalink: https://www.togohq.ai/changelog/sdk-node/1.0.0

### Improved

- Semantic versioning. The public API is now stable: from this version on, a breaking change ships only in a new major version.
