InsionInsion
PHP

PHP SDK

Install and start using the official Insion PHP client

The official Insion PHP SDK lets PHP applications moderate content, ingest records, manage users, and submit appeals without constructing HTTP requests. This guide walks you through installing the package, creating an authenticated client, and sending a record for immediate moderation.

Before you begin

You'll need:

Use immediate moderation when your application needs a decision in the current request. Use ingestion when moderation can happen asynchronously and your application receives the result through a webhook.

Install

composer require insion/insion

The SDK uses PSR-18 discovery, so install a compatible HTTP client if your application does not already provide one.

Make your first request

use Insion\InsionClient;
use Insion\Requests\ModerateRequest;

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

Next steps

  • Fine-tune client and request behavior in Configuration.
  • Explore every supported request and response in Operations.
  • Prepare production error handling with Errors.

Get Involved

How is this guide?

On this page

Latest Release

View the PHP SDK on PackagistPHP SDK versionPHP SDK license