import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const response = await client.hooks.unsubscribe('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.id);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unsubscribed": true
}Unsubscribe a previously created subscription by id.
Marks the subscription as DELETED if it belongs to the user.
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const response = await client.hooks.unsubscribe('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.id);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unsubscribed": true
}Bearer token via Authorization header
Was this page helpful?