Update secret key expiration time
Updates the expiration time of a rotated secret key.
Requirements:
- A paid plan
- Secret key prefix must be in format
sec-c-{5chars}(exactly 5 alphanumeric characters) - Requested secret key must already have an expiration date
- New expiration must be at least 60 seconds in the future
- New expiration must be at most 366 days in the future
| Path Parameters |
|---|
keysetId string — REQUIREDa string to be decoded into a number |
secretKeyPrefix Secret Key Prefix — REQUIREDPossible values: Value must match regular expression prefix in format prefix in format |
| Header Parameters |
|---|
PubNub-Version string — REQUIREDPossible values: [ |
| Request Body — REQUIRED |
|---|
expiresAt date-time — REQUIREDPossible values: Value must match regular expression New expiration timestamp for the secret key in ISO 8601 UTC format (e.g., "2025-12-31T23:59:59Z"). Must be at least 60 seconds in the future and at most 366 days in the future. Must end with "Z" to indicate UTC timezone. |
| Responses | ||||
|---|---|---|---|---|
200Success
| ||||
400Bad Request Error
| ||||
401UnauthorizedError
| ||||
403ForbiddenError
| ||||
404NotFoundError
| ||||
500InternalErrorError
|
PubNub-Version*2025-11-01]keysetId*secretKeyPrefix*sec-c-{5chars}. Don't provide the full secret key.expiresAt*secretKey{
"secretKey": {
"secretKey": "sec-c-xyz789",
"expiresAt": "2026-01-31T23:59:59Z"
}
}statusCodeerrorView all values
"BadRequest"messageitemsstatusCodeerrorView all values
"Unauthorized"messageitemsstatusCodeerrorView all values
"NotFound"messageitemsstatusCodeerrorView all values
"InternalError"messageitems