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.

OperationDescriptionResponse Code
Set StateReturns 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)
OperationDescriptionResponse Code
Adding Device to ChannelEnables push notifications on the provided set of channels for the given device id.2xx (OK)
Removing Device From ChannelsDisables push notifications on the provided set of channels for the given device id.2xx (OK)
Remove all push notificationsDisables push notifications on every channel enabled for the given device id.2xx (OK)
OperationDescriptionResponse Code
Adding ChannelsAdds channels to a channel group.2xx (OK)
Removing ChannelsRemoves channels from a channel group.2xx (OK)
Deleting Channel GroupDeletes a channel group.2xx (OK)
OperationDescriptionResponse Code
PublishPublishes 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)
OperationDescriptionResponse Code
RevokeRevoking acces permissions for channels or channel groups.*2xx (OK)
GrantGranting 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.

OperationDescriptionResponse Code
set / setItemSets the value for a given key, and/or a TTL for the specified value.Not Applicable
removeItemRemoves the stored value for the given key.Not Applicable
incrCounterIncrements the counter for the given key.Not Applicable
OperationDescriptionResponse Code
Object WritesCreate, update or delete objects.2xx (OK)
Object PublishesEvents that PubNub publishes when objects are modified.2xx (OK)
OperationDescriptionResponse Code
Files PublishMessage 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.

OperationDescriptionResponse Code
PresencePresence 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 NowReturns all channels a given uuid is subscribed to.2xx (OK)/ 4xx (BAD REQUEST)
4xx (BAD REQUEST)
PubNub LeaveFired when a user unsubscribes to the channel.*2xx (OK)/ 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Get StateReturns the uuid's state for the given channel(s) and/or channel group(s).2xx (OK)/ 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Set StateReturns the uuid's state for the given channel(s) and/or channel group(s).4xx (BAD REQUEST)
Here NowReturns the occupancy state of the given channel(s) and/or channel group(s).2xx (OK)/ 4xx (BAD REQUEST)
4xx (BAD REQUEST)
Global Here NowReturns the occupancy state for all channels.2xx (OK)/ 4xx (BAD REQUEST)
4xx (BAD REQUEST)
HeartbeatsHeartbeat 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.

OperationDescriptionResponse Code
Adding Device to ChannelAdding Device to Channel request failed due to an error on the client side.4xx (BAD REQUEST)
Removing Device From ChannelsRemoving Device from Channel request failed due to an error on the client side.4xx (BAD REQUEST)
Listing Channels For DeviceReturns 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 notificationsRemoving all push notifications request failed due to an error on the client side.4xx (BAD REQUEST)
Push notificationsPublish 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 RemovedThe HTTP Callback that is triggered when a device is removed.User Defined
OperationDescriptionResponse Code
Adding ChannelsAdding Channels request failed due to an error on the client side.4xx (BAD REQUEST)
Removing ChannelsRemoving Channels request failed due to an error on the client side.4xx (BAD REQUEST)
Listing ChannelsLists 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 GroupDeleting Channel Group request failed due to an error on the client side.4xx (BAD REQUEST)
OperationDescriptionResponse Code
PublishPublish 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 HistoryStore the messages as they are published, and retrieve them at a later time.4xx (BAD REQUEST)
OperationDescriptionResponse Code
SubscribeSubscribes 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 errors4xx (except 499s and 403s)
Subscribe initDevices initiating connections to the PubNub network.2xx (OK)
Subscribe active loopClient actively maintaining the connection to PubNub ensuring real-time message delivery.2xx (OK)
OperationDescriptionResponse Code
HistoryRetrieves 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 errors4xx (except 499s and 403s)
Webhook/Callback Delete from HistoryThe HTTP Callback URL that will be triggered after a request to delete messages from history has completed.User Defined
OperationDescriptionResponse Code
RevokeRevoke request failed due to an error on the client side.*4xx (BAD REQUEST)
GrantGrant 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.

OperationDescriptionResponse Code
get / getItemRetrieves the value for a given key.Not Applicable
getCounterRetrieves the counter value for a given key.Not Applicable
OperationDescriptionResponse Code
XHR request/responseThe XHR module request/response payload.Not Applicable
OperationDescriptionResponse Code
Object ReadsGet an object or list of objects.2xx (OK)
Object SubscribesEvents received via a subscribe when objects are modified.2xx (OK)
Object unauthorizedObject request failed as client does not have the permission on the resource, or prior permissions have expired.403
Object client errorsObject request failed due to error on client side, such as message too big, etc.4xx
OperationDescriptionResponse Code
Files UnauthorizedFiles unauthorized: Files request failed as client does not have the permission to write to that channel, or prior permissions have expired.403
Files Client ErrorsFiles 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 FileCall to fetch individual file.
List FilesCall to list all files.
Delete FileDelete Files from storage.
Files SubscribesSubscribe 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.

OperationDescriptionResponse Code
SignalPublish 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)
OperationDescriptionResponse Code
Subscribe that includes SignalsSubscribes 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.

OperationDescriptionResponse Code
Function executionsFunctions 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.

OperationDescriptionResponse Code
Add Message ActionAdd action on a message.2xx (OK)
Remove Message ActionRemove an existing action on a message.2xx (OK)
Get Message ActionsRetrieves message actions of the given channel.2xx (OK)
ErrorsMessage 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)
OperationDescriptionResponse Code
Subscribe that includes Message ActionsSubscribes 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?
OperationDescriptionResponse Code
Fire (Client and Functions)Publishing a message to an Event Handler only (for no subscribers to receive).2xx (OK)
OperationDescriptionResponse Code
PN configuration methodsAny function that configures the local PubNub object settings.Not Applicable
TimeReturns a 17 digit precision Unix epoch.2xx (OK)