All error codes
charset_security_evasion
HTTP 422Not retryableMessage body contains mixed-script or lookalike Unicode characters that carriers treat as security evasion. Resubmit using the provided normalized_text (standard Latin characters only).
How to resolve
- The body contains mixed-script or lookalike Unicode (e.g. Cyrillic characters that look like Latin).
- Copy `normalized_text` from the error response, review it, and resubmit — Statxt does not silently rewrite and send.
- Preflight with `POST /api/v1/compliance/illegal-words/check` to catch charset evasion before send.
- Prefer plain-text composition; avoid rich-text / secondary keyboard paste for high-risk copy.
Example response
JSON
{
"object": "error",
"code": "charset_security_evasion",
"message": "Message body contains mixed-script or lookalike Unicode characters that carriers treat as security evasion. Resubmit using the provided normalized_text (standard Latin characters only).",
"request_id": "req_example123",
"docs_url": "https://docs.statxt.com/api/errors/charset_security_evasion",
"retryable": false,
"recommended_action": "Resubmit using normalized_text from the error response.",
"param": "body",
"normalized_text": "Hey Anatoly, HOT business product just dropped. Reply STOP to opt out."
}Example request (invalid)
JSON
{
"to": "+14155550100",
"from_phone_number_id": "00000000-0000-4000-8000-000000000001",
"body": "Неу Anatoly, НОТ busіnеss рrоduсt just drоppеd. Reply STOP to opt out."
}SDK handling
TypeScript
import { StatxtClient, StatxtApiError } from "@statxt/sdk"
const client = new StatxtClient({ apiKey: process.env.STATXT_API_KEY! })
try {
await client.messages.send({ ... })
} catch (err) {
if (err instanceof StatxtApiError && err.code === "charset_security_evasion") {
// Resubmit after reviewing the Latin-normalized body — do not silent-send.
const cleaned = err.normalizedText
console.error(err.requestId, cleaned)
}
}Public reference: /docs/errors/charset_security_evasion