All error codes

dnc_blocked

HTTP 422Not retryable

Recipient is blocked by DNC settings; the send was not enqueued.

How to resolve

  • The recipient is on your organization's Do Not Contact list.
  • Remove the number from DNC in the dashboard if the block was in error.
  • Check the DNC status first with `POST /api/v1/compliance/dnc/check`.

Example response

JSON

{
  "object": "error",
  "code": "dnc_blocked",
  "message": "Recipient is blocked by DNC settings; the send was not enqueued.",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/dnc_blocked"
}

Example request (invalid)

JSON

{
  "to": "+14155550000",
  "from_phone_number_id": "uuid",
  "body": "Hello"
}

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 === "dnc_blocked") {
    // Recipient is blocked by DNC settings; the send was not enqueued.
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/dnc_blocked