Update keyset configuration

Updates the configuration for a specific keyset. This is a partial update - only the provided fields will be updated - other fields will remain unchanged.

Path Parameters
id string REQUIRED
Header Parameters
PubNub-Version string REQUIRED

Possible values: [2025-11-15]

Request Body REQUIRED
accessManager object
enabled boolean

Enable or disable Access Manager

tokenRevoke boolean

Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token

files object
enabled boolean

Enable or disable file sharing

retention number

Possible values: [1, 7, 30, 90, 180, 365, 0]

Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration.

region string

Possible values: [us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1]

The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration.

streamController object
enabled boolean

Enable or disable stream controller

wildcardSubscribe boolean

Allows subscribing to wildcard channels (eg. foo.*)

channelGroupLimit between(1, 2000)

Possible values: 1 ≤ value ≤ 2000

Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100

appContext object
enabled boolean

Enable or disable app context

region string

Possible values: [aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1]

The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1.

userMetadataEvents boolean

Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database.

channelMetadataEvents boolean

Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes.

membershipEvents boolean

Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events.

disallowGetAllChannelMetadata boolean

If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema.

disallowGetAllUserMetadata boolean

If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema.

referentialIntegrity boolean

When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships.

apns object
enabled boolean
teamId string

Apple Push Notification service Team ID, 10 characters long

authKeyId string

Apple Push Notification service Auth Key ID, 10 characters long

filename string

Original filename of the token file. This only serves indentification purposes.

tokenContent string

Token file content as string (private key)

fcm object
filename string

Original filename of the FCM key file. This only serves identification purposes.

keyFile object

FCM API Key file, downloaded from the Firebase Console, JSON format

messagePersistence object
enabled boolean

Enable or disable message persistence

retention number

Possible values: [1, 7, 30, 90, 180, 365, 0]

Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration.

includePresenceEvents boolean

Store presence event messages in message history.

deleteFromHistory boolean

A setting that lets you use API calls to delete specific messages previously stored in a channel's message history.

presence object
announceMax between(0, 100)

Possible values: value ≤ 100

Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting "join", "leave" and "timeout" events.

interval greaterThanOrEqualTo(10)

Possible values: 10 ≤ value

Cadence in seconds between each announcement of the channel occupancy. Must be greater than or equal to 10

deltas boolean

If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message.

generateLeaveOnDisconnect boolean

Triggers a "leave" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events.

streamFiltering boolean

Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID).

activeNoticeChannel string

Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers).

debounce greaterThanOrEqualTo(0)

The number of seconds to wait before allowing implicit "joins" after an explicit "leave". Helps smooth out rapid state changes.

Responses
200

Success

Schema OPTIONAL
accessManager object
enabled boolean

Enable or disable Access Manager

tokenRevoke boolean

Enables token invalidation so it can't access to PubNub resources. Enabling this may introduce some latency in your API calls to check the validity of the token

files object
enabled boolean

Enable or disable file sharing

retention number

Possible values: [1, 7, 30, 90, 180, 365, 0]

Number of days to retain files. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align file retention with your Message Persistence settings to keep messages and files for the same duration.

region string

Possible values: [us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1]

The geographical region where PubNub stores and manages your files. Once a region is set it cannot be changed. Valid values: us-east-1, us-west-1, eu-central-1, ap-south-1, ap-northeast-1. Align file retention with your Message Persistence settings to keep messages and files for the same duration.

streamController object
enabled boolean

Enable or disable stream controller

wildcardSubscribe boolean

Allows subscribing to wildcard channels (eg. foo.*)

channelGroupLimit between(1, 2000)

Possible values: 1 ≤ value ≤ 2000

Channel group limit between 1 and 2000 for paid plans only, free plans have a limit of 100

appContext object
enabled boolean

Enable or disable app context

region string

Possible values: [aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1]

The geographic region where your App Context data is stored and managed. Choose a region close to your users to reduce latency and improve performance. Once a region is set it cannot be changed. Valid values: aws-iad-1, aws-pdx-1, aws-fra-1, aws-bom-1, aws-hnd-1.

userMetadataEvents boolean

Enable or disable user metadata events, which are triggered when user metadata is set or removed in the objects database.

channelMetadataEvents boolean

Enable or disable channel metadata events, which are triggered when channel metadata is set or removed in the objects database. Apps can subscribe and update UI based on channel property changes.

membershipEvents boolean

Enables or disables membership (associations between users and channels) events, which are triggered when memberships are added, updated or removed in the objects database. This helps you manage and respond to who belongs to which channels. Subscribe to receive and handle these events.

disallowGetAllChannelMetadata boolean

If enabled, the “Get All Channel Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all channel metadata without listing it in the token’s permission schema.

disallowGetAllUserMetadata boolean

If enabled, the “Get All User Metadata” call is disallowed. If you enable Access Manager and leave this unchecked, you can get all user metadata without listing it in the token’s permission schema.

referentialIntegrity boolean

When enabled: you can create a membership only if the specified user ID and channel ID exist as standalone metadata entities. Deleting a user or channel automatically deletes its child membership associations. When disabled: you can create memberships even if the user or channel entity doesn’t exist. Deleting a user or channel doesn’t delete associated memberships.

apns object

Connection details for APNs when you use it as a push service provider to deliver push notifications to your application. https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename.

enabled boolean
teamId string

Apple Push Notification service Team ID, 10 characters long

authKeyId string

Apple Push Notification service Auth Key ID, 10 characters long

filename string

Original filename of the token file. This only serves indentification purposes.

fcm object

Connection details for FCM when you use it as a push service provider to deliver push notifications to your application. https://firebase.google.com/docs/cloud-messaging. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename.

filename string

Original filename of the FCM key file. This only serves identification purposes.

messagePersistence object
enabled boolean

Enable or disable message persistence

retention number

Possible values: [1, 7, 30, 90, 180, 365, 0]

Number of days to retain messages. Valid values: 1, 7, 30, 90, 180, 365, or 0 for unlimited. Align message retention with your File Sharing settings to keep messages and files for the same duration.

includePresenceEvents boolean

Store presence event messages in message history.

deleteFromHistory boolean

A setting that lets you use API calls to delete specific messages previously stored in a channel's message history.

presence object
announceMax between(0, 100)

Possible values: value ≤ 100

Maximum number of occupants in a channel before announcements switch to emitting occupancy counts instead of emitting "join", "leave" and "timeout" events.

interval greaterThanOrEqualTo(10)

Possible values: 10 ≤ value

Cadence in seconds between each announcement of the channel occupancy. Must be greater than or equal to 10

deltas boolean

If enabled, adds two fields to invterval event: a list of UUIDs that have joined and left the channel since the last presence interval message.

generateLeaveOnDisconnect boolean

Triggers a "leave" event at the closing of the clients connection (for example, when a browser tab closes or an app is force quit). Generates additional billable events.

streamFiltering boolean

Once enabled, filters presence events at the client. You receive only relevant events on the Presence channel (for example, join events for a specific User ID).

activeNoticeChannel string

Sends notifications when a channel switches between active (has subscribers) and inactive (no subscribers).

debounce greaterThanOrEqualTo(0)

The number of seconds to wait before allowing implicit "joins" after an explicit "leave". Helps smooth out rapid state changes.

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
accessManager
Type: object
files
Type: object
streamController
Type: object
appContext
Type: object
apns
Type: object
fcm
Type: object
messagePersistence
Type: object
presence
Type: object
accessManager
Type: object
files
Type: object
streamController
Type: object
appContext
Type: object
apns
Type: object
Connection details for APNs when you use it as a push service provider to deliver push notifications to your application. https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename.
fcm
Type: object
Connection details for FCM when you use it as a push service provider to deliver push notifications to your application. https://firebase.google.com/docs/cloud-messaging. On the setup, you need to provide the file, you won't be able to retrieve it later from our API. If you need to identify the uploaded configuration, you can use the filename.
messagePersistence
Type: object
presence
Type: object
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