Skip to main content
JavaScript
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);
{
  "deleted": true,
  "id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.moderationapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the action to delete.

Response

Action deleted successfully

deleted
boolean
required

Whether the action was deleted.

id
string
required

The ID of the action.