Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

unsubscribe(eventType, subscriptionItemName, contextName)

Updated on July 20, 2021

Unsubscribes a subscription item belonging to a specific type of event.


Not applicable.


eventTypestringThe type of event.
subscriptionItemNamefunctionThe unique ID or name used to identify the subscription item.
contextNamestringThe name of the context containing the event whose subscription item must be unsubscribed.
  • You must update to Pega 8.7.2 or later patches to be able to use this parameter.
  • The default value of contextName is app.

Usage example

In this example, the API unsubscribes the subscriptionItemName item belonging to the event of type eventType.

  • Previous topic subscribeOnce(eventType, subscriptionItem, subscriptionItemName)
  • Next topic APIs in the RelatedCasesApi module

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us