Subscription API - Delete
Use this endpoint to delete a subscription from your account.
Endpoint
Section titled “Endpoint”DELETE https://e1.envoke.com/v2/subscriptions/{ID}Replace {ID} with the Envoke subscription ID you want to delete. Authentication is via HTTP Basic Auth using your API ID and API Key.
Important
Section titled “Important”A subscription cannot be deleted while contacts are assigned to it. If any contacts are currently subscribed, the API returns a validation error. You must remove all assigned contacts first using the DELETE /subscriptions/{ID}/contacts endpoint, then retry the delete.
Deletion is permanent. Once all contacts have been removed and the subscription is deleted, it cannot be recovered via the API.
Response
Section titled “Response”Success
Section titled “Success”{ "success": true, "result_text": "Deleted", "result_data": []}Subscription has contacts assigned
Section titled “Subscription has contacts assigned”{ "success": false, "result_text": "Validation failed, see 'result_data' -> 'errors'", "result_data": { "errors": ["Cannot delete a subscription that has contacts assigned to it"] }}Subscription not found
Section titled “Subscription not found”{ "success": false, "result_text": "Validation failed, see 'result_data' -> 'errors'", "result_data": { "errors": ["Item with id '999999' not found"] }}Example
Section titled “Example”curl -X DELETE -gs \ -u "$API_ID:$API_KEY" \ "https://e1.envoke.com/v2/subscriptions/12"Replace 12 with the ID of the subscription you want to delete, and substitute your actual API ID and API Key.
Note: The curl examples above are formatted for readability. All requests must use properly encoded URLs.
Full reference, OpenAPI description, and Postman collection: developers.envoke.com.

