Delete a subscription with the Notification API

This is for:

System Administrator
In this article

Since the number allowed user and administrator subscriptions in a Coveo organization is limited, you may want to clean up disabled or unhealthy subscriptions from time to time.

Use the Delete a subscription for organization operation to delete an administrator subscription, or use the Delete a subscription for the current user operation to delete a user subscription.

Request template

DELETE https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/subscriptions/<MySubscriptionId> HTTP/1.1
or
DELETE https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/subscriptions/me/<MySubscriptionId>
 
Accept: application/json
Authorization: Bearer <MyOAuth2Token>

Use the https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/subscriptions request path to delete an administrator subscription.

Use the https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/subscriptions/me request path to delete a user subscription.

In the selected request path:

  • Replace <MyOrganizationId> with the actual ID of the target Coveo organization (see Retrieve the organization ID).
  • Replace <MySubscriptionId> with the actual ID of the subscription to delete.

In the Authorization HTTP header:

  • If you’re deleting an administrator subscription:

    • Replace <MyOAuth2Token> with a Coveo access token that grants you the Subscriptions - Editprivilege in the target Coveo organization, if not already done.
  • If you’re deleting a user subscription:

    • Replace <MyOAuth2Token> with a Coveo access token that grants you the Activities - Viewprivilege in the target Coveo organization, if not already done.

See:

It’s impossible to authenticate either of these calls using an API key, since the service needs to be able to retrieve an email address from the access token in order to delete the subscription.

The body of a successful response (204 No Content) has no content, but indicates that the subscription has been successfully deleted in the target Coveo organization, if not already done.

Sample request

Deleting an administrator subscription

DELETE https://platform.cloud.coveo.com/rest/organizations/mycoveocloudv2organizationg8tp8wu3/subscriptions/vr5h2iu3xp3sifbptrxovc2mkq HTTP/1.1
 
Accept: application/json
Authorization: Bearer **********-****-****-****-************

Successful response - 204 No Content

{}