Unsubscribe From Notifications

Terminates a specified subscription. Upon successful termination, the callback associated with the subscription will no longer be invoked with notifications.

Endpoint

DELETE /api/subscriptions/{subscriptionId}

Headers

NameRequiredDescription
AuthorizationrequiredIf Basic Authentication is being used, then header value must be of the form Basic <encoded_data>, where <encoded_data> is the Base64 encoding of the username and the password joined by a colon.

If JWT authentication is being used, then header value must be of the form Bearer , where is the JWT obtained via the get authentication token method described earlier.

Path Parameters

NameRequiredTypeDescription
subscriptionIdrequiredintegerThe unique subscription ID received in the response to a subscription request

Request Example

Example 1 - Basic Authentication

curl --request DELETE 'https://notifications.cogito.us/api/subscriptions/123' \
--header 'Authorization: Basic dGVzdDp0ZXN0'

Example 2 - JWT Authentication

curl --request DELETE 'https://notifications.cogito.us/api/subscriptions/123' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwZXJmVGVzdEFnZW50XzIwIiwiZXhwaXJ'

Response Example

A successful response will return HTTP Status 204 No Content with no response body. If no subscription matching the given subscriptionId exists, then a 404 Not Found error will be returned.