Skip to main content

Delete a Subscription

Jetmir Abdija avatar
Written by Jetmir Abdija
Updated over a month ago

This article describes the steps for removing an existing subscription from a tenant.

HTTP response status code

Interpretation

200 OK

Subscription deleted successfully

400 Bad Request

Subscription could not be updated due to invalid tenant and subscription ID data passed

401 Unauthorized

Subscription could not be deleted due to the user not being authorized with the correct API key

404 Not found

The subscription to delete could not be found

500 Internal Server Error

The subscription couldn’t be deleted due to a server error

To delete an existing subscription, make a DELETE request to the /subscriptions/{id} endpoint specifying:

Make DELETE request to /{tenant}/subscriptions/{id}

  • Resource/endpoint destination URL

  • The header for your API request

  • The {tenant} needs to be replaced with the tenant's name

  • The ID needs to be replaced with the ID of the subscription to delete

To delete the object with the ID, we pass a DELETE request to the URI https://public-api.eu.bluedolphin.app/v1/subscriptions/{id}.

Example API Request

curl --location --request DELETE 
'https://public-api.eu.bluedolphin.app/v1/subscriptions/{id}’ \
--header 'x-api-key: YOURAPIKEYSECRET' \
--header 'tenant: tenantName’ \
--header 'Content-Type: application/json' \
--data

A successful call returns a response with a 200 OK HTTP status code and the following body:

{
"result": "OK"
}
Did this answer your question?