import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const action = await client.actions.delete('id');
console.log(action.id);
Copy
{
"deleted": true,
"id": "<string>"
}
Delete an action
Delete an action and all of its webhooks.
JavaScript
Copy
import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const action = await client.actions.delete('id');
console.log(action.id);