InsionInsion
TypeScript

TypeScript SDK

Install and start using the official Insion client for TypeScript and JavaScript

The official Insion TypeScript SDK lets TypeScript and JavaScript applications moderate content, ingest records, manage users, and submit appeals without constructing HTTP requests. This guide walks you through installing the SDK, 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

npm install @insion/client

Create a client

import { InsionClient } from "@insion/client";

const client = new InsionClient({
  token: process.env.INSION_API_KEY!,
});

Create one client and reuse it. All operations return promises and expose typed requests and responses.

Make your first request

const result = await client.moderateARecord({
  clientId: "post-123",
  name: "Welcome post",
  entity: "post",
  content: "Hello world",
});

console.log(result.status, result.categoryIds);

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 TypeScript SDK on npmTypeScript SDK versionTypeScript SDK license