---
source_url: https://www.pubnub.com/docs/general/setup/data-persistence
title: Data Persistence
updated_at: 2026-06-11T11:35:05.986Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Data Persistence

Enabled features and your app's keyset in the [Admin Portal](https://admin.pubnub.com) control what the PubNub platform stores. PubNub persists only the data you choose and bills for that storage.

:::note Data replication
PubNub replicates data across points of presence (PoPs) for low retrieval latency. Metadata and File Sharing are stored in a single region.
:::

## Messages

PubNub may store [message](https://www.pubnub.com/docs/general/messages/publish) and [message actions](https://www.pubnub.com/docs/general/messages/actions) data.

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | publish(), addMessageAction() |
| Data persistence configuration | Enable/disable Message Persistence in Admin Portal, Change retention in Admin Portal (1 day, 7 days, 30 days, 3 months, 6 months, 1 year, or Unlimited)., Call the deleteMessages() or removeMessageAction() methods., Use the storeInHistory or ttl parameters of the publish() method., Contact support@pubnub.com to remove old data or change existing keysets' retention period. |

## Permissions

Access Manager v2 stores the mapping of authorization keys with its permission sets. Access Manager v3 stores only the tokens that are [revoked](https://www.pubnub.com/docs/general/security/access-control#revoke-permissions).

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | v2 grant(), v3 revokeToken() |
| Data persistence configuration | Enable/disable Access Manager in Admin Portal, v3 - Enable/disable revoke for Access Manager v3 in Admin Portal, v2 - Remove permissions on a resource with the v2 grant() method., Contact support@pubnub.com to remove your Access Manager data. |

:::note Access Manager v3 tokens
Active tokens obtained by the [v3 grantToken()](https://www.pubnub.com/docs/sdks/javascript/api-reference/access-manager#grant-token) method are not persisted.
:::

## Metadata

PubNub stores metadata about your application's [users](https://www.pubnub.com/docs/general/metadata/users-metadata) and [channels](https://www.pubnub.com/docs/general/metadata/channel-metadata), and their [membership](https://www.pubnub.com/docs/general/metadata/membership-metadata) associations.

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | setUserMetadata(), setChannelMetadata(), setChannelMemberships(), setChannelMembers() |
| Data persistence configuration | removeUserMetadata(), removeChannelMetadata(), removeChannelMemberships(), removeChannelMembers() |

## K/V store

PubNub stores [Functions](https://www.pubnub.com/docs/serverless/functions/overview) as key-value pairs.

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | set(), setitem() |
| Data persistence configuration | Set time to live (TTL) |

## Channel groups

PubNub stores [channel groups](https://www.pubnub.com/docs/general/channels/subscribe#channel-groups) as key-value pairs.

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | addChannels() |
| Data persistence configuration | removeChannels(), deleteGroup(), Contact support@pubnub.com to remove all channel group data. |

## Push

PubNub stores the associations between [mobile device tokens and PubNub channel names](https://www.pubnub.com/docs/general/push/send).

| Item | Description |
| --- | --- |
| Price | $8/GB/month |
| API calls that persist data | addChannels() |
| Data persistence configuration | removeChannels(), deleteDevice(), Contact support@pubnub.com to remove all registered devices. |

## File sharing

PubNub stores previously uploaded [files](https://www.pubnub.com/docs/general/files).

| Item | Description |
| --- | --- |
| Price | No additional charge |
| API calls that persist data | sendFile() |
| Data persistence configuration | deleteFile(), Contact support@pubnub.com to remove all files. |

For more details on pricing models, refer to the [Pricing](https://www.pubnub.com/pricing/) page.

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.
