List keysets

Retrieves a paginated list of keysets associated with the account.

Query Parameters
page string

Parameter to specify which page to retrieve (default: 1)

Parameter to specify which page to retrieve (default: 1)

limit string

Parameter to specify number of items per page (default: 10)

Parameter to specify number of items per page (default: 10)

Header Parameters
PubNub-Version string REQUIRED

Possible values: [2025-11-15]

Responses
200

Success

Schema OPTIONAL
keysets object[]
name string OPTIONAL

A human-readable name for the keyset.

type string OPTIONAL

Possible values: [testing, production]

The type of the keyset, either "testing" or "production". Testing keysets are used for development and testing purposes and can be affected with stronger rate limits. Upgrading from testing to production keyset requires a paid plan.

appId string

The ID of the app this this keyset belongs to.

id string
publishKey string
subscribeKey string
createdAt string OPTIONAL
updatedAt string OPTIONAL
total number
page number
limit number
400

Bad Request Error

Schema OPTIONAL
statusCode number
error string

Possible values: [BadRequest]

message string[]
401

UnauthorizedError

Schema OPTIONAL
statusCode number
error string

Possible values: [Unauthorized]

message string[]
403

ForbiddenError

Schema OPTIONAL
statusCode number
error string

Possible values: [Forbidden]

message string[]
500

InternalErrorError

Schema OPTIONAL
statusCode number
error string

Possible values: [InternalError]

message string[]
* required
PubNub-Version*
Type: string
Possible values: [2025-11-15]
page
Type: string
Parameter to specify which page to retrieve (default: 1)
limit
Type: string
Parameter to specify number of items per page (default: 10)
keysets
Type: array
Array items:
items
Type: object
total
Type: number
page
Type: number
limit
Type: number
Example Response
{
  "keysets": [
    {
      "name": "Production Keyset",
      "type": "production",
      "appId": "app_123456",
      "id": "keyset_abc123",
      "publishKey": "pub-c-1234567890abcdef",
      "subscribeKey": "sub-c-1234567890abcdef",
      "createdAt": "2025-10-27T12:00:00Z",
      "updatedAt": "2025-10-27T12:00:00Z"
    },
    {
      "name": "Testing Keyset",
      "type": "testing",
      "appId": "app_123456",
      "id": "keyset_def456",
      "publishKey": "pub-c-fedcba0987654321",
      "subscribeKey": "sub-c-fedcba0987654321",
      "createdAt": "2025-10-26T10:30:00Z",
      "updatedAt": "2025-10-26T10:30:00Z"
    }
  ],
  "total": 2,
  "page": 1,
  "limit": 10
}
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"BadRequest"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"Unauthorized"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"Forbidden"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"InternalError"
message
Type: array
Array items:
items
Type: string