InsionInsion
PHP

PHP SDK

Use Insion from PHP 8.1 and later

The PHP SDK provides Insion\InsionClient. Its methods return a typed model or null for an empty successful response, and throw exceptions for failures.

composer require insion/insion
use Insion\InsionClient;
$client = new InsionClient(token: $_ENV['INSION_API_KEY']);

How to choose an operation

  • Moderate a record returns a decision during the current request.
  • Ingest a record stores content and delivers moderation asynchronously through webhooks.
  • User methods create, update, search, and retrieve profiles independently of records.
  • Create an appeal requires the Insion user ID from a prior user response.

All methods accept an optional per-request options array and may return null when a successful API response has no body. Handle InsionApiException and InsionException at your application boundary.

On this page