Skip to main content
POST
/
hooks
/
{hook_id}
/
unsubscribe
JavaScript
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
}

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Path Parameters

hook_id
string<uuid>
required

Response

Successful Response

Response model after successful unsubscription.

id
string<uuid>
required

The subscription ID

unsubscribed
boolean
required

Whether unsubscription was successful