---
source_url: https://www.pubnub.com/docs/general/setup/limits
title: PubNub API Limits
updated_at: 2026-06-04T11:10:34.736Z
---

> 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


# PubNub API Limits

If abnormal or abusive traffic is detected, PubNub may temporarily apply rate limits to certain APIs on your keyset. [Support](https://support.pubnub.com/hc/en-us) will contact you if this happens.

## Keysets

| Account Tier | Soft Limit | Hard Limit | If hard limited is exceeded? |
| --- | --- | --- | --- |
| Free | 3 | 3 | You can't exceed the limit. Limit of 3 keysets for Free tier accountsEffective February 3, 2025, all Free tier accounts are limited to a maximum of three keysets. If your account exceeds this limit, you must delete existing keysets to create new ones. |
| Starter | unlimited | unlimited | N/A |
| Pro | unlimited | unlimited | N/A |

## Publish

| Function | Soft Limit (Best Practices) | Hard Limit | If hard limited is exceeded |
| --- | --- | --- | --- |
| Publish Rate | Best practice: 10–15 messages/sec per channel., Publishing faster is possible., Slow subscribers may miss messages., Message buffer default: 100 messages per reconnect window (configurable)., Multiplexing uses a single 100‑message buffer across channels., Example: 230 ms reconnect → ~400 msg/sec without loss., Example: 50 ms reconnect → ~2000 msg/sec., Larger buffers (300 or 500) help subscribers keep up., Consider buffer TTL. See Message Buffer Cache., If you wish to change the message queue limit, contact support@pubnub.com. | No throttling for keys in good standing (paid plan present or Free Tier within allowed limits). Use HTTP pipelining for higher throughput. | Free Tier accounts can upgrade for higher usage. For a first overage, we attempt to contact you before taking action. Error message (Channel quota exceeded) |
| # of users (publishers) per channel or keyset | Unlimited | N/A | N/A |
| Message Size | Less than < 30 KB to be safe. Need larger messages?Our platform is optimized for payloads up to 32 KiB. PubNub supports larger messages, but increasing the limit requires a verification of compatibility with your use case.Talk to our team to discuss increasing the message size limit for your use case. | Length of GET request, including HTTP headers & URI encoding overhead (~32 KiB) | HTTP 400 error |
| Channel Name Length | N/A | 2,048 characters | N/A |
| Channel ID Length | N/A | 92 characters | N/A |
| User ID Length | N/A | 92 characters | N/A |
| # of API keys per PubNub account? | Use the [Admin API](https://www.pubnub.com/docs/admin-api) if you need to programmatically manage keysets. | Unlimited | N/A |

## Subscribe

| Function | Soft Limit | Hard Limit | If hard limited is exceeded? |
| --- | --- | --- | --- |
| Subscribe Rate | Soft limit depends on subscriber constraints (buffer, round trips). | No limit Use HTTP Streaming for maximum throughput | N/A |
| # of Channels | Unlimited | N/A | N/A |
| # of Subscribers per channel or keyset | Unlimited | N/A | N/A |
| Message Buffer Cache | Size: 100 message queue. TTL: up to 16 minutes (can be shorter). If disconnect > 8–10 minutes, use Message Persistence. NOTE: Each socket has an in-memory message buffer (FIFO)., It keeps the most recent 100 messages for 12–16 minutes., Publishing over 100 during reconnect can overflow the buffer and drop older messages., For long‑term retrieval, enable Message Persistence (up to 6 months or unlimited) and use its API. | Size: configurable on our end (may add costs). TTL: hard limit 20 minutes. Effective percent 90% → 18 minutes. Currently 80% → 16 minutes. | N/A |
| Catch-Up | 100 messages (or size of buffer cache) | N/A | N/A |
| Channel Name Length | N/A | 2,048 characters | N/A |
| # of Sockets/Instances per client | PubNub does not limit sockets/instances. Devices or platforms often limit TCP connections (some browsers allow ~40). Each PubNub client instance uses two TCP sockets: one for subscribes and one for non‑subscribe operations. | Unlimited | N/A |
| Multiplexing (available without Stream Controller) | 10 to 50 channels When subscribing to many channels, channel groups allows for the persistence of channel lists. | No limit in client SDKs, but we advertise a hard limit of 100 channels. No server side limit, only limited by URI length of 32 KiB. | N/A |
| Channel Groups | Up to 10 [channel groups](https://www.pubnub.com/docs/general/channels/subscribe#channel-groups), each with 100 channels for a total of 1,000 channels. You can [change the limit of channels](https://www.pubnub.com/docs/general/channels/subscribe#channel-groups) in the Admin Portal under your app's keyset configuration. Paid customers can increase the limit to up to 2,000 channels per channel group, for a total of 20,000 channels. | If subscribing to more than 10 channel groups, receive 400 HTTP status code with description Maximum channel registry count exceeded | N/A |
| Wildcard Subscribe | Depends on subscribe rate NOTE: refer to the note for Publish Rate | 3 levels (2 dots) of wildcards: a.*a.b.* No limit to # of channels able to subscribe to in a wildcard subscribe. Wildcard Channel Names aren't allowed in Channel Groups. | N/A |
| Channel Group Name Length | 92 Characters | N/A | N/A |

## File sharing

| Function | Soft Limit | If hard limited is exceeded? |
| --- | --- | --- |
| File Size | 5 MB | Contact us at [support@pubnub.com](https://www.pubnub.com/docs/mailto:support@pubnub.com) to increase the file size limit. |
| File Retention | 1, 3, 7, 15, or 30 days, or Unlimited | N/A |

## Presence

| Function | Soft Limit | Hard Limit |
| --- | --- | --- |
| Heartbeat | Minimum: 1 minute heartbeat & 29 second interval | Minimum: heartbeat:10; interval: 4 (lowest common denominator across 3.x SDKs; each have different hard limits) 4.x SDKs do not currently have limitations. |
| Presence Announce Max | 100 | We can adjust this limit, but there are considerations |
| Webhook Retries | Presence webhooks will try to POST to your URL endpoint for a maximum of 4 times, each with a 5s timeout; Ensure that the customer's server (REST endpoint) returns 200 NOTE: If a channel has reached the Presence Announce Max limit, we will not send webhook requests for that channel | If webhook has reached maximum number of retries, the request is lost. |

## Message Persistence

| Function | Soft Limit | Hard Limit |
| --- | --- | --- |
| Data Retention | 1 day, 7 days, 30 days, 3 months, 6 months, 1 year, or Unlimited | 7 days for Free tier customers |
| Maximum # of channels with message count | 100 channels per a single API call | N/A |

## Message Actions

| Item | Hard Limit | Notes |
| --- | --- | --- |
| Request size | 32 KiB | Standard API limit for the request path or body, same as all PubNub APIs. |
| `type` | No specific limit | Bounded by the overall 32 KiB request size. |
| `value` | No specific limit | Bounded by the overall 32 KiB request size. |

## App Context

| Item | Soft Limit | Notes |
| --- | --- | --- |
| Size of a record | 32 KiB | Maximum size of a user or channel metadata stored in the database, including custom fields. |
| Max user metadata records | 1 million | Recommended maximum number of user metadata records using App Context API. |
| Max channel metadata records | 1 million | Recommended maximum number of channel metadata records using App Context API. |
| Members added in a channel | 5,000 | Recommended maximum number of members per channel using App Context API. |
| Memberships per user | 50,000 | Recommended maximum number of memberships per user using App Context API. |
| Members per transaction request | 20 | Maximum number of members added or removed in a single call using App Context API. |

| Endpoint | Item | Hard Limit | Notes |
| --- | --- | --- | --- |
| Set user metadata | `name` | 2,048 characters | Maximum length of the name asigned to the User ID. |
| Set user metadata | `externalId` | 2,048 characters | Maximum length of the user's identifier in an external system that you want to refer to. |
| Set user metadata | `profileUrl` | 2,048 characters | Maximum length of the URL to an image that can be used to visually represent the user. |
| Set user metadata | `email` | 320 characters | Maximum length of the user' email address. |
| Set user metadata | `type` | 50 characters | Maximum length of the tag that lets you categorize a user by their functional role. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set user metadata | `status` | 50 characters | Maximum length of the tag that lets you categorize a user by their current state. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set user metadata | `custom` | `9007199254740991` | If you set `custom` fields with integer values, do not specify numbers larger than `9007199254740991` due to [precision limitations](https://262.ecma-international.org/15.0/index.html?_gl=1*1r821ae*_ga*NjA2NTAwNjA2LjE3MjM2NTY0MDk.*_ga_TDCK4DWEPP*MTcyMzY1NjQwOC4xLjEuMTcyMzY1NzYzMy4wLjAuMA..#sec-number.max_safe_integer) in JSON implementations. For large integer values, for example PubNub timetoken values, use string values instead of integers. |
| Set channel metadata | `description` | 2,048 characters | Maximum length of additional channel information. |
| Set channel metadata | `type` | 50 characters | Maximum length of the tag that lets you categorize a channel by its functional role. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel metadata | `status` | 50 characters | Maximum length of the tag that lets you categorize a channel by its current state. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel metadata | `custom` | `9007199254740991` | If you set `custom` fields with integer values, do not specify numbers larger than `9007199254740991` due to [precision limitations](https://262.ecma-international.org/15.0/index.html?_gl=1*1r821ae*_ga*NjA2NTAwNjA2LjE3MjM2NTY0MDk.*_ga_TDCK4DWEPP*MTcyMzY1NjQwOC4xLjEuMTcyMzY1NzYzMy4wLjAuMA..#sec-number.max_safe_integer) in JSON implementations. For large integer values, for example PubNub timetoken values, use string values instead of integers. |
| Set channel membership metadata | `type` | 50 characters | Maximum length of the tag that lets you categorize a membership by its functional role. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel membership metadata | `status` | 50 characters | Maximum length of the tag that lets you categorize a membership by its current state. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel membership metadata | `custom` | `9007199254740991` | If you set `custom` fields with integer values, do not specify numbers larger than `9007199254740991` due to [precision limitations](https://262.ecma-international.org/15.0/index.html?_gl=1*1r821ae*_ga*NjA2NTAwNjA2LjE3MjM2NTY0MDk.*_ga_TDCK4DWEPP*MTcyMzY1NjQwOC4xLjEuMTcyMzY1NzYzMy4wLjAuMA..#sec-number.max_safe_integer) in JSON implementations. For large integer values, for example PubNub timetoken values, use string values instead of integers. |
| Set channel members' metadata | `type` | 50 characters | Maximum length of the tag that lets you categorize a channel member by their functional role. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel members' metadata | `status` | 50 characters | Maximum length of the tag that lets you categorize a channel member by their current state. Limited to alphanumeric characters (0-9, a-z, A-Z) and the period/dot character (.). |
| Set channel members' metadata | `custom` | `9007199254740991` | If you set `custom` fields with integer values, do not specify numbers larger than `9007199254740991` due to [precision limitations](https://262.ecma-international.org/15.0/index.html?_gl=1*1r821ae*_ga*NjA2NTAwNjA2LjE3MjM2NTY0MDk.*_ga_TDCK4DWEPP*MTcyMzY1NjQwOC4xLjEuMTcyMzY1NzYzMy4wLjAuMA..#sec-number.max_safe_integer) in JSON implementations. For large integer values, for example PubNub timetoken values, use string values instead of integers. |

## Mobile push

| Function | Soft Limit |
| --- | --- |
| # of Push Certificates | 1 APNs certificate & 1 FCM key per PubNub Key Set |
| Push Notification Message Size | Maximum: 2 kB for APNs, 4 kB for FCM |

## Access Manager

| Function | Soft Limit | Hard Limit |
| --- | --- | --- |
| # of Tokens | No limits | N/A |
| Grant latency | Server to server (grant by server for server usage), give it 1 second between grant and usage Separate process (server grant, client usage), wait for grant callback before returning to client | N/A |
| Channels per grant | 200 | N/A |

## Functions

| Activity | Soft Limit | Hard Limit |
| --- | --- | --- |
| Number of Modules/Functions | 10 modules per key | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| Number of Outbound Calls | 10 requests per request type in a function execution (request types include PubNub API, `xhr`, and `KVStore` calls) | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| Rate Limit for Outbound Calls | 100 total requests / second (include PubNub API, `xhr` and `KVStore` calls) | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| Execution Recursion Limit | Depth = 3, meaning how many recursions but also how many Function Types chaining | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| CPU Wall Time | 10 seconds | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| KV Store Get Keys Limit for single call | 100 Keys | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| KV Store Byte Size Limit for Keys | 1KB | 1KB |
| KV Store Byte Size Limit for Values | 32 KiB | 32 KiB |
| KV Store TTL | 1 day (default) | 1 year (maximum) |
| Max Interval for Interval Functions | 1 hour | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |
| Number of console debug/error messages | 250 messages | If you'd like a larger limit, contact [support](https://www.pubnub.com/docs/mailto:support@pubnub.com). |

## Events & Actions

| Item | Free | Intro | Tier 1 | Tier 2 | Tier 3 | Tier 4 | Tier 5 | Tier 6 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Max events ingested | 10K | 2M | 4M | 25M | 66M | 200M | 500M | Unlimited |
| Listeners | 1 | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited |
| Actions per listener | 1 | 3 | 3 | 3 | 3 | 3 | Unlimited | Unlimited |

## Service Integrations and API Keys

| Item | Soft Limit | Hard Limit |
| --- | --- | --- |
| Max API keys per Service Integration | N/A | 3 |
| Max TTL for API key | N/A | 1 year |
| Max number of Service Integrations per account | N/A | Unlimited |

## 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.
