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 key | Required | Meaning |
|---|---|---|
clientId | Yes | Stable application record identifier. |
name / entity | Yes | Record title and kind. |
content | Yes | Text or ContentExternalUrls. |
clientUrl, metadata, user | No | Record context and associated user. |
passthrough | No | Do 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.