---
title: "Update Subscription"
method: PUT
path: "/restapi/v1.0/subscription/{subscriptionId}"
tags: ["Subscriptions"]
---

# Update Subscription

`PUT /restapi/v1.0/subscription/{subscriptionId}`

Updates the existing subscription. The client application can extend or narrow
the list of events for which it receives notifications within the current subscription.
If event filters are specified, calling this method modifies them for the
existing subscription. The method also allows one to set an expiration time for the
subscription itself.

If parameters other than `events` and `expiresIn` are specified in the request they will be ignored.
If the request body is empty then the specified subscription will be renewed without any
event filter modifications and using the default expiration time.

If the request is sent with empty body, it just renews a subscription
(so it is an equivalent of the `POST /restapi/v1.0/subscription/{subscriptionId}/renew`).

Please note that `WebSocket` subscriptions cannot be updated via HTTP interface.

## Path parameters

- `subscriptionId` string, required

## Request body

- UpdateSubscriptionRequest
  - `eventFilters` string[], required — The list of event filters corresponding to events the user is subscribed to
  - `expiresIn` integer — Subscription lifetime in seconds. The maximum subscription lifetime depends upon the specified `transportType`: | Transport type | Maximum permitted lifetime | | ------------------- | ------------------------------ | | `WebHook` | 315360000 seconds (10 years) | | `RC/APNS`, `RC/GSM` | 7776000 seconds (90 days) | | `PubNub` | 900 seconds (15 minutes) | | `WebSocket` | n/a (the parameter is ignored) |

## Response `200`

Successful response

- SubscriptionInfo
  - `uri` string, uri, required — Canonical URI of a subscription resource
  - `id` string, required — Internal identifier of a subscription
  - `eventFilters` string[], required — The list of event filter names corresponding to events the user is subscribed to
  - `disabledFilters` DisabledFilterInfo[] — The list of event filter names corresponding to events the user is not subscribed to due to certain limitations
    - `filter` string, required — Event filter that is disabled for the user
    - `reason` string, required — Reason why the filter is disabled for the user
    - `message` string — Error message
  - `expirationTime` string, date-time, required — Subscription expiration time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
  - `expiresIn` integer — Subscription lifetime in seconds
  - `status` 'Active' | 'Blacklisted', required — Subscription status
  - `creationTime` string, date-time, required — Subscription creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534*
  - `deliveryMode` union, required — Notification delivery transport information
    - WebhookDeliveryMode
      - `transportType` 'WebHook', required — The transport type for this subscription, or the channel by which an app should be notified of an event
      - `address` string, uri, required — The URL to which notifications should be delivered. This is only applicable for the `WebHook` transport type, for which it is a required field.
      - `encryption` false, required — Specifies if notification messages will be encrypted or not.
    - MobileDeliveryMode
      - `transportType` 'RC/APNS' | 'RC/GCM', required — The transport type for this subscription, or the channel by which an app should be notified of an event
      - `certificateName` string, required — Certificate name for mobile notification transports
      - `registrationId` string, required — Device instance ID for mobile notification transports
      - `encryption` false, required — Specifies if notification messages will be encrypted or not.
    - PubNubDeliveryMode
      - `transportType` 'PubNub', required — The transport type for this subscription, or the channel by which an app should be notified of an event
      - `encryption` boolean, required — Optional. Specifies if notification messages will be encrypted or not. Please note that for some event filters (e.g. presence) encryption is mandatory and `false` value provided by caller will be ignored.
      - `address` string, required — PubNub channel name
      - `subscriberKey` string, required — PubNub credential required to subscribe to the channel
      - `secretKey` string, required — PubNub credential required to subscribe to the channel
      - `encryptionAlgorithm` 'AES' — (Only for a "PubNub" transport, returned only if `encryption` is `true`) Encryption algorithm used
      - `encryptionKey` string — (Only for a "PubNub" transport, returned only if `encryption` is `true`) Cryptographic key to decrypt PubNub notification messages
    - WebSocketDeliveryMode
      - `transportType` 'WebSocket', required — The transport type for this subscription, or the channel by which an app should be notified of an event
  - `blacklistedData` object — Returned if a WebHook subscription is blacklisted
    - `blacklistedAt` string, date-time — Time of adding subscription to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
    - `reason` string — Reason of adding subscription to a black list

## Other responses

- `400` — General response with **HTTP 400 "Bad request"** status.<br> Reasons: unparsable request, path, query or body parameters are invalid. The error description may contain reference to particular parameter(s) which haven't passed the validation.
- `403` — General response with **HTTP 403 "Forbidden"** status.<br> Reasons: the requested operation is forbidden because of certain resource state, lack of permissions, feature unavailability, etc.
- `404` — General response with **HTTP 404 "Not found"** status.<br> Reasons: the entity with given ID (typically specified in a path parameter), is not found or inaccessible
- `500` — General response with **HTTP 500 "Internal Server Error"** status.<br> Reasons: general server-side error.
- `503` — General response with **HTTP 503 "Service not available"** status.<br> Reasons: server cannot process the request because of being overloaded, misconfiguration or other issues.

---

[API](https://skmtc.net/ringcentral/apis/ringcentral-api.md) · [All operations](https://skmtc.net/ringcentral/apis/ringcentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ringcentral/ringcentral-api/versions/8d602198ec97/schema)
