InsionInsion
PHP

Moderate a record

Persist a record and return its moderation result immediately

$result = $client->moderateARecord(new ModerateRequest([
  'clientId' => 'post-123', 'name' => 'A post', 'entity' => 'post', 'content' => 'Hello world',
]));

moderateARecord(ModerateRequest $request, ?array $options = null): ?ModerateResponse requires clientId, name, entity, and content. Optional request values are passthrough, clientUrl, metadata, and user.

Use passthrough to moderate without storing record or user content. Inspect the returned moderation status, ID, and category IDs before publishing. Use per-call options for a timeout, retry policy, headers, or base URL.

Request keyRequiredMeaning
clientIdYesStable application record identifier.
name / entityYesRecord title and kind.
contentYesText or ContentExternalUrls.
clientUrl, metadata, userNoRecord context and associated user.
passthroughNoDo not persist sensitive record/user content.

On success, the nullable result is a ModerateResponse; on API failure an InsionApiException contains status code and body. Choose this method only when the moderation decision is needed in the current workflow; choose ingestion for webhook delivery.