Text Check Task Submission

Submit a text for asynchronous moderation and receive a taskId.

POSThttps://tsafe.ilivedata.com/api/v1/text/async/check/submit

UTF-8 text, up to 2,048 characters per request. Configure the callback URL and secret key in the console when possible.

Request Parameters

Request Headers

All headers below are required.

Header Value Description
Content-Type application/json; charset=UTF-8 Request body format
Accept application/json; charset=UTF-8 Response format
X-AppId — Project ID from Console → Service Configuration
X-TimeStamp — UTC time when the request is sent, in W3C format.
Format example: 2026-09-30T02:30:00Z. Use the current time for actual requests.
Authorization — See Request Signature below

Request Body

When strategyId is omitted, the DEFAULT policy is used.

Parameter Type Required Description
content String Required The text to be detected. This text is UTF-8 encoded strings with no more than 2048 characters.
strategyId String Optional Policy number. The default policy DEFAULT is used when not passed.
country String Optional country The default country setting is used when omitted.
userId String Optional Unique end user ID. The userID should be no more than 64 characters.
sessionId String Optional sessionId, The sessionId should be no more than 64 characters.
receiverId String Optional receiverId, The receiverId should be no more than 64 characters.
userName String Optional User name, nickname. The user name should be no more than 32 characters.
userLevel Number Optional User level
totalPay Number Optional User total payment. Support up to 2 digits after the decimal point.
registrationDate Number Optional User registration date. 10 digit timestamp.
msgCount Number Optional Number of message sent
msgType String Optional Message type
pkgChannel String Optional Package channel
userIp String Optional User IP address
did String Optional User device ID
dtype String Optional 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone;
5 PC, 6 Web, 7 WAP.
extra Object Optional Additional key-value data, such as {"server":"123","version":"456"}.
checkTags Array Optional First-level categories; see the category table below.
callbackUrl String Optional callback url(not recommend, config this at console)
callbackSecretKey String Optional callback secret key(not recommend, config this at console)

Supported Check Categories

Use the following first-level codes in checkTags.

Code Category
100 Politics
110 Violence and terrorism
120 Prohibited content
130 Eroticism
150 Advertising
160 Insults
170 Hate speech
180 Minor protection
190 Sensitive hot topics
220 Private transactions
410 Irregular emoticons
420 Nicknames
999 Custom categories

Request Example

{
  "content": "fuck you",
  "userId": "1234556",
  "strategyId": "123"
}

Request Signature

Calculate Authorization using Request Signature with these parameters.

Signing Parameter Value
HTTPMethod POST
HostHeaderInLowercase tsafe.ilivedata.com
HTTPRequestURI /api/v1/text/async/check/submit

HTTP Response

Content-Type: application/json;charset=UTF-8

Successful submission does not mean moderation has completed. Use taskId to query the result or receive a callback.

Response Fields

Field Type Description
errorCode Number Error code: 0 means success
errorMessage String Error message
taskId String Unique identifier of the submitted detection task

Response Example

{
  "errorCode": 0,
  "taskId": "us_**************************"
}

Error Codes

For common request and authentication errors, see Common Error Codes. This API has the following additional conditions:

HTTP Status Error Code Message API-Specific Condition
400 2000 Missing Parameter The JSON request body is missing content.
400 2102 Input Too Long content exceeds 2,048 characters.
429 1104 Out of Rate Limit The request rate exceeds 20 texts/second, or the total character rate for texts longer than 100 characters exceeds 1K characters/second.

The limits above are the documented defaults. If the project’s limits have been increased, use the configured limits.