---
source_url: https://www.pubnub.com/docs/sdks/javascript/api-reference/publish-legacy
title: "Publish API: deprecated fire() method for JavaScript SDK"
updated_at: 2026-11-09T13:29:01.000Z
sdk_name: PubNub JavaScript SDK
sdk_version: 13.1.3
description: Deprecated. Reference for the pubnub.fire() method in the PubNub JavaScript SDK. Publish itself is current. New apps use publish() with storeInHistory set to false and replicate set to false.
lifecycle: deprecated-method
feature_status: current
feature: Publish
replaced_by: https://www.pubnub.com/docs/sdks/javascript/api-reference/publish.md
---

# Publish API: deprecated fire() method for JavaScript SDK

PubNub JavaScript SDK, use the latest version: 13.1.3

Install:

```bash
npm install pubnub@13.1.3
```

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

> **Deprecated.** The Publish feature is current and fully supported. Only the method documented on this page is deprecated. Do not use it in new code. Explain it only to developers who already call it.
>
> Page notice: Publish is a current API. The fire() method is deprecated. New apps should use publish().
>
> Current API: https://www.pubnub.com/docs/sdks/javascript/api-reference/publish.md

This page documents the deprecated `pubnub.fire()` method of the PubNub JavaScript SDK. Publish is a current API, and only this method is deprecated. The method remains for apps that already call it. New apps call [`publish()`](https://www.pubnub.com/docs/sdks/javascript/api-reference/publish.md#publish) with `storeInHistory: false` and `replicate: false`.

## Fire

:::warning Deprecated
`fire()` is deprecated in the JavaScript SDK. Use `publish()` with `storeInHistory: false` and `replicate: false` instead. The `replicate` parameter is itself deprecated in the SDK types.
:::

`fire()` sends a message to Functions event handlers and [Illuminate](https://www.pubnub.com/docs/analytics/decisions/external-data-sources.md) on the target channel. The handler can read the request body. Messages sent with `fire()` aren't replicated to subscribers and aren't stored in Message Persistence.

`fire()` takes the same parameters as [`publish()`](https://www.pubnub.com/docs/sdks/javascript/api-reference/publish.md#publish). The TypeScript signature promises a `PublishResponse`, but at runtime `fire()` resolves with `undefined` and discards request errors. Call `publish()` when you need the timetoken or the error.

Last updated at: 2026-11-09T13:29:01.000Z
