All error codes

compliance_blocked

HTTP 422Not retryable

Send blocked by compliance policy (illegal words, org policy, or similar).

How to resolve

  • Revise the message body and re-run check_message_compliance before sending.

Example response

JSON

{
  "object": "error",
  "code": "compliance_blocked",
  "message": "Send blocked by compliance policy (illegal words, org policy, or similar).",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/compliance_blocked",
  "retryable": false,
  "recommended_action": "Revise the message body and re-run check_message_compliance before sending."
}

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 === "compliance_blocked") {
    // Send blocked by compliance policy (illegal words, org policy, or similar).
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/compliance_blocked