Skip to content

ListActions

This example assumes using ModerationAPI; is in scope and apiKey contains your ModerationAPI API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
using var client = new ModerationAPIClient(apiKey);

var actions = await client.Actions.ActionsListAsync();

// Each action has an ID, name, and configuration.

foreach (var action in actions)
{
    Console.WriteLine($"Action: {action.Name} (ID: {action.Id})");
}