UNPKG

@zenvia/sdk

Version:

This SDK for [Node.js](https://nodejs.org/) was created based on the [Zenvia](https://www.zenvia.com/) [API](https://zenvia.github.io/zenvia-openapi-spec/).

20 lines (16 loc) 428 B
/** * Example to delete a subscription. * * Run: * ZENVIA_API_TOKEN=your-api-token node subscription-delete.js */ // const { Client } = require('@zenvia/sdk'); const { Client } = require('../dist'); const client = new Client(process.env.ZENVIA_API_TOKEN); client.deleteSubscription('subscription-identifier') .then(() => { console.log('Subscription deleted'); }) .catch(error => { console.log('Error:', error); });