Update keyset name and/or type

Updates a keyset's name and/or type. At least one field must be provided.

Note:

  • Updating a keyset from testing to production requires a paid plan
Path Parameters
id string REQUIRED
Header Parameters
PubNub-Version string REQUIRED

Possible values: [2025-11-15]

Request Body REQUIRED
name string

A human-readable name for the keyset.

type string

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.

Responses
200

Success

Schema OPTIONAL
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
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
undefined
404

NotFoundError

Schema OPTIONAL
statusCode number
error string

Possible values: [NotFound]

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]
* required
id*
Type: string
name
Type: string
A human-readable name for the keyset.
type
Type: string
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.
Enum (2 values)
View all values
"testing""production"
name
Type: string
A human-readable name for the keyset.
type
Type: string
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.
Enum (2 values)
View all values
"testing""production"
appId
Type: string
The ID of the app this this keyset belongs to.
id
Type: string
publishKey
Type: string
subscribeKey
Type: string
createdAt
Type: string
updatedAt
Type: string
Example Response
{
  "name": "My 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"
}
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
"NotFound"
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