Moderate a record
Persist a record and return its moderation result immediately
var result = await client.ModerateARecordAsync(new ModerateRequest
{
ClientId = "post-123", Name = "A post", Entity = "post", Content = "Hello world",
});Signature and fields
ModerateARecordAsync(ModerateRequest request, RequestOptions? options = null, CancellationToken cancellationToken = default) returns ModerateResponse.
| Property | Required | Description |
|---|---|---|
ClientId, Name, Entity, Content | Yes | Stable record ID, record name, kind, and text or structured content. |
ClientUrl, Metadata, User | No | Record context and associated user. |
Passthrough | No | Moderate without persisting record or user content. |
Inspect the returned status, moderation ID, and category IDs before publishing content. API failures throw typed exceptions.
Result and request controls
Awaiting the returned WithRawResponseTask<ModerateResponse> yields ModerateResponse. Use result.Status for the decision, result.Moderation for the moderation ID, and result.CategoryIds for matched rules. Use the overload’s RequestOptions to set Timeout, MaxRetries, AdditionalHeaders, AdditionalQueryParameters, or AdditionalBodyProperties; use CancellationToken to cancel the call.
Choose this operation only when the decision is needed during the current request. For webhook-based processing, use Ingest a record.