Transaction Classification

What are replicated transactions?

Replicated Transactions are API calls to the PubNub network that result in replication of data to other Points of Presence (PoPs). For example, Publish messages, Access tokens and rules, and Storage writes are replicated to other POPs.

Please refer to the table below for a list of all replicated transactions. Keep in mind, 2048 bytes is the billing unit for all payloads; for example, a single API call to publish an 8 KB message will count as 4 transactions (body_bytes / 2048 = number of transactions). Also note that the actual function/method name may differ depending on the SDK used. Sample method names where used below are taken from the Java SDK.

Operation Description Response Code
Set State Returns the uuid's state for the given channel(s) and/or channel group(s). 2xx (OK)
Presence Publishes (Join/Leave/Timeout/State Changes/Interval Events) Presence events that PubNub publishes when Presence is enabled. 2xx (OK)
Operation Description Response Code
Adding Device to Channel Enables push notifications on the provided set of channels for the given device id. 2xx (OK)
Removing Device From Channels Disables push notifications on the provided set of channels for the given device id. 2xx (OK)
Remove all push notifications Disables push notifications on every channel enabled for the given device id. 2xx (OK)
Operation Description Response Code
Adding Channels Adds channels to a channel group. 2xx (OK)
Removing Channels Removes channels from a channel group. 2xx (OK)
Deleting Channel Group Deletes a channel group. 2xx (OK)
Operation Description Response Code
Publish Publishes a message to a channel. 2xx (OK)
Misfire (Client and Functions Event Handlers) Calling Fire to an Event Handler that is turned off. 2xx (OK)
Operation Description Response Code
Revoke Revoking acces permissions for channels or channel groups.* 2xx (OK)
Grant Granting access permissions for channels or channel groups. 2xx (OK)

* This is equivalent to calling grant with the read and/or write parameter set to false. some SDKs have an explicit revoke function.

Operation Description Response Code
set / setItem Sets the value for a given key, and/or a TTL for the specified value. Not Applicable
removeItem Removes the stored value for the given key. Not Applicable
incrCounter Increments the counter for the given key. Not Applicable
Operation Description Response Code
Object Writes Create, update or delete objects. 2xx (OK)
Object Publishes Events that PubNub publishes when objects are modified. 2xx (OK)
Operation Description Response Code
Files Publish Message publish with message type Files. 2xx (OK)
What are edge transactions?

Edge Transactions are API calls to the PubNub Network that only affect a single region, such as a Subscribe call, a read from Storage, Mobile Push service, etc.

Please refer to the table below for a list of all edge transactions. Keep in mind, 2048 bytes is the billing unit for all payloads; for example, a subscribe or history API call response containing 4KB of messages will count as 2 transactions (body_bytes / 2048 = number of transactions). Also note that the actual function/method name may differ depending on the SDK used. Sample method names where used below are taken from the Java SDK.

Operation Description Response Code
Presence Presence client disconnects: Presence request terminated by client causing disconnection from PubNub due to network changes. /
Presence client errors: Presence request failed due to error on client side.
499 / 4xx (except 499s and 403s)
Presence client errors: Presence request failed due to error on client side. 4xx (except 499s and 403s)
Where Now Returns all channels a given uuid is subscribed to. 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
PubNub Leave Fired when a user unsubscribes to the channel.* 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Get State Returns the uuid's state for the given channel(s) and/or channel group(s). 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Set State Returns the uuid's state for the given channel(s) and/or channel group(s). 4xx (BAD REQUEST)
Here Now Returns the occupancy state of the given channel(s) and/or channel group(s). 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Global Here Now Returns the occupancy state for all channels. 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Heartbeats Heartbeat pings sent from client to server (for determining if a user has timed out or not). 2xx (OK) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Presence Webhooks/Callback (Active/Inactive/Join/Leave/Timeout/State Change) The HTTP callback that is triggered by PubNub to the URI configured by the User. User Defined

* These are presence generated messages, published to the presence channel when the event occurs.

Operation Description Response Code
Adding Device to Channel Adding Device to Channel request failed due to an error on the client side. 4xx (BAD REQUEST)
Removing Device From Channels Removing Device from Channel request failed due to an error on the client side. 4xx (BAD REQUEST)
Listing Channels For Device Returns all channels on which push notifications are enabled for the given device id. /
Listing Channels for Device failed due to an error on the client side.
2xx (OK) / 4xx (BAD REQUEST)
Listing Channels for Device failed due to an error on the client side. 4xx (BAD REQUEST)
Remove all push notifications Removing all push notifications request failed due to an error on the client side. 4xx (BAD REQUEST)
Push notifications Publish messages to GCM/FCM, APNS, MPNS. /
Push notifications failed due to an error on the client side.
2xx (OK) / 4xx (BAD REQUEST)
Push notifications failed due to an error on the client side. 4xx (BAD REQUEST)
Push Webhooks/Callback for Device Removed The HTTP Callback that is triggered when a device is removed. User Defined
Operation Description Response Code
Adding Channels Adding Channels request failed due to an error on the client side. 4xx (BAD REQUEST)
Removing Channels Removing Channels request failed due to an error on the client side. 4xx (BAD REQUEST)
Listing Channels Lists all channels in the given channel group. /
Listing Channels in a Channel group failed due to an error on the client side.
2xx (OK) / 4xx (BAD REQUEST)
Listing Channels in a Channel group failed due to an error on the client side. 4xx (BAD REQUEST)
Deleting Channel Group Deleting Channel Group request failed due to an error on the client side. 4xx (BAD REQUEST)
Operation Description Response Code
Publish Publish unauthorized: Publish request failed as client does not have the permission to write to that channel, or prior permissions have expired. /
Publish client disconnects: Publish request terminated by client causing disconnection from PubNub due to network changes. /
Publish client errors: Publish request failed due to error on client side, like message too big etc.
403 / 499 / 4xx (except 499s and 403s)
Publish client disconnects: Publish request terminated by client causing disconnection from PubNub due to network changes. 499
Publish client errors: Publish request failed due to error on client side, like message too big etc. 4xx (except 499s and 403s)
Fire (Client and Functions) Publishing a message to an Event Handler only (for no subscribers to receive). 403 (UNAUTHORIZED) / 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Store in History Store the messages as they are published, and retrieve them at a later time. 4xx (BAD REQUEST)
Operation Description Response Code
Subscribe Subscribes to the given channel(s) and/or channel group(s).
The number of transactions is counted as the payload received upon subscribing to channels, divided into 2KB buckets. /
Subscribe unauthorized: Subscribe request failed as client does not have the permission to read from that channel, or prior permissions have expired. /
Subscribe client disconnects: Subscribe request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. /
Subscribe client errors
2xx (OK) / 403 / 499 / 4xx (except 499s and 403s)
Subscribe unauthorized: Subscribe request failed as client does not have the permission to read from that channel, or prior permissions have expired. 403
Subscribe client disconnects: Subscribe request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. 499
Subscribe client errors 4xx (except 499s and 403s)
Subscribe init Devices initiating connections to the PubNub network. 2xx (OK)
Subscribe active loop Client actively maintaining the connection to PubNub ensuring real-time message delivery. 2xx (OK)
Operation Description Response Code
History Retrieves historical messages of the given channel. /
History unauthorized: History request failed as client does not have the permission to read from that channel, or prior permissions have expired. /
History client disconnects: History request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. /
History client errors.
2xx (OK) / 403 / 499 / 4xx (except 499s and 403s)
History unauthorized: History request failed as client does not have the permission to read from that channel, or prior permissions have expired. 403
History client disconnects: History request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. 499
History client errors 4xx (except 499s and 403s)
Webhook/Callback Delete from History The HTTP Callback URL that will be triggered after a request to delete messages from history has completed. User Defined
Operation Description Response Code
Revoke Revoke request failed due to an error on the client side.* 4xx (BAD REQUEST)
Grant Grant request failed due to an error on the client side. 4xx (BAD REQUEST)

* This is equivalent to calling grant with the read and/or write parameter set to false. some SDKs have an explicit revoke function.

Operation Description Response Code
get / getItem Retrieves the value for a given key. Not Applicable
getCounter Retrieves the counter value for a given key. Not Applicable
Operation Description Response Code
XHR request/response The XHR module request/response payload. Not Applicable
Operation Description Response Code
Object Reads Get an object or list of objects. 2xx (OK)
Object Subscribes Events received via a subscribe when objects are modified. 2xx (OK)
Object unauthorized Object request failed as client does not have the permission on the resource, or prior permissions have expired. 403
Object client errors Object request failed due to error on client side, such as message too big, etc. 4xx
Operation Description Response Code
Files Unauthorized Files unauthorized: Files request failed as client does not have the permission to write to that channel, or prior permissions have expired. 403
Files Client Errors Files client errors: Files request failed due to error on client side, like message too big etc. 4xx (except 403s)
Generate File URL/
Get File /
List Files /
Delete File /
Files Subscribes
Generate a URL for the file location that will be displayed to the client./
Call to fetch individual file. /
Call to list all files. /
Delete Files from storage. /
Subscribe messages with message type Files.
2xx (OK)
Get File Call to fetch individual file.
List Files Call to list all files.
Delete File Delete Files from storage.
Files Subscribes Subscribe messages with message type Files.
What are Signal Transactions?

A PubNub signal transaction is part of a high-volume stream of payloads (each up to 64 bytes) intended to inform or instruct an application, without including information that would be directly reflected in an application UI (such as rideshare driver lat/long measurements, a command to switch on a chat app typing indicator, an update from an IoT device, etc.).

Please refer to the table below for a list of all signal transactions. Keep in mind, 2048 bytes is the billing unit for all payloads; for example, a subscribe API call response containing 3000 bytes of payload will count as 2 signal transactions (body_bytes / 2048 = number of transactions). Also note that the actual function/method name may differ depending on the SDK used. Sample method names where used below are taken from the Java SDK.

Operation Description Response Code
Signal Publish a signal to a channel. /
Publish unauthorized: Publish request failed as client does not have the permission to write to that channel, or prior permissions have expired. /
Publish client disconnects: Publish request terminated by client causing disconnection from PubNub due to network changes. /
Publish client errors: Publish request failed due to error on client side, like message too big etc.
2xx (OK) / 403/ 499 / 4xx (except 499s and 403s)
Publish unauthorized: Publish request failed as client does not have the permission to write to that channel, or prior permissions have expired. 403
Publish client disconnects: Publish request terminated by client causing disconnection from PubNub due to network changes. 499
Publish client errors: Publish request failed due to error on client side, like message too big etc. 4xx (except 499s and 403s)
Operation Description Response Code
Subscribe that includes Signals Subscribes to the given channel(s) and/or channel group(s) where the body has one or more messages of type signal. 2xx (OK)
What are function executions?

PubNub Functions enable the creation and execution of business logic on messages at the edge of the network. All Function Types execute when triggered by API calls / HTTP requests.

Operation Description Response Code
Function executions Functions executions are counted for each execution of a PubNub Function. Not Applicable

Message Action Transactions are API calls to the PubNub Network that intend to associate data to past messages to support features like Delivery/Read Receipts, Reactions, etc.

Please refer to the table below for a list of all message action transactions. Keep in mind, 2048 bytes is the billing unit for all response payloads; for example, a get message action API call response containing 4KB of data will count as 2 transactions (body_bytes / 2048 = number of transactions).

Also note that the actual function/method name may differ depending on the SDK used. Sample method names where used below are taken from the Java SDK.

Operation Description Response Code
Add Message Action Add action on a message. 2xx (OK)
Remove Message Action Remove an existing action on a message. 2xx (OK)
Get Message Actions Retrieves message actions of the given channel. 2xx (OK)
Errors Message Action unauthorized: request failed as client does not have the permission to access that channel, or prior permissions have expired. /
Message Action client disconnects: request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. /
Message Action client errors: request failed due to error on client side.
403 / 499 4xx (except 499s and 403s)
Message Action client disconnects: request terminated by client causing disconnection from PubNub due to network changes or channel subscription changes. 499
Message Action client errors: request failed due to error on client side. 4xx (except 499s and 403s)
Operation Description Response Code
Subscribe that includes Message Actions Subscribes to the given channel(s) and/or channel group(s) where the body has one or more messages of type "message action".
The number of message action transactions is counted as the payload received upon subscribing to channels, divided into 2048B buckets.
2xx (OK)
What transactions are free?
Operation Description Response Code
Fire (Client and Functions) Publishing a message to an Event Handler only (for no subscribers to receive). 2xx (OK)
Operation Description Response Code
PN configuration methods Any function that configures the local PubNub object settings. Not Applicable
Time Returns a 17 digit precision Unix epoch. 2xx (OK)