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 — REQUIREDPossible values: [ |
| Request Body — REQUIRED |
|---|
name stringA human-readable name for the keyset. |
type stringPossible values: [ 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 | |||||||||
|---|---|---|---|---|---|---|---|---|---|
200Success
| |||||||||
400Bad Request Error
| |||||||||
401UnauthorizedError
| |||||||||
403ForbiddenError
| |||||||||
404NotFoundError
| |||||||||
500InternalErrorError
|
PubNub-Version*2025-11-15]id*nametypeView all values
"testing""production"nametypeView all values
"testing""production"appIdidpublishKeysubscribeKeycreatedAtupdatedAt{
"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"
}statusCodeerrorView all values
"BadRequest"messageitemsstatusCodeerrorView all values
"Unauthorized"messageitemsstatusCodeerrorView all values
"NotFound"messageitemsstatusCodeerrorView all values
"InternalError"messageitems