Skip to main content

DELETE Deactivate Subscriptions

Deactivate all subscriptions and remove all events from calendars associated with a user name.

Description#

The Deactivate Subscription API function disables a subscription from receiving any events in the future. Once a subscription has been deactivated, any new events published will not appear in their calendar.

You can either specify an individual subscription or all subscriptions that belong to a user name for a calendar.

This API function is protected by OAuth and must include an access token in the same way it is required to create a subscription.

Request#

Path

DELETE /v1/subscription/{accountCode}/{calendarCode}

Parameters

NameTypeInDescriptionRequiredExample
accountCodeStringpathThe Rokt Calendar merchant account code, or the subdomain of your Rokt Calendar dashboard URL.true 
calendarCodeStringpathThis is a unique identifier of a specific calendar in your Rokt Calendar account. It is the URL slug that appears directly after the domain.trueif your calendar URL is http://youraccount.roktcalendar.com/my-calendar then the calendarCode will be my-calendar.

Request body

{  "userName": "string",  "id": "string",  "unsubscribeReasonId": null,  "unsubscribeReasonText": "string",  "actionType": "string"}

Response#

202 Accepted

Error#

400 BadRequest

401 Unauthorized

Was this article helpful?