How it works

With an active API KEY the application is able to process data which you send it, and be able to provide a response. Depending on the response, it will block or accept the data, or wait for a manual moderation.

Sample code for Text Moderation

When making an API call, the code structure should be as below:

Request Syntax Structure

API URL is https://api.censorreact.intygrate.com/v1/text

The API request header will contain both Content-Type and x-api-key.
The value of Content-Type header key is application/json and set the value of x-api-key to your [API KEY].

The API request body is a JSON format and contains text and profile attributes.
  {
    text: "This should contain the text that you would like to verified", 
    profile: "Default"
  }

When retrieving a response from the API the structure should be as follows:

Response Syntax Structure

{
  "data": {
    "apiPercent": number,
    "status": boolean,
    "type": string,
    "profile": string,
    "masked": string,
    "rejected": {
      "black": array,
      "grey": array
    },
  "summary": object
}

Try it out with curl

curl -H 'x-api-key: tdWfJ2sTe32nJjjDlK63c6s57uNp0B99OcWXNEm4' -H 'Content-Type: application/json' -d '{"text":"shit. This text contains bad words","profile":"default"}' https://api.censorreact.intygrate.com/v1/text

Sample code for Image Moderation

When making an API call, the code structure should be as below:

API Request Structure

API URL is https://api.censorreact.intygrate.com/v1/image

The API request header will contain both Content-Type and x-api-key.
The value of Content-Type header key is application/json and set the value of x-api-key to your [API KEY].

The API request body is a JSON format and contains text and profile attributes.
  {
    ImageBytes: [IMAGE in Base64 encoded Format], 
    profile: "default"
  }

When retrieving a response from the API the structure should be as follows:

API Response Structure

{
  "status": boolean,
  "apiPercent": number,
  "type": string,
  "reason": string,
  "rejected": {
    "blacklist": array,
    "greylist": array
  }
}

API call examples in different languages

Intygrate provides sample working projects which shows how to use censorREACT APIs from various programming languages/frameworks such as Java, PHP, JavaScript, Vue.js, React.js, etc.

They are available at the Intygrate github account.