Delete Subscription

This action deletes a Subscription. You can only delete a Subscription that has a status of Draft. Deleted Subscriptions are unrecoverable and no longer appear in the Customer's Subscriptions following the delete action.

Path Parameters

subscriptionIdIntegerThis is the Subscription ID of the draft Subscription you want to Delete.
curl -X DELETE "{subscriptionId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//Subscription id
int pathParameter = {subscriptionId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://"+pathParameter);
//Add Content type
request.ContentLength = 0;
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "DELETE";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
  result = streamReader.ReadToEnd();
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.delete('{id}', headers=headers)
Returns a 204 No Content Response upon success
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
            "Key": "Api Error",
            "Value": "Only subscriptions in Draft status can be deleted."